aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index d28cbce0ec48..a52ffdc3b40a 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -4473,7 +4473,7 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
4473static int 4473static int
4474bnx2_init_chip(struct bnx2 *bp) 4474bnx2_init_chip(struct bnx2 *bp)
4475{ 4475{
4476 u32 val; 4476 u32 val, mtu;
4477 int rc, i; 4477 int rc, i;
4478 4478
4479 /* Make sure the interrupt is not active. */ 4479 /* Make sure the interrupt is not active. */
@@ -4565,11 +4565,19 @@ bnx2_init_chip(struct bnx2 *bp)
4565 REG_WR(bp, BNX2_EMAC_BACKOFF_SEED, val); 4565 REG_WR(bp, BNX2_EMAC_BACKOFF_SEED, val);
4566 4566
4567 /* Program the MTU. Also include 4 bytes for CRC32. */ 4567 /* Program the MTU. Also include 4 bytes for CRC32. */
4568 val = bp->dev->mtu + ETH_HLEN + 4; 4568 mtu = bp->dev->mtu;
4569 val = mtu + ETH_HLEN + ETH_FCS_LEN;
4569 if (val > (MAX_ETHERNET_PACKET_SIZE + 4)) 4570 if (val > (MAX_ETHERNET_PACKET_SIZE + 4))
4570 val |= BNX2_EMAC_RX_MTU_SIZE_JUMBO_ENA; 4571 val |= BNX2_EMAC_RX_MTU_SIZE_JUMBO_ENA;
4571 REG_WR(bp, BNX2_EMAC_RX_MTU_SIZE, val); 4572 REG_WR(bp, BNX2_EMAC_RX_MTU_SIZE, val);
4572 4573
4574 if (mtu < 1500)
4575 mtu = 1500;
4576
4577 bnx2_reg_wr_ind(bp, BNX2_RBUF_CONFIG, BNX2_RBUF_CONFIG_VAL(mtu));
4578 bnx2_reg_wr_ind(bp, BNX2_RBUF_CONFIG2, BNX2_RBUF_CONFIG2_VAL(mtu));
4579 bnx2_reg_wr_ind(bp, BNX2_RBUF_CONFIG3, BNX2_RBUF_CONFIG3_VAL(mtu));
4580
4573 for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) 4581 for (i = 0; i < BNX2_MAX_MSIX_VEC; i++)
4574 bp->bnx2_napi[i].last_status_idx = 0; 4582 bp->bnx2_napi[i].last_status_idx = 0;
4575 4583