]> err.no Git - linux-2.6/commitdiff
ts108: use netdev_alloc_skb
authorStephen Hemminger <shemminger@vyatta.com>
Wed, 16 Apr 2008 23:37:30 +0000 (16:37 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Sat, 31 May 2008 02:19:21 +0000 (22:19 -0400)
Use netdev_alloc_skb for rx buffer allocation. This sets skb->dev
and can be overriden for NUMA machines.

This device is PowerPC only, so not tested or compiled.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/tsi108_eth.c

index c028facd934604beb418674b7257d04beff04b51..febfaee44fe9474b58c1b3d695fa036940ff74a6 100644 (file)
@@ -803,7 +803,8 @@ static int tsi108_refill_rx(struct net_device *dev, int budget)
                int rx = data->rxhead;
                struct sk_buff *skb;
 
-               data->rxskbs[rx] = skb = dev_alloc_skb(TSI108_RXBUF_SIZE + 2);
+               data->rxskbs[rx] = skb = netdev_alloc_skb(dev,
+                                                         TSI108_RXBUF_SIZE + 2);
                if (!skb)
                        break;
 
@@ -1352,8 +1353,9 @@ static int tsi108_open(struct net_device *dev)
        data->rxhead = 0;
 
        for (i = 0; i < TSI108_RXRING_LEN; i++) {
-               struct sk_buff *skb = dev_alloc_skb(TSI108_RXBUF_SIZE + NET_IP_ALIGN);
+               struct sk_buff *skb;
 
+               skb = netdev_alloc_skb(dev, TSI108_RXBUF_SIZE + NET_IP_ALIGN);
                if (!skb) {
                        /* Bah.  No memory for now, but maybe we'll get
                         * some more later.