aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-07-05 02:46:08 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-07-05 02:46:08 -0400
commit285eba57db7bd7d7c3c5929fb8621fdcaaea1b00 (patch)
treea9e7f0563cef296b24c53b20dbb388ec5c210172 /drivers/net/bnx2.c
parent1c14e6cecb1811543b1016f27e5d308fbea8c08a (diff)
parent815c4163b6c8ebf8152f42b0a5fd015cfdcedc78 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: include/linux/serial_sci.h Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 188e356c30a3..117432222a09 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -247,6 +247,7 @@ static const struct flash_spec flash_5709 = {
247MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl); 247MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl);
248 248
249static void bnx2_init_napi(struct bnx2 *bp); 249static void bnx2_init_napi(struct bnx2 *bp);
250static void bnx2_del_napi(struct bnx2 *bp);
250 251
251static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr) 252static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr)
252{ 253{
@@ -3072,7 +3073,6 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
3072 u16 hw_cons, sw_cons, sw_ring_cons, sw_prod, sw_ring_prod; 3073 u16 hw_cons, sw_cons, sw_ring_cons, sw_prod, sw_ring_prod;
3073 struct l2_fhdr *rx_hdr; 3074 struct l2_fhdr *rx_hdr;
3074 int rx_pkt = 0, pg_ring_used = 0; 3075 int rx_pkt = 0, pg_ring_used = 0;
3075 struct pci_dev *pdev = bp->pdev;
3076 3076
3077 hw_cons = bnx2_get_hw_rx_cons(bnapi); 3077 hw_cons = bnx2_get_hw_rx_cons(bnapi);
3078 sw_cons = rxr->rx_cons; 3078 sw_cons = rxr->rx_cons;
@@ -3098,12 +3098,10 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
3098 skb = rx_buf->skb; 3098 skb = rx_buf->skb;
3099 prefetchw(skb); 3099 prefetchw(skb);
3100 3100
3101 if (!get_dma_ops(&pdev->dev)->sync_single_for_cpu) { 3101 next_rx_buf =
3102 next_rx_buf = 3102 &rxr->rx_buf_ring[RX_RING_IDX(NEXT_RX_BD(sw_cons))];
3103 &rxr->rx_buf_ring[ 3103 prefetch(next_rx_buf->desc);
3104 RX_RING_IDX(NEXT_RX_BD(sw_cons))]; 3104
3105 prefetch(next_rx_buf->desc);
3106 }
3107 rx_buf->skb = NULL; 3105 rx_buf->skb = NULL;
3108 3106
3109 dma_addr = dma_unmap_addr(rx_buf, mapping); 3107 dma_addr = dma_unmap_addr(rx_buf, mapping);
@@ -6270,6 +6268,7 @@ open_err:
6270 bnx2_free_skbs(bp); 6268 bnx2_free_skbs(bp);
6271 bnx2_free_irq(bp); 6269 bnx2_free_irq(bp);
6272 bnx2_free_mem(bp); 6270 bnx2_free_mem(bp);
6271 bnx2_del_napi(bp);
6273 return rc; 6272 return rc;
6274} 6273}
6275 6274
@@ -6537,6 +6536,7 @@ bnx2_close(struct net_device *dev)
6537 bnx2_free_irq(bp); 6536 bnx2_free_irq(bp);
6538 bnx2_free_skbs(bp); 6537 bnx2_free_skbs(bp);
6539 bnx2_free_mem(bp); 6538 bnx2_free_mem(bp);
6539 bnx2_del_napi(bp);
6540 bp->link_up = 0; 6540 bp->link_up = 0;
6541 netif_carrier_off(bp->dev); 6541 netif_carrier_off(bp->dev);
6542 bnx2_set_power_state(bp, PCI_D3hot); 6542 bnx2_set_power_state(bp, PCI_D3hot);
@@ -8227,7 +8227,16 @@ bnx2_bus_string(struct bnx2 *bp, char *str)
8227 return str; 8227 return str;
8228} 8228}
8229 8229
8230static void __devinit 8230static void
8231bnx2_del_napi(struct bnx2 *bp)
8232{
8233 int i;
8234
8235 for (i = 0; i < bp->irq_nvecs; i++)
8236 netif_napi_del(&bp->bnx2_napi[i].napi);
8237}
8238
8239static void
8231bnx2_init_napi(struct bnx2 *bp) 8240bnx2_init_napi(struct bnx2 *bp)
8232{ 8241{
8233 int i; 8242 int i;