aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPradeep A Dalvi <netdev@pradeepdalvi.com>2012-02-04 21:49:09 -0500
committerDavid S. Miller <davem@davemloft.net>2012-02-06 11:41:20 -0500
commit1d266430546acf01438ae42d0a7370db4817e2ad (patch)
tree149268ba8ad2b3288ae001e5ab28146e4361a6d0
parent3238a9be4d7ad95c741bcfe6c147406eeef62d95 (diff)
netdev: ethernet dev_alloc_skb to netdev_alloc_skb
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/3com/3c501.c2
-rw-r--r--drivers/net/ethernet/3com/3c509.c2
-rw-r--r--drivers/net/ethernet/3com/3c574_cs.c2
-rw-r--r--drivers/net/ethernet/3com/3c589_cs.c2
-rw-r--r--drivers/net/ethernet/3com/3c59x.c5
-rw-r--r--drivers/net/ethernet/3com/typhoon.c5
-rw-r--r--drivers/net/ethernet/8390/axnet_cs.c2
-rw-r--r--drivers/net/ethernet/8390/lib8390.c2
-rw-r--r--drivers/net/ethernet/adaptec/starfire.c8
-rw-r--r--drivers/net/ethernet/aeroflex/greth.c1
-rw-r--r--drivers/net/ethernet/amd/7990.c2
-rw-r--r--drivers/net/ethernet/amd/a2065.c2
-rw-r--r--drivers/net/ethernet/amd/am79c961a.c2
-rw-r--r--drivers/net/ethernet/amd/amd8111e.c6
-rw-r--r--drivers/net/ethernet/amd/ariadne.c2
-rw-r--r--drivers/net/ethernet/amd/atarilance.c2
-rw-r--r--drivers/net/ethernet/amd/au1000_eth.c2
-rw-r--r--drivers/net/ethernet/amd/declance.c2
-rw-r--r--drivers/net/ethernet/amd/depca.c2
-rw-r--r--drivers/net/ethernet/amd/ni65.c2
-rw-r--r--drivers/net/ethernet/amd/nmclan_cs.c2
-rw-r--r--drivers/net/ethernet/amd/pcnet32.c14
-rw-r--r--drivers/net/ethernet/amd/sun3lance.c2
-rw-r--r--drivers/net/ethernet/amd/sunlance.c4
-rw-r--r--drivers/net/ethernet/apple/mace.c4
-rw-r--r--drivers/net/ethernet/apple/macmace.c2
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_main.c2
-rw-r--r--drivers/net/ethernet/cadence/at91_ether.c2
28 files changed, 43 insertions, 44 deletions
diff --git a/drivers/net/ethernet/3com/3c501.c b/drivers/net/ethernet/3com/3c501.c
index 68da81d476f3..bf73e1a02293 100644
--- a/drivers/net/ethernet/3com/3c501.c
+++ b/drivers/net/ethernet/3com/3c501.c
@@ -702,7 +702,7 @@ static void el_receive(struct net_device *dev)
702 */ 702 */
703 703
704 outb(AX_SYS, AX_CMD); 704 outb(AX_SYS, AX_CMD);
705 skb = dev_alloc_skb(pkt_len+2); 705 skb = netdev_alloc_skb(dev, pkt_len + 2);
706 706
707 /* 707 /*
708 * Start of frame 708 * Start of frame
diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index 92053e6fc980..41719da2e178 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -1066,7 +1066,7 @@ el3_rx(struct net_device *dev)
1066 short pkt_len = rx_status & 0x7ff; 1066 short pkt_len = rx_status & 0x7ff;
1067 struct sk_buff *skb; 1067 struct sk_buff *skb;
1068 1068
1069 skb = dev_alloc_skb(pkt_len+5); 1069 skb = netdev_alloc_skb(dev, pkt_len + 5);
1070 if (el3_debug > 4) 1070 if (el3_debug > 4)
1071 pr_debug("Receiving packet size %d status %4.4x.\n", 1071 pr_debug("Receiving packet size %d status %4.4x.\n",
1072 pkt_len, rx_status); 1072 pkt_len, rx_status);
diff --git a/drivers/net/ethernet/3com/3c574_cs.c b/drivers/net/ethernet/3com/3c574_cs.c
index 9c01bc9235b3..e61b2f82ba3a 100644
--- a/drivers/net/ethernet/3com/3c574_cs.c
+++ b/drivers/net/ethernet/3com/3c574_cs.c
@@ -1012,7 +1012,7 @@ static int el3_rx(struct net_device *dev, int worklimit)
1012 short pkt_len = rx_status & 0x7ff; 1012 short pkt_len = rx_status & 0x7ff;
1013 struct sk_buff *skb; 1013 struct sk_buff *skb;
1014 1014
1015 skb = dev_alloc_skb(pkt_len+5); 1015 skb = netdev_alloc_skb(dev, pkt_len + 5);
1016 1016
1017 pr_debug(" Receiving packet size %d status %4.4x.\n", 1017 pr_debug(" Receiving packet size %d status %4.4x.\n",
1018 pkt_len, rx_status); 1018 pkt_len, rx_status);
diff --git a/drivers/net/ethernet/3com/3c589_cs.c b/drivers/net/ethernet/3com/3c589_cs.c
index da410f036869..b23253b9f742 100644
--- a/drivers/net/ethernet/3com/3c589_cs.c
+++ b/drivers/net/ethernet/3com/3c589_cs.c
@@ -819,7 +819,7 @@ static int el3_rx(struct net_device *dev)
819 short pkt_len = rx_status & 0x7ff; 819 short pkt_len = rx_status & 0x7ff;
820 struct sk_buff *skb; 820 struct sk_buff *skb;
821 821
822 skb = dev_alloc_skb(pkt_len+5); 822 skb = netdev_alloc_skb(dev, pkt_len + 5);
823 823
824 netdev_dbg(dev, " Receiving packet size %d status %4.4x.\n", 824 netdev_dbg(dev, " Receiving packet size %d status %4.4x.\n",
825 pkt_len, rx_status); 825 pkt_len, rx_status);
diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index dc51d9218e6d..1282f048dfad 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -2499,7 +2499,7 @@ static int vortex_rx(struct net_device *dev)
2499 int pkt_len = rx_status & 0x1fff; 2499 int pkt_len = rx_status & 0x1fff;
2500 struct sk_buff *skb; 2500 struct sk_buff *skb;
2501 2501
2502 skb = dev_alloc_skb(pkt_len + 5); 2502 skb = netdev_alloc_skb(dev, pkt_len + 5);
2503 if (vortex_debug > 4) 2503 if (vortex_debug > 4)
2504 pr_debug("Receiving packet size %d status %4.4x.\n", 2504 pr_debug("Receiving packet size %d status %4.4x.\n",
2505 pkt_len, rx_status); 2505 pkt_len, rx_status);
@@ -2578,7 +2578,8 @@ boomerang_rx(struct net_device *dev)
2578 2578
2579 /* Check if the packet is long enough to just accept without 2579 /* Check if the packet is long enough to just accept without
2580 copying to a properly sized skbuff. */ 2580 copying to a properly sized skbuff. */
2581 if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { 2581 if (pkt_len < rx_copybreak &&
2582 (skb = netdev_alloc_skb(dev, pkt_len + 2)) != NULL) {
2582 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 2583 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
2583 pci_dma_sync_single_for_cpu(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); 2584 pci_dma_sync_single_for_cpu(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE);
2584 /* 'skb_put()' points to the start of sk_buff data area. */ 2585 /* 'skb_put()' points to the start of sk_buff data area. */
diff --git a/drivers/net/ethernet/3com/typhoon.c b/drivers/net/ethernet/3com/typhoon.c
index 6d6bc754b1a8..f7d622eed203 100644
--- a/drivers/net/ethernet/3com/typhoon.c
+++ b/drivers/net/ethernet/3com/typhoon.c
@@ -1607,7 +1607,7 @@ typhoon_alloc_rx_skb(struct typhoon *tp, u32 idx)
1607 le32_to_cpu(indexes->rxBuffCleared)) 1607 le32_to_cpu(indexes->rxBuffCleared))
1608 return -ENOMEM; 1608 return -ENOMEM;
1609 1609
1610 skb = dev_alloc_skb(PKT_BUF_SZ); 1610 skb = netdev_alloc_skb(tp->dev, PKT_BUF_SZ);
1611 if(!skb) 1611 if(!skb)
1612 return -ENOMEM; 1612 return -ENOMEM;
1613 1613
@@ -1618,7 +1618,6 @@ typhoon_alloc_rx_skb(struct typhoon *tp, u32 idx)
1618 skb_reserve(skb, 2); 1618 skb_reserve(skb, 2);
1619#endif 1619#endif
1620 1620
1621 skb->dev = tp->dev;
1622 dma_addr = pci_map_single(tp->pdev, skb->data, 1621 dma_addr = pci_map_single(tp->pdev, skb->data,
1623 PKT_BUF_SZ, PCI_DMA_FROMDEVICE); 1622 PKT_BUF_SZ, PCI_DMA_FROMDEVICE);
1624 1623
@@ -1673,7 +1672,7 @@ typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile __le32 * read
1673 pkt_len = le16_to_cpu(rx->frameLen); 1672 pkt_len = le16_to_cpu(rx->frameLen);
1674 1673
1675 if(pkt_len < rx_copybreak && 1674 if(pkt_len < rx_copybreak &&
1676 (new_skb = dev_alloc_skb(pkt_len + 2)) != NULL) { 1675 (new_skb = netdev_alloc_skb(tp->dev, pkt_len + 2)) != NULL) {
1677 skb_reserve(new_skb, 2); 1676 skb_reserve(new_skb, 2);
1678 pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, 1677 pci_dma_sync_single_for_cpu(tp->pdev, dma_addr,
1679 PKT_BUF_SZ, 1678 PKT_BUF_SZ,
diff --git a/drivers/net/ethernet/8390/axnet_cs.c b/drivers/net/ethernet/8390/axnet_cs.c
index 5de394368ff3..c5bd8eb7a9f5 100644
--- a/drivers/net/ethernet/8390/axnet_cs.c
+++ b/drivers/net/ethernet/8390/axnet_cs.c
@@ -1408,7 +1408,7 @@ static void ei_receive(struct net_device *dev)
1408 { 1408 {
1409 struct sk_buff *skb; 1409 struct sk_buff *skb;
1410 1410
1411 skb = dev_alloc_skb(pkt_len+2); 1411 skb = netdev_alloc_skb(dev, pkt_len + 2);
1412 if (skb == NULL) 1412 if (skb == NULL)
1413 { 1413 {
1414 if (ei_debug > 1) 1414 if (ei_debug > 1)
diff --git a/drivers/net/ethernet/8390/lib8390.c b/drivers/net/ethernet/8390/lib8390.c
index 05ae21435bfd..e77f624e8194 100644
--- a/drivers/net/ethernet/8390/lib8390.c
+++ b/drivers/net/ethernet/8390/lib8390.c
@@ -717,7 +717,7 @@ static void ei_receive(struct net_device *dev)
717 } else if ((pkt_stat & 0x0F) == ENRSR_RXOK) { 717 } else if ((pkt_stat & 0x0F) == ENRSR_RXOK) {
718 struct sk_buff *skb; 718 struct sk_buff *skb;
719 719
720 skb = dev_alloc_skb(pkt_len+2); 720 skb = netdev_alloc_skb(dev, pkt_len + 2);
721 if (skb == NULL) { 721 if (skb == NULL) {
722 if (ei_debug > 1) 722 if (ei_debug > 1)
723 netdev_dbg(dev, "Couldn't allocate a sk_buff of size %d\n", 723 netdev_dbg(dev, "Couldn't allocate a sk_buff of size %d\n",
diff --git a/drivers/net/ethernet/adaptec/starfire.c b/drivers/net/ethernet/adaptec/starfire.c
index 11fc2eccb0fd..d896816512ca 100644
--- a/drivers/net/ethernet/adaptec/starfire.c
+++ b/drivers/net/ethernet/adaptec/starfire.c
@@ -1179,12 +1179,11 @@ static void init_ring(struct net_device *dev)
1179 1179
1180 /* Fill in the Rx buffers. Handle allocation failure gracefully. */ 1180 /* Fill in the Rx buffers. Handle allocation failure gracefully. */
1181 for (i = 0; i < RX_RING_SIZE; i++) { 1181 for (i = 0; i < RX_RING_SIZE; i++) {
1182 struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz); 1182 struct sk_buff *skb = netdev_alloc_skb(dev, np->rx_buf_sz);
1183 np->rx_info[i].skb = skb; 1183 np->rx_info[i].skb = skb;
1184 if (skb == NULL) 1184 if (skb == NULL)
1185 break; 1185 break;
1186 np->rx_info[i].mapping = pci_map_single(np->pci_dev, skb->data, np->rx_buf_sz, PCI_DMA_FROMDEVICE); 1186 np->rx_info[i].mapping = pci_map_single(np->pci_dev, skb->data, np->rx_buf_sz, PCI_DMA_FROMDEVICE);
1187 skb->dev = dev; /* Mark as being used by this device. */
1188 /* Grrr, we cannot offset to correctly align the IP header. */ 1187 /* Grrr, we cannot offset to correctly align the IP header. */
1189 np->rx_ring[i].rxaddr = cpu_to_dma(np->rx_info[i].mapping | RxDescValid); 1188 np->rx_ring[i].rxaddr = cpu_to_dma(np->rx_info[i].mapping | RxDescValid);
1190 } 1189 }
@@ -1472,7 +1471,7 @@ static int __netdev_rx(struct net_device *dev, int *quota)
1472 /* Check if the packet is long enough to accept without copying 1471 /* Check if the packet is long enough to accept without copying
1473 to a minimally-sized skbuff. */ 1472 to a minimally-sized skbuff. */
1474 if (pkt_len < rx_copybreak && 1473 if (pkt_len < rx_copybreak &&
1475 (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { 1474 (skb = netdev_alloc_skb(dev, pkt_len + 2)) != NULL) {
1476 skb_reserve(skb, 2); /* 16 byte align the IP header */ 1475 skb_reserve(skb, 2); /* 16 byte align the IP header */
1477 pci_dma_sync_single_for_cpu(np->pci_dev, 1476 pci_dma_sync_single_for_cpu(np->pci_dev,
1478 np->rx_info[entry].mapping, 1477 np->rx_info[entry].mapping,
@@ -1596,13 +1595,12 @@ static void refill_rx_ring(struct net_device *dev)
1596 for (; np->cur_rx - np->dirty_rx > 0; np->dirty_rx++) { 1595 for (; np->cur_rx - np->dirty_rx > 0; np->dirty_rx++) {
1597 entry = np->dirty_rx % RX_RING_SIZE; 1596 entry = np->dirty_rx % RX_RING_SIZE;
1598 if (np->rx_info[entry].skb == NULL) { 1597 if (np->rx_info[entry].skb == NULL) {
1599 skb = dev_alloc_skb(np->rx_buf_sz); 1598 skb = netdev_alloc_skb(dev, np->rx_buf_sz);
1600 np->rx_info[entry].skb = skb; 1599 np->rx_info[entry].skb = skb;
1601 if (skb == NULL) 1600 if (skb == NULL)
1602 break; /* Better luck next round. */ 1601 break; /* Better luck next round. */
1603 np->rx_info[entry].mapping = 1602 np->rx_info[entry].mapping =
1604 pci_map_single(np->pci_dev, skb->data, np->rx_buf_sz, PCI_DMA_FROMDEVICE); 1603 pci_map_single(np->pci_dev, skb->data, np->rx_buf_sz, PCI_DMA_FROMDEVICE);
1605 skb->dev = dev; /* Mark as being used by this device. */
1606 np->rx_ring[entry].rxaddr = 1604 np->rx_ring[entry].rxaddr =
1607 cpu_to_dma(np->rx_info[entry].mapping | RxDescValid); 1605 cpu_to_dma(np->rx_info[entry].mapping | RxDescValid);
1608 } 1606 }
diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c
index c885aa905dec..b23751e683c8 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -785,7 +785,6 @@ static int greth_rx(struct net_device *dev, int limit)
785 785
786 } else { 786 } else {
787 skb_reserve(skb, NET_IP_ALIGN); 787 skb_reserve(skb, NET_IP_ALIGN);
788 skb->dev = dev;
789 788
790 dma_sync_single_for_cpu(greth->dev, 789 dma_sync_single_for_cpu(greth->dev,
791 dma_addr, 790 dma_addr,
diff --git a/drivers/net/ethernet/amd/7990.c b/drivers/net/ethernet/amd/7990.c
index 60b35fb5f524..1b046f58d58f 100644
--- a/drivers/net/ethernet/amd/7990.c
+++ b/drivers/net/ethernet/amd/7990.c
@@ -316,7 +316,7 @@ static int lance_rx (struct net_device *dev)
316 if (bits & LE_R1_EOP) dev->stats.rx_errors++; 316 if (bits & LE_R1_EOP) dev->stats.rx_errors++;
317 } else { 317 } else {
318 int len = (rd->mblength & 0xfff) - 4; 318 int len = (rd->mblength & 0xfff) - 4;
319 struct sk_buff *skb = dev_alloc_skb (len+2); 319 struct sk_buff *skb = netdev_alloc_skb(dev, len + 2);
320 320
321 if (!skb) { 321 if (!skb) {
322 printk ("%s: Memory squeeze, deferring packet.\n", 322 printk ("%s: Memory squeeze, deferring packet.\n",
diff --git a/drivers/net/ethernet/amd/a2065.c b/drivers/net/ethernet/amd/a2065.c
index 825e5d4ef4c3..689dfcafc6d4 100644
--- a/drivers/net/ethernet/amd/a2065.c
+++ b/drivers/net/ethernet/amd/a2065.c
@@ -290,7 +290,7 @@ static int lance_rx(struct net_device *dev)
290 dev->stats.rx_errors++; 290 dev->stats.rx_errors++;
291 } else { 291 } else {
292 int len = (rd->mblength & 0xfff) - 4; 292 int len = (rd->mblength & 0xfff) - 4;
293 struct sk_buff *skb = dev_alloc_skb(len + 2); 293 struct sk_buff *skb = netdev_alloc_skb(dev, len + 2);
294 294
295 if (!skb) { 295 if (!skb) {
296 netdev_warn(dev, "Memory squeeze, deferring packet\n"); 296 netdev_warn(dev, "Memory squeeze, deferring packet\n");
diff --git a/drivers/net/ethernet/amd/am79c961a.c b/drivers/net/ethernet/amd/am79c961a.c
index 216ae87b9459..cc7b9e46780c 100644
--- a/drivers/net/ethernet/amd/am79c961a.c
+++ b/drivers/net/ethernet/amd/am79c961a.c
@@ -516,7 +516,7 @@ am79c961_rx(struct net_device *dev, struct dev_priv *priv)
516 } 516 }
517 517
518 len = am_readword(dev, hdraddr + 6); 518 len = am_readword(dev, hdraddr + 6);
519 skb = dev_alloc_skb(len + 2); 519 skb = netdev_alloc_skb(dev, len + 2);
520 520
521 if (skb) { 521 if (skb) {
522 skb_reserve(skb, 2); 522 skb_reserve(skb, 2);
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
index b8306a589558..9f62504d0086 100644
--- a/drivers/net/ethernet/amd/amd8111e.c
+++ b/drivers/net/ethernet/amd/amd8111e.c
@@ -336,7 +336,8 @@ static int amd8111e_init_ring(struct net_device *dev)
336 /* Allocating receive skbs */ 336 /* Allocating receive skbs */
337 for (i = 0; i < NUM_RX_BUFFERS; i++) { 337 for (i = 0; i < NUM_RX_BUFFERS; i++) {
338 338
339 if (!(lp->rx_skbuff[i] = dev_alloc_skb(lp->rx_buff_len))) { 339 lp->rx_skbuff[i] = netdev_alloc_skb(dev, lp->rx_buff_len);
340 if (!lp->rx_skbuff[i]) {
340 /* Release previos allocated skbs */ 341 /* Release previos allocated skbs */
341 for(--i; i >= 0 ;i--) 342 for(--i; i >= 0 ;i--)
342 dev_kfree_skb(lp->rx_skbuff[i]); 343 dev_kfree_skb(lp->rx_skbuff[i]);
@@ -768,7 +769,8 @@ static int amd8111e_rx_poll(struct napi_struct *napi, int budget)
768 } 769 }
769 if(--rx_pkt_limit < 0) 770 if(--rx_pkt_limit < 0)
770 goto rx_not_empty; 771 goto rx_not_empty;
771 if(!(new_skb = dev_alloc_skb(lp->rx_buff_len))){ 772 new_skb = netdev_alloc_skb(dev, lp->rx_buff_len);
773 if (!new_skb) {
772 /* if allocation fail, 774 /* if allocation fail,
773 ignore that pkt and go to next one */ 775 ignore that pkt and go to next one */
774 lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; 776 lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS;
diff --git a/drivers/net/ethernet/amd/ariadne.c b/drivers/net/ethernet/amd/ariadne.c
index eb18e1fe65c8..f4c228e4d76c 100644
--- a/drivers/net/ethernet/amd/ariadne.c
+++ b/drivers/net/ethernet/amd/ariadne.c
@@ -191,7 +191,7 @@ static int ariadne_rx(struct net_device *dev)
191 short pkt_len = swapw(priv->rx_ring[entry]->RMD3); 191 short pkt_len = swapw(priv->rx_ring[entry]->RMD3);
192 struct sk_buff *skb; 192 struct sk_buff *skb;
193 193
194 skb = dev_alloc_skb(pkt_len + 2); 194 skb = netdev_alloc_skb(dev, pkt_len + 2);
195 if (skb == NULL) { 195 if (skb == NULL) {
196 netdev_warn(dev, "Memory squeeze, deferring packet\n"); 196 netdev_warn(dev, "Memory squeeze, deferring packet\n");
197 for (i = 0; i < RX_RING_SIZE; i++) 197 for (i = 0; i < RX_RING_SIZE; i++)
diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c
index 15bfa28d6c53..70ed79c46245 100644
--- a/drivers/net/ethernet/amd/atarilance.c
+++ b/drivers/net/ethernet/amd/atarilance.c
@@ -997,7 +997,7 @@ static int lance_rx( struct net_device *dev )
997 dev->stats.rx_errors++; 997 dev->stats.rx_errors++;
998 } 998 }
999 else { 999 else {
1000 skb = dev_alloc_skb( pkt_len+2 ); 1000 skb = netdev_alloc_skb(dev, pkt_len + 2);
1001 if (skb == NULL) { 1001 if (skb == NULL) {
1002 DPRINTK( 1, ( "%s: Memory squeeze, deferring packet.\n", 1002 DPRINTK( 1, ( "%s: Memory squeeze, deferring packet.\n",
1003 dev->name )); 1003 dev->name ));
diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c
index a81c871aeacf..c1dfdc8b7079 100644
--- a/drivers/net/ethernet/amd/au1000_eth.c
+++ b/drivers/net/ethernet/amd/au1000_eth.c
@@ -725,7 +725,7 @@ static int au1000_rx(struct net_device *dev)
725 /* good frame */ 725 /* good frame */
726 frmlen = (status & RX_FRAME_LEN_MASK); 726 frmlen = (status & RX_FRAME_LEN_MASK);
727 frmlen -= 4; /* Remove FCS */ 727 frmlen -= 4; /* Remove FCS */
728 skb = dev_alloc_skb(frmlen + 2); 728 skb = netdev_alloc_skb(dev, frmlen + 2);
729 if (skb == NULL) { 729 if (skb == NULL) {
730 netdev_err(dev, "Memory squeeze, dropping packet.\n"); 730 netdev_err(dev, "Memory squeeze, dropping packet.\n");
731 dev->stats.rx_dropped++; 731 dev->stats.rx_dropped++;
diff --git a/drivers/net/ethernet/amd/declance.c b/drivers/net/ethernet/amd/declance.c
index dd82ee2f8d21..7dc508e5c72e 100644
--- a/drivers/net/ethernet/amd/declance.c
+++ b/drivers/net/ethernet/amd/declance.c
@@ -605,7 +605,7 @@ static int lance_rx(struct net_device *dev)
605 dev->stats.rx_errors++; 605 dev->stats.rx_errors++;
606 } else { 606 } else {
607 len = (*rds_ptr(rd, mblength, lp->type) & 0xfff) - 4; 607 len = (*rds_ptr(rd, mblength, lp->type) & 0xfff) - 4;
608 skb = dev_alloc_skb(len + 2); 608 skb = netdev_alloc_skb(dev, len + 2);
609 609
610 if (skb == 0) { 610 if (skb == 0) {
611 printk("%s: Memory squeeze, deferring packet.\n", 611 printk("%s: Memory squeeze, deferring packet.\n",
diff --git a/drivers/net/ethernet/amd/depca.c b/drivers/net/ethernet/amd/depca.c
index 681970c07f22..86dd95766a64 100644
--- a/drivers/net/ethernet/amd/depca.c
+++ b/drivers/net/ethernet/amd/depca.c
@@ -1042,7 +1042,7 @@ static int depca_rx(struct net_device *dev)
1042 short len, pkt_len = readw(&lp->rx_ring[entry].msg_length) - 4; 1042 short len, pkt_len = readw(&lp->rx_ring[entry].msg_length) - 4;
1043 struct sk_buff *skb; 1043 struct sk_buff *skb;
1044 1044
1045 skb = dev_alloc_skb(pkt_len + 2); 1045 skb = netdev_alloc_skb(dev, pkt_len + 2);
1046 if (skb != NULL) { 1046 if (skb != NULL) {
1047 unsigned char *buf; 1047 unsigned char *buf;
1048 skb_reserve(skb, 2); /* 16 byte align the IP header */ 1048 skb_reserve(skb, 2); /* 16 byte align the IP header */
diff --git a/drivers/net/ethernet/amd/ni65.c b/drivers/net/ethernet/amd/ni65.c
index 735c213798b1..013b65108536 100644
--- a/drivers/net/ethernet/amd/ni65.c
+++ b/drivers/net/ethernet/amd/ni65.c
@@ -1089,7 +1089,7 @@ static void ni65_recv_intr(struct net_device *dev,int csr0)
1089 if (skb) 1089 if (skb)
1090 skb_reserve(skb,16); 1090 skb_reserve(skb,16);
1091#else 1091#else
1092 struct sk_buff *skb = dev_alloc_skb(len+2); 1092 struct sk_buff *skb = netdev_alloc_skb(dev, len + 2);
1093#endif 1093#endif
1094 if(skb) 1094 if(skb)
1095 { 1095 {
diff --git a/drivers/net/ethernet/amd/nmclan_cs.c b/drivers/net/ethernet/amd/nmclan_cs.c
index 6be0dd67631a..ebdb9e238a8d 100644
--- a/drivers/net/ethernet/amd/nmclan_cs.c
+++ b/drivers/net/ethernet/amd/nmclan_cs.c
@@ -1104,7 +1104,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt)
1104 pr_debug(" receiving packet size 0x%X rx_status" 1104 pr_debug(" receiving packet size 0x%X rx_status"
1105 " 0x%X.\n", pkt_len, rx_status); 1105 " 0x%X.\n", pkt_len, rx_status);
1106 1106
1107 skb = dev_alloc_skb(pkt_len+2); 1107 skb = netdev_alloc_skb(dev, pkt_len + 2);
1108 1108
1109 if (skb != NULL) { 1109 if (skb != NULL) {
1110 skb_reserve(skb, 2); 1110 skb_reserve(skb, 2);
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index 1bb388f62e5b..86b6d8e4e6cd 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -588,11 +588,11 @@ static void pcnet32_realloc_rx_ring(struct net_device *dev,
588 /* now allocate any new buffers needed */ 588 /* now allocate any new buffers needed */
589 for (; new < size; new++) { 589 for (; new < size; new++) {
590 struct sk_buff *rx_skbuff; 590 struct sk_buff *rx_skbuff;
591 new_skb_list[new] = dev_alloc_skb(PKT_BUF_SKB); 591 new_skb_list[new] = netdev_alloc_skb(dev, PKT_BUF_SKB);
592 rx_skbuff = new_skb_list[new]; 592 rx_skbuff = new_skb_list[new];
593 if (!rx_skbuff) { 593 if (!rx_skbuff) {
594 /* keep the original lists and buffers */ 594 /* keep the original lists and buffers */
595 netif_err(lp, drv, dev, "%s dev_alloc_skb failed\n", 595 netif_err(lp, drv, dev, "%s netdev_alloc_skb failed\n",
596 __func__); 596 __func__);
597 goto free_all_new; 597 goto free_all_new;
598 } 598 }
@@ -909,7 +909,7 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
909 /* Initialize Transmit buffers. */ 909 /* Initialize Transmit buffers. */
910 size = data_len + 15; 910 size = data_len + 15;
911 for (x = 0; x < numbuffs; x++) { 911 for (x = 0; x < numbuffs; x++) {
912 skb = dev_alloc_skb(size); 912 skb = netdev_alloc_skb(dev, size);
913 if (!skb) { 913 if (!skb) {
914 netif_printk(lp, hw, KERN_DEBUG, dev, 914 netif_printk(lp, hw, KERN_DEBUG, dev,
915 "Cannot allocate skb at line: %d!\n", 915 "Cannot allocate skb at line: %d!\n",
@@ -1152,7 +1152,7 @@ static void pcnet32_rx_entry(struct net_device *dev,
1152 if (pkt_len > rx_copybreak) { 1152 if (pkt_len > rx_copybreak) {
1153 struct sk_buff *newskb; 1153 struct sk_buff *newskb;
1154 1154
1155 newskb = dev_alloc_skb(PKT_BUF_SKB); 1155 newskb = netdev_alloc_skb(dev, PKT_BUF_SKB);
1156 if (newskb) { 1156 if (newskb) {
1157 skb_reserve(newskb, NET_IP_ALIGN); 1157 skb_reserve(newskb, NET_IP_ALIGN);
1158 skb = lp->rx_skbuff[entry]; 1158 skb = lp->rx_skbuff[entry];
@@ -1172,7 +1172,7 @@ static void pcnet32_rx_entry(struct net_device *dev,
1172 } else 1172 } else
1173 skb = NULL; 1173 skb = NULL;
1174 } else 1174 } else
1175 skb = dev_alloc_skb(pkt_len + NET_IP_ALIGN); 1175 skb = netdev_alloc_skb(dev, pkt_len + NET_IP_ALIGN);
1176 1176
1177 if (skb == NULL) { 1177 if (skb == NULL) {
1178 netif_err(lp, drv, dev, "Memory squeeze, dropping packet\n"); 1178 netif_err(lp, drv, dev, "Memory squeeze, dropping packet\n");
@@ -2271,11 +2271,11 @@ static int pcnet32_init_ring(struct net_device *dev)
2271 for (i = 0; i < lp->rx_ring_size; i++) { 2271 for (i = 0; i < lp->rx_ring_size; i++) {
2272 struct sk_buff *rx_skbuff = lp->rx_skbuff[i]; 2272 struct sk_buff *rx_skbuff = lp->rx_skbuff[i];
2273 if (rx_skbuff == NULL) { 2273 if (rx_skbuff == NULL) {
2274 lp->rx_skbuff[i] = dev_alloc_skb(PKT_BUF_SKB); 2274 lp->rx_skbuff[i] = netdev_alloc_skb(dev, PKT_BUF_SKB);
2275 rx_skbuff = lp->rx_skbuff[i]; 2275 rx_skbuff = lp->rx_skbuff[i];
2276 if (!rx_skbuff) { 2276 if (!rx_skbuff) {
2277 /* there is not much we can do at this point */ 2277 /* there is not much we can do at this point */
2278 netif_err(lp, drv, dev, "%s dev_alloc_skb failed\n", 2278 netif_err(lp, drv, dev, "%s netdev_alloc_skb failed\n",
2279 __func__); 2279 __func__);
2280 return -1; 2280 return -1;
2281 } 2281 }
diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c
index 080b71fcc683..74b3891b6483 100644
--- a/drivers/net/ethernet/amd/sun3lance.c
+++ b/drivers/net/ethernet/amd/sun3lance.c
@@ -810,7 +810,7 @@ static int lance_rx( struct net_device *dev )
810 dev->stats.rx_errors++; 810 dev->stats.rx_errors++;
811 } 811 }
812 else { 812 else {
813 skb = dev_alloc_skb( pkt_len+2 ); 813 skb = netdev_alloc_skb(dev, pkt_len + 2);
814 if (skb == NULL) { 814 if (skb == NULL) {
815 DPRINTK( 1, ( "%s: Memory squeeze, deferring packet.\n", 815 DPRINTK( 1, ( "%s: Memory squeeze, deferring packet.\n",
816 dev->name )); 816 dev->name ));
diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c
index 7ea16d32a5f5..e3fe3504e198 100644
--- a/drivers/net/ethernet/amd/sunlance.c
+++ b/drivers/net/ethernet/amd/sunlance.c
@@ -534,7 +534,7 @@ static void lance_rx_dvma(struct net_device *dev)
534 if (bits & LE_R1_EOP) dev->stats.rx_errors++; 534 if (bits & LE_R1_EOP) dev->stats.rx_errors++;
535 } else { 535 } else {
536 len = (rd->mblength & 0xfff) - 4; 536 len = (rd->mblength & 0xfff) - 4;
537 skb = dev_alloc_skb(len + 2); 537 skb = netdev_alloc_skb(dev, len + 2);
538 538
539 if (skb == NULL) { 539 if (skb == NULL) {
540 printk(KERN_INFO "%s: Memory squeeze, deferring packet.\n", 540 printk(KERN_INFO "%s: Memory squeeze, deferring packet.\n",
@@ -706,7 +706,7 @@ static void lance_rx_pio(struct net_device *dev)
706 if (bits & LE_R1_EOP) dev->stats.rx_errors++; 706 if (bits & LE_R1_EOP) dev->stats.rx_errors++;
707 } else { 707 } else {
708 len = (sbus_readw(&rd->mblength) & 0xfff) - 4; 708 len = (sbus_readw(&rd->mblength) & 0xfff) - 4;
709 skb = dev_alloc_skb(len + 2); 709 skb = netdev_alloc_skb(dev, len + 2);
710 710
711 if (skb == NULL) { 711 if (skb == NULL) {
712 printk(KERN_INFO "%s: Memory squeeze, deferring packet.\n", 712 printk(KERN_INFO "%s: Memory squeeze, deferring packet.\n",
diff --git a/drivers/net/ethernet/apple/mace.c b/drivers/net/ethernet/apple/mace.c
index bd5555dbe027..06998462e0d3 100644
--- a/drivers/net/ethernet/apple/mace.c
+++ b/drivers/net/ethernet/apple/mace.c
@@ -444,7 +444,7 @@ static int mace_open(struct net_device *dev)
444 memset((char *)mp->rx_cmds, 0, N_RX_RING * sizeof(struct dbdma_cmd)); 444 memset((char *)mp->rx_cmds, 0, N_RX_RING * sizeof(struct dbdma_cmd));
445 cp = mp->rx_cmds; 445 cp = mp->rx_cmds;
446 for (i = 0; i < N_RX_RING - 1; ++i) { 446 for (i = 0; i < N_RX_RING - 1; ++i) {
447 skb = dev_alloc_skb(RX_BUFLEN + 2); 447 skb = netdev_alloc_skb(dev, RX_BUFLEN + 2);
448 if (!skb) { 448 if (!skb) {
449 data = dummy_buf; 449 data = dummy_buf;
450 } else { 450 } else {
@@ -956,7 +956,7 @@ static irqreturn_t mace_rxdma_intr(int irq, void *dev_id)
956 cp = mp->rx_cmds + i; 956 cp = mp->rx_cmds + i;
957 skb = mp->rx_bufs[i]; 957 skb = mp->rx_bufs[i];
958 if (!skb) { 958 if (!skb) {
959 skb = dev_alloc_skb(RX_BUFLEN + 2); 959 skb = netdev_alloc_skb(RX_BUFLEN + 2);
960 if (skb) { 960 if (skb) {
961 skb_reserve(skb, 2); 961 skb_reserve(skb, 2);
962 mp->rx_bufs[i] = skb; 962 mp->rx_bufs[i] = skb;
diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index 7cf81bbffe0e..ab7ff8645ab1 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -661,7 +661,7 @@ static void mace_dma_rx_frame(struct net_device *dev, struct mace_frame *mf)
661 } else { 661 } else {
662 unsigned int frame_length = mf->rcvcnt + ((frame_status & 0x0F) << 8 ); 662 unsigned int frame_length = mf->rcvcnt + ((frame_status & 0x0F) << 8 );
663 663
664 skb = dev_alloc_skb(frame_length + 2); 664 skb = netdev_alloc_skb(dev, frame_length + 2);
665 if (!skb) { 665 if (!skb) {
666 dev->stats.rx_dropped++; 666 dev->stats.rx_dropped++;
667 return; 667 return;
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 7ee4aacb01a4..2c8ed70704aa 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -1765,7 +1765,7 @@ static int atl1c_alloc_rx_buffer(struct atl1c_adapter *adapter, const int ringid
1765 while (next_info->flags & ATL1C_BUFFER_FREE) { 1765 while (next_info->flags & ATL1C_BUFFER_FREE) {
1766 rfd_desc = ATL1C_RFD_DESC(rfd_ring, rfd_next_to_use); 1766 rfd_desc = ATL1C_RFD_DESC(rfd_ring, rfd_next_to_use);
1767 1767
1768 skb = dev_alloc_skb(adapter->rx_buffer_len); 1768 skb = netdev_alloc_skb(adapter->netdev, adapter->rx_buffer_len);
1769 if (unlikely(!skb)) { 1769 if (unlikely(!skb)) {
1770 if (netif_msg_rx_err(adapter)) 1770 if (netif_msg_rx_err(adapter))
1771 dev_warn(&pdev->dev, "alloc rx buffer failed\n"); 1771 dev_warn(&pdev->dev, "alloc rx buffer failed\n");
diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c
index 1a5b6efa0120..906117016fc4 100644
--- a/drivers/net/ethernet/cadence/at91_ether.c
+++ b/drivers/net/ethernet/cadence/at91_ether.c
@@ -886,7 +886,7 @@ static void at91ether_rx(struct net_device *dev)
886 while (dlist->descriptors[lp->rxBuffIndex].addr & EMAC_DESC_DONE) { 886 while (dlist->descriptors[lp->rxBuffIndex].addr & EMAC_DESC_DONE) {
887 p_recv = dlist->recv_buf[lp->rxBuffIndex]; 887 p_recv = dlist->recv_buf[lp->rxBuffIndex];
888 pktlen = dlist->descriptors[lp->rxBuffIndex].size & 0x7ff; /* Length of frame including FCS */ 888 pktlen = dlist->descriptors[lp->rxBuffIndex].size & 0x7ff; /* Length of frame including FCS */
889 skb = dev_alloc_skb(pktlen + 2); 889 skb = netdev_alloc_skb(dev, pktlen + 2);
890 if (skb != NULL) { 890 if (skb != NULL) {
891 skb_reserve(skb, 2); 891 skb_reserve(skb, 2);
892 memcpy(skb_put(skb, pktlen), p_recv, pktlen); 892 memcpy(skb_put(skb, pktlen), p_recv, pktlen);