Commit 932f3772 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

[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: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2f8af120
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
#define DRV_MODULE_NAME "bnx2" #define DRV_MODULE_NAME "bnx2"
#define PFX DRV_MODULE_NAME ": " #define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "1.4.43" #define DRV_MODULE_VERSION "1.4.44"
#define DRV_MODULE_RELDATE "June 28, 2006" #define DRV_MODULE_RELDATE "August 10, 2006"
#define RUN_AT(x) (jiffies + (x)) #define RUN_AT(x) (jiffies + (x))
...@@ -1571,7 +1571,7 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, u16 index) ...@@ -1571,7 +1571,7 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, u16 index)
struct rx_bd *rxbd = &bp->rx_desc_ring[RX_RING(index)][RX_IDX(index)]; struct rx_bd *rxbd = &bp->rx_desc_ring[RX_RING(index)][RX_IDX(index)];
unsigned long align; unsigned long align;
skb = dev_alloc_skb(bp->rx_buf_size); skb = netdev_alloc_skb(bp->dev, bp->rx_buf_size);
if (skb == NULL) { if (skb == NULL) {
return -ENOMEM; return -ENOMEM;
} }
...@@ -1580,7 +1580,6 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, u16 index) ...@@ -1580,7 +1580,6 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, u16 index)
skb_reserve(skb, 8 - align); skb_reserve(skb, 8 - align);
} }
skb->dev = bp->dev;
mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_use_size, mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_use_size,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
...@@ -1793,7 +1792,7 @@ bnx2_rx_int(struct bnx2 *bp, int budget) ...@@ -1793,7 +1792,7 @@ bnx2_rx_int(struct bnx2 *bp, int budget)
if ((bp->dev->mtu > 1500) && (len <= RX_COPY_THRESH)) { if ((bp->dev->mtu > 1500) && (len <= RX_COPY_THRESH)) {
struct sk_buff *new_skb; struct sk_buff *new_skb;
new_skb = dev_alloc_skb(len + 2); new_skb = netdev_alloc_skb(bp->dev, len + 2);
if (new_skb == NULL) if (new_skb == NULL)
goto reuse_rx; goto reuse_rx;
...@@ -1804,7 +1803,6 @@ bnx2_rx_int(struct bnx2 *bp, int budget) ...@@ -1804,7 +1803,6 @@ bnx2_rx_int(struct bnx2 *bp, int budget)
skb_reserve(new_skb, 2); skb_reserve(new_skb, 2);
skb_put(new_skb, len); skb_put(new_skb, len);
new_skb->dev = bp->dev;
bnx2_reuse_rx_skb(bp, skb, bnx2_reuse_rx_skb(bp, skb,
sw_ring_cons, sw_ring_prod); sw_ring_cons, sw_ring_prod);
...@@ -3961,7 +3959,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode) ...@@ -3961,7 +3959,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode)
return -EINVAL; return -EINVAL;
pkt_size = 1514; pkt_size = 1514;
skb = dev_alloc_skb(pkt_size); skb = netdev_alloc_skb(bp->dev, pkt_size);
if (!skb) if (!skb)
return -ENOMEM; return -ENOMEM;
packet = skb_put(skb, pkt_size); packet = skb_put(skb, pkt_size);
...@@ -5754,7 +5752,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) ...@@ -5754,7 +5752,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
bp->mac_addr[5] = (u8) reg; bp->mac_addr[5] = (u8) reg;
bp->tx_ring_size = MAX_TX_DESC_CNT; bp->tx_ring_size = MAX_TX_DESC_CNT;
bnx2_set_rx_ring_size(bp, 100); bnx2_set_rx_ring_size(bp, 255);
bp->rx_csum = 1; bp->rx_csum = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment