aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tsi108_eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tsi108_eth.c')
-rw-r--r--drivers/net/tsi108_eth.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index 7030bd5e9848..a69c4a48bab9 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -802,13 +802,11 @@ static int tsi108_refill_rx(struct net_device *dev, int budget)
802 int rx = data->rxhead; 802 int rx = data->rxhead;
803 struct sk_buff *skb; 803 struct sk_buff *skb;
804 804
805 data->rxskbs[rx] = skb = netdev_alloc_skb(dev, 805 skb = netdev_alloc_skb_ip_align(dev, TSI108_RXBUF_SIZE);
806 TSI108_RXBUF_SIZE + 2); 806 data->rxskbs[rx] = skb;
807 if (!skb) 807 if (!skb)
808 break; 808 break;
809 809
810 skb_reserve(skb, 2); /* Align the data on a 4-byte boundary. */
811
812 data->rxring[rx].buf0 = dma_map_single(NULL, skb->data, 810 data->rxring[rx].buf0 = dma_map_single(NULL, skb->data,
813 TSI108_RX_SKB_SIZE, 811 TSI108_RX_SKB_SIZE,
814 DMA_FROM_DEVICE); 812 DMA_FROM_DEVICE);
@@ -1356,7 +1354,7 @@ static int tsi108_open(struct net_device *dev)
1356 for (i = 0; i < TSI108_RXRING_LEN; i++) { 1354 for (i = 0; i < TSI108_RXRING_LEN; i++) {
1357 struct sk_buff *skb; 1355 struct sk_buff *skb;
1358 1356
1359 skb = netdev_alloc_skb(dev, TSI108_RXBUF_SIZE + NET_IP_ALIGN); 1357 skb = netdev_alloc_skb_ip_align(dev, TSI108_RXBUF_SIZE);
1360 if (!skb) { 1358 if (!skb) {
1361 /* Bah. No memory for now, but maybe we'll get 1359 /* Bah. No memory for now, but maybe we'll get
1362 * some more later. 1360 * some more later.
@@ -1370,8 +1368,6 @@ static int tsi108_open(struct net_device *dev)
1370 } 1368 }
1371 1369
1372 data->rxskbs[i] = skb; 1370 data->rxskbs[i] = skb;
1373 /* Align the payload on a 4-byte boundary */
1374 skb_reserve(skb, 2);
1375 data->rxskbs[i] = skb; 1371 data->rxskbs[i] = skb;
1376 data->rxring[i].buf0 = virt_to_phys(data->rxskbs[i]->data); 1372 data->rxring[i].buf0 = virt_to_phys(data->rxskbs[i]->data);
1377 data->rxring[i].misc = TSI108_RX_OWN | TSI108_RX_INT; 1373 data->rxring[i].misc = TSI108_RX_OWN | TSI108_RX_INT;