Commit c7d6b7d2 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Jeff Garzik

ts108: use netdev_alloc_skb

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: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 20cbe73c
...@@ -803,7 +803,8 @@ static int tsi108_refill_rx(struct net_device *dev, int budget) ...@@ -803,7 +803,8 @@ static int tsi108_refill_rx(struct net_device *dev, int budget)
int rx = data->rxhead; int rx = data->rxhead;
struct sk_buff *skb; 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) if (!skb)
break; break;
...@@ -1352,8 +1353,9 @@ static int tsi108_open(struct net_device *dev) ...@@ -1352,8 +1353,9 @@ static int tsi108_open(struct net_device *dev)
data->rxhead = 0; data->rxhead = 0;
for (i = 0; i < TSI108_RXRING_LEN; i++) { 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) { if (!skb) {
/* Bah. No memory for now, but maybe we'll get /* Bah. No memory for now, but maybe we'll get
* some more later. * some more later.
......
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