Skip to content

Commit 04380d4

Browse files
Matt Carlsondavem330
authored andcommitted
tg3: Unify max pkt size preprocessor constants
The maximum packet size that gets programmed into the standard producer ring control block is directly related to the packet size used to allocate packet buffers. This patch removes the redundant preprocessor constant. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9dc7a11 commit 04380d4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

drivers/net/tg3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7905,9 +7905,9 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
79057905
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
79067906
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
79077907
val = (RX_STD_MAX_SIZE_5705 << BDINFO_FLAGS_MAXLEN_SHIFT) |
7908-
(RX_STD_MAX_SIZE << 2);
7908+
(TG3_RX_STD_DMA_SZ << 2);
79097909
else
7910-
val = RX_STD_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT;
7910+
val = TG3_RX_STD_DMA_SZ << BDINFO_FLAGS_MAXLEN_SHIFT;
79117911
} else
79127912
val = RX_STD_MAX_SIZE_5705 << BDINFO_FLAGS_MAXLEN_SHIFT;
79137913

drivers/net/tg3.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
#define TG3_RX_INTERNAL_RING_SZ_5906 32
2727

28-
#define RX_STD_MAX_SIZE 1536
2928
#define RX_STD_MAX_SIZE_5705 512
3029
#define RX_JUMBO_MAX_SIZE 0xdeadbeef /* XXX */
3130

0 commit comments

Comments
 (0)