diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-02-12 03:36:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-16 02:31:18 -0500 |
commit | 87942b467880fb65381af87a5ff61fdb7ede5eb3 (patch) | |
tree | 7c208fcb550b73f740a1447608b21546edfe6942 /drivers/net/bnx2x_main.c | |
parent | 35b19ba51c1e6258a338a0855c72384abc33ce11 (diff) |
bnx2x: Removing redundant device parameters
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r-- | drivers/net/bnx2x_main.c | 19 |
1 files changed, 9 insertions, 10 deletions
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) | |||
7947 | static int __devinit bnx2x_init_bp(struct bnx2x *bp) | 7947 | static 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", |