aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2006-08-15 04:39:36 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-08-17 19:29:52 -0400
commit932f3772cf76cc1b1fd1538ceee3edba9bf2164f (patch)
treef9ad57d1369359d30fbab271cb736519c0606e20 /drivers/net/bnx2.c
parent2f8af120a159a843948749ea88bcacda9779b132 (diff)
[BNX2]: Convert to netdev_alloc_skb()
Convert dev_alloc_skb() to netdev_alloc_skb() and increase default rx ring size to 255. The old ring size of 100 was too small. Update version to 1.4.44. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 2099edbbfdfd..652eb05a6c2d 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -56,8 +56,8 @@
56 56
57#define DRV_MODULE_NAME "bnx2" 57#define DRV_MODULE_NAME "bnx2"
58#define PFX DRV_MODULE_NAME ": " 58#define PFX DRV_MODULE_NAME ": "
59#define DRV_MODULE_VERSION "1.4.43" 59#define DRV_MODULE_VERSION "1.4.44"
60#define DRV_MODULE_RELDATE "June 28, 2006" 60#define DRV_MODULE_RELDATE "August 10, 2006"
61 61
62#define RUN_AT(x) (jiffies + (x)) 62#define RUN_AT(x) (jiffies + (x))
63 63
@@ -1571,7 +1571,7 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, u16 index)
1571 struct rx_bd *rxbd = &bp->rx_desc_ring[RX_RING(index)][RX_IDX(index)]; 1571 struct rx_bd *rxbd = &bp->rx_desc_ring[RX_RING(index)][RX_IDX(index)];
1572 unsigned long align; 1572 unsigned long align;
1573 1573
1574 skb = dev_alloc_skb(bp->rx_buf_size); 1574 skb = netdev_alloc_skb(bp->dev, bp->rx_buf_size);
1575 if (skb == NULL) { 1575 if (skb == NULL) {
1576 return -ENOMEM; 1576 return -ENOMEM;
1577 } 1577 }
@@ -1580,7 +1580,6 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, u16 index)
1580 skb_reserve(skb, 8 - align); 1580 skb_reserve(skb, 8 - align);
1581 } 1581 }
1582 1582
1583 skb->dev = bp->dev;
1584 mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_use_size, 1583 mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_use_size,
1585 PCI_DMA_FROMDEVICE); 1584 PCI_DMA_FROMDEVICE);
1586 1585
@@ -1793,7 +1792,7 @@ bnx2_rx_int(struct bnx2 *bp, int budget)
1793 if ((bp->dev->mtu > 1500) && (len <= RX_COPY_THRESH)) { 1792 if ((bp->dev->mtu > 1500) && (len <= RX_COPY_THRESH)) {
1794 struct sk_buff *new_skb; 1793 struct sk_buff *new_skb;
1795 1794
1796 new_skb = dev_alloc_skb(len + 2); 1795 new_skb = netdev_alloc_skb(bp->dev, len + 2);
1797 if (new_skb == NULL) 1796 if (new_skb == NULL)
1798 goto reuse_rx; 1797 goto reuse_rx;
1799 1798
@@ -1804,7 +1803,6 @@ bnx2_rx_int(struct bnx2 *bp, int budget)
1804 1803
1805 skb_reserve(new_skb, 2); 1804 skb_reserve(new_skb, 2);
1806 skb_put(new_skb, len); 1805 skb_put(new_skb, len);
1807 new_skb->dev = bp->dev;
1808 1806
1809 bnx2_reuse_rx_skb(bp, skb, 1807 bnx2_reuse_rx_skb(bp, skb,
1810 sw_ring_cons, sw_ring_prod); 1808 sw_ring_cons, sw_ring_prod);
@@ -3961,7 +3959,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode)
3961 return -EINVAL; 3959 return -EINVAL;
3962 3960
3963 pkt_size = 1514; 3961 pkt_size = 1514;
3964 skb = dev_alloc_skb(pkt_size); 3962 skb = netdev_alloc_skb(bp->dev, pkt_size);
3965 if (!skb) 3963 if (!skb)
3966 return -ENOMEM; 3964 return -ENOMEM;
3967 packet = skb_put(skb, pkt_size); 3965 packet = skb_put(skb, pkt_size);
@@ -5754,7 +5752,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5754 bp->mac_addr[5] = (u8) reg; 5752 bp->mac_addr[5] = (u8) reg;
5755 5753
5756 bp->tx_ring_size = MAX_TX_DESC_CNT; 5754 bp->tx_ring_size = MAX_TX_DESC_CNT;
5757 bnx2_set_rx_ring_size(bp, 100); 5755 bnx2_set_rx_ring_size(bp, 255);
5758 5756
5759 bp->rx_csum = 1; 5757 bp->rx_csum = 1;
5760 5758