aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cpmac.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-09 01:14:38 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-09 01:14:38 -0500
commitbcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch)
tree2f6dffd2d3e4dd67355a224de7e7a960335a92fd /drivers/net/cpmac.c
parent11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff)
parent3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff)
Merge commit 'origin/master' into next
Conflicts: include/linux/kvm.h
Diffstat (limited to 'drivers/net/cpmac.c')
-rw-r--r--drivers/net/cpmac.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index 61f9da2b4943..678222389407 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -380,9 +380,8 @@ static struct sk_buff *cpmac_rx_one(struct cpmac_priv *priv,
380 return NULL; 380 return NULL;
381 } 381 }
382 382
383 skb = netdev_alloc_skb(priv->dev, CPMAC_SKB_SIZE); 383 skb = netdev_alloc_skb_ip_align(priv->dev, CPMAC_SKB_SIZE);
384 if (likely(skb)) { 384 if (likely(skb)) {
385 skb_reserve(skb, 2);
386 skb_put(desc->skb, desc->datalen); 385 skb_put(desc->skb, desc->datalen);
387 desc->skb->protocol = eth_type_trans(desc->skb, priv->dev); 386 desc->skb->protocol = eth_type_trans(desc->skb, priv->dev);
388 desc->skb->ip_summed = CHECKSUM_NONE; 387 desc->skb->ip_summed = CHECKSUM_NONE;
@@ -991,12 +990,11 @@ static int cpmac_open(struct net_device *dev)
991 990
992 priv->rx_head = &priv->desc_ring[CPMAC_QUEUES]; 991 priv->rx_head = &priv->desc_ring[CPMAC_QUEUES];
993 for (i = 0, desc = priv->rx_head; i < priv->ring_size; i++, desc++) { 992 for (i = 0, desc = priv->rx_head; i < priv->ring_size; i++, desc++) {
994 skb = netdev_alloc_skb(dev, CPMAC_SKB_SIZE); 993 skb = netdev_alloc_skb_ip_align(dev, CPMAC_SKB_SIZE);
995 if (unlikely(!skb)) { 994 if (unlikely(!skb)) {
996 res = -ENOMEM; 995 res = -ENOMEM;
997 goto fail_desc; 996 goto fail_desc;
998 } 997 }
999 skb_reserve(skb, 2);
1000 desc->skb = skb; 998 desc->skb = skb;
1001 desc->data_mapping = dma_map_single(&dev->dev, skb->data, 999 desc->data_mapping = dma_map_single(&dev->dev, skb->data,
1002 CPMAC_SKB_SIZE, 1000 CPMAC_SKB_SIZE,