aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/packetengines/yellowfin.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/packetengines/yellowfin.c')
-rw-r--r--drivers/net/ethernet/packetengines/yellowfin.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/packetengines/yellowfin.c b/drivers/net/ethernet/packetengines/yellowfin.c
index 4a5774271bd4..7757b80ef924 100644
--- a/drivers/net/ethernet/packetengines/yellowfin.c
+++ b/drivers/net/ethernet/packetengines/yellowfin.c
@@ -743,11 +743,10 @@ static int yellowfin_init_ring(struct net_device *dev)
743 } 743 }
744 744
745 for (i = 0; i < RX_RING_SIZE; i++) { 745 for (i = 0; i < RX_RING_SIZE; i++) {
746 struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz + 2); 746 struct sk_buff *skb = netdev_alloc_skb(dev, yp->rx_buf_sz + 2);
747 yp->rx_skbuff[i] = skb; 747 yp->rx_skbuff[i] = skb;
748 if (skb == NULL) 748 if (skb == NULL)
749 break; 749 break;
750 skb->dev = dev; /* Mark as being used by this device. */
751 skb_reserve(skb, 2); /* 16 byte align the IP header. */ 750 skb_reserve(skb, 2); /* 16 byte align the IP header. */
752 yp->rx_ring[i].addr = cpu_to_le32(pci_map_single(yp->pci_dev, 751 yp->rx_ring[i].addr = cpu_to_le32(pci_map_single(yp->pci_dev,
753 skb->data, yp->rx_buf_sz, PCI_DMA_FROMDEVICE)); 752 skb->data, yp->rx_buf_sz, PCI_DMA_FROMDEVICE));
@@ -1133,7 +1132,7 @@ static int yellowfin_rx(struct net_device *dev)
1133 PCI_DMA_FROMDEVICE); 1132 PCI_DMA_FROMDEVICE);
1134 yp->rx_skbuff[entry] = NULL; 1133 yp->rx_skbuff[entry] = NULL;
1135 } else { 1134 } else {
1136 skb = dev_alloc_skb(pkt_len + 2); 1135 skb = netdev_alloc_skb(dev, pkt_len + 2);
1137 if (skb == NULL) 1136 if (skb == NULL)
1138 break; 1137 break;
1139 skb_reserve(skb, 2); /* 16 byte align the IP header */ 1138 skb_reserve(skb, 2); /* 16 byte align the IP header */
@@ -1156,11 +1155,10 @@ static int yellowfin_rx(struct net_device *dev)
1156 for (; yp->cur_rx - yp->dirty_rx > 0; yp->dirty_rx++) { 1155 for (; yp->cur_rx - yp->dirty_rx > 0; yp->dirty_rx++) {
1157 entry = yp->dirty_rx % RX_RING_SIZE; 1156 entry = yp->dirty_rx % RX_RING_SIZE;
1158 if (yp->rx_skbuff[entry] == NULL) { 1157 if (yp->rx_skbuff[entry] == NULL) {
1159 struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz + 2); 1158 struct sk_buff *skb = netdev_alloc_skb(dev, yp->rx_buf_sz + 2);
1160 if (skb == NULL) 1159 if (skb == NULL)
1161 break; /* Better luck next round. */ 1160 break; /* Better luck next round. */
1162 yp->rx_skbuff[entry] = skb; 1161 yp->rx_skbuff[entry] = skb;
1163 skb->dev = dev; /* Mark as being used by this device. */
1164 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 1162 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
1165 yp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(yp->pci_dev, 1163 yp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(yp->pci_dev,
1166 skb->data, yp->rx_buf_sz, PCI_DMA_FROMDEVICE)); 1164 skb->data, yp->rx_buf_sz, PCI_DMA_FROMDEVICE));