aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2x.h5
-rw-r--r--drivers/net/bnx2x_main.c19
2 files changed, 9 insertions, 15 deletions
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h
index a18ace07fa42..2397a891e1ba 100644
--- a/drivers/net/bnx2x.h
+++ b/drivers/net/bnx2x.h
@@ -525,8 +525,6 @@ struct bnx2x_common {
525 u32 hw_config; 525 u32 hw_config;
526 526
527 u32 bc_ver; 527 u32 bc_ver;
528
529 char *name;
530}; 528};
531 529
532 530
@@ -798,7 +796,6 @@ struct bnx2x {
798#endif 796#endif
799 797
800 u32 rx_csum; 798 u32 rx_csum;
801 u32 rx_offset;
802 u32 rx_buf_size; 799 u32 rx_buf_size;
803#define ETH_OVREHEAD (ETH_HLEN + 8) /* 8 for CRC + VLAN */ 800#define ETH_OVREHEAD (ETH_HLEN + 8) /* 8 for CRC + VLAN */
804#define ETH_MIN_PACKET_SIZE 60 801#define ETH_MIN_PACKET_SIZE 60
@@ -819,7 +816,6 @@ struct bnx2x {
819 u16 def_att_idx; 816 u16 def_att_idx;
820 u32 attn_state; 817 u32 attn_state;
821 struct attn_route attn_group[MAX_DYNAMIC_ATTN_GRPS]; 818 struct attn_route attn_group[MAX_DYNAMIC_ATTN_GRPS];
822 u32 nig_mask;
823 819
824 /* slow path ring */ 820 /* slow path ring */
825 struct eth_spe *spq; 821 struct eth_spe *spq;
@@ -869,7 +865,6 @@ struct bnx2x {
869 struct work_struct reset_task; 865 struct work_struct reset_task;
870 866
871 struct timer_list timer; 867 struct timer_list timer;
872 int timer_interval;
873 int current_interval; 868 int current_interval;
874 869
875 u16 fw_seq; 870 u16 fw_seq;
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index f4486580b99f..9c40b02b65f6 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -1089,8 +1089,7 @@ static void bnx2x_reuse_rx_skb(struct bnx2x_fastpath *fp,
1089 1089
1090 pci_dma_sync_single_for_device(bp->pdev, 1090 pci_dma_sync_single_for_device(bp->pdev,
1091 pci_unmap_addr(cons_rx_buf, mapping), 1091 pci_unmap_addr(cons_rx_buf, mapping),
1092 bp->rx_offset + RX_COPY_THRESH, 1092 RX_COPY_THRESH, PCI_DMA_FROMDEVICE);
1093 PCI_DMA_FROMDEVICE);
1094 1093
1095 prod_rx_buf->skb = cons_rx_buf->skb; 1094 prod_rx_buf->skb = cons_rx_buf->skb;
1096 pci_unmap_addr_set(prod_rx_buf, mapping, 1095 pci_unmap_addr_set(prod_rx_buf, mapping,
@@ -2403,6 +2402,7 @@ static void bnx2x_attn_int_asserted(struct bnx2x *bp, u32 asserted)
2403 u32 nig_int_mask_addr = port ? NIG_REG_MASK_INTERRUPT_PORT1 : 2402 u32 nig_int_mask_addr = port ? NIG_REG_MASK_INTERRUPT_PORT1 :
2404 NIG_REG_MASK_INTERRUPT_PORT0; 2403 NIG_REG_MASK_INTERRUPT_PORT0;
2405 u32 aeu_mask; 2404 u32 aeu_mask;
2405 u32 nig_mask = 0;
2406 2406
2407 if (bp->attn_state & asserted) 2407 if (bp->attn_state & asserted)
2408 BNX2X_ERR("IGU ERROR\n"); 2408 BNX2X_ERR("IGU ERROR\n");
@@ -2428,7 +2428,7 @@ static void bnx2x_attn_int_asserted(struct bnx2x *bp, u32 asserted)
2428 bnx2x_acquire_phy_lock(bp); 2428 bnx2x_acquire_phy_lock(bp);
2429 2429
2430 /* save nig interrupt mask */ 2430 /* save nig interrupt mask */
2431 bp->nig_mask = REG_RD(bp, nig_int_mask_addr); 2431 nig_mask = REG_RD(bp, nig_int_mask_addr);
2432 REG_WR(bp, nig_int_mask_addr, 0); 2432 REG_WR(bp, nig_int_mask_addr, 0);
2433 2433
2434 bnx2x_link_attn(bp); 2434 bnx2x_link_attn(bp);
@@ -2483,7 +2483,7 @@ static void bnx2x_attn_int_asserted(struct bnx2x *bp, u32 asserted)
2483 2483
2484 /* now set back the mask */ 2484 /* now set back the mask */
2485 if (asserted & ATTN_NIG_FOR_FUNC) { 2485 if (asserted & ATTN_NIG_FOR_FUNC) {
2486 REG_WR(bp, nig_int_mask_addr, bp->nig_mask); 2486 REG_WR(bp, nig_int_mask_addr, nig_mask);
2487 bnx2x_release_phy_lock(bp); 2487 bnx2x_release_phy_lock(bp);
2488 } 2488 }
2489} 2489}
@@ -4358,7 +4358,7 @@ static void bnx2x_init_rx_rings(struct bnx2x *bp)
4358 u16 ring_prod, cqe_ring_prod; 4358 u16 ring_prod, cqe_ring_prod;
4359 int i, j; 4359 int i, j;
4360 4360
4361 bp->rx_buf_size += bp->rx_offset + ETH_OVREHEAD + BNX2X_RX_ALIGN; 4361 bp->rx_buf_size = bp->dev->mtu + ETH_OVREHEAD + BNX2X_RX_ALIGN;
4362 DP(NETIF_MSG_IFUP, 4362 DP(NETIF_MSG_IFUP,
4363 "mtu %d rx_buf_size %d\n", bp->dev->mtu, bp->rx_buf_size); 4363 "mtu %d rx_buf_size %d\n", bp->dev->mtu, bp->rx_buf_size);
4364 4364
@@ -7947,6 +7947,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
7947static int __devinit bnx2x_init_bp(struct bnx2x *bp) 7947static int __devinit bnx2x_init_bp(struct bnx2x *bp)
7948{ 7948{
7949 int func = BP_FUNC(bp); 7949 int func = BP_FUNC(bp);
7950 int timer_interval;
7950 int rc; 7951 int rc;
7951 7952
7952 /* Disable interrupt handling until HW is initialized */ 7953 /* Disable interrupt handling until HW is initialized */
@@ -7994,13 +7995,12 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)
7994 bp->rx_ring_size = MAX_RX_AVAIL; 7995 bp->rx_ring_size = MAX_RX_AVAIL;
7995 7996
7996 bp->rx_csum = 1; 7997 bp->rx_csum = 1;
7997 bp->rx_offset = 0;
7998 7998
7999 bp->tx_ticks = 50; 7999 bp->tx_ticks = 50;
8000 bp->rx_ticks = 25; 8000 bp->rx_ticks = 25;
8001 8001
8002 bp->timer_interval = (CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ); 8002 timer_interval = (CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ);
8003 bp->current_interval = (poll ? poll : bp->timer_interval); 8003 bp->current_interval = (poll ? poll : timer_interval);
8004 8004
8005 init_timer(&bp->timer); 8005 init_timer(&bp->timer);
8006 bp->timer.expires = jiffies + bp->current_interval; 8006 bp->timer.expires = jiffies + bp->current_interval;
@@ -10828,9 +10828,8 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
10828 goto init_one_exit; 10828 goto init_one_exit;
10829 } 10829 }
10830 10830
10831 bp->common.name = board_info[ent->driver_data].name;
10832 printk(KERN_INFO "%s: %s (%c%d) PCI-E x%d %s found at mem %lx," 10831 printk(KERN_INFO "%s: %s (%c%d) PCI-E x%d %s found at mem %lx,"
10833 " IRQ %d, ", dev->name, bp->common.name, 10832 " IRQ %d, ", dev->name, board_info[ent->driver_data].name,
10834 (CHIP_REV(bp) >> 12) + 'A', (CHIP_METAL(bp) >> 4), 10833 (CHIP_REV(bp) >> 12) + 'A', (CHIP_METAL(bp) >> 4),
10835 bnx2x_get_pcie_width(bp), 10834 bnx2x_get_pcie_width(bp),
10836 (bnx2x_get_pcie_speed(bp) == 2) ? "5GHz (Gen2)" : "2.5GHz", 10835 (bnx2x_get_pcie_speed(bp) == 2) ? "5GHz (Gen2)" : "2.5GHz",