aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/acenic.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index 4ae750ef1e10..e52cc3b71693 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -2077,18 +2077,16 @@ static inline void ace_tx_int(struct net_device *dev,
2077 2077
2078 do { 2078 do {
2079 struct sk_buff *skb; 2079 struct sk_buff *skb;
2080 dma_addr_t mapping;
2081 struct tx_ring_info *info; 2080 struct tx_ring_info *info;
2082 2081
2083 info = ap->skb->tx_skbuff + idx; 2082 info = ap->skb->tx_skbuff + idx;
2084 skb = info->skb; 2083 skb = info->skb;
2085 mapping = pci_unmap_addr(info, mapping);
2086 2084
2087 if (mapping) { 2085 if (dma_unmap_len(info, maplen)) {
2088 pci_unmap_page(ap->pdev, mapping, 2086 pci_unmap_page(ap->pdev, dma_unmap_addr(info, mapping),
2089 pci_unmap_len(info, maplen), 2087 pci_unmap_len(info, maplen),
2090 PCI_DMA_TODEVICE); 2088 PCI_DMA_TODEVICE);
2091 pci_unmap_addr_set(info, mapping, 0); 2089 dma_unmap_len_set(info, maplen, 0);
2092 } 2090 }
2093 2091
2094 if (skb) { 2092 if (skb) {
@@ -2376,14 +2374,12 @@ static int ace_close(struct net_device *dev)
2376 2374
2377 for (i = 0; i < ACE_TX_RING_ENTRIES(ap); i++) { 2375 for (i = 0; i < ACE_TX_RING_ENTRIES(ap); i++) {
2378 struct sk_buff *skb; 2376 struct sk_buff *skb;
2379 dma_addr_t mapping;
2380 struct tx_ring_info *info; 2377 struct tx_ring_info *info;
2381 2378
2382 info = ap->skb->tx_skbuff + i; 2379 info = ap->skb->tx_skbuff + i;
2383 skb = info->skb; 2380 skb = info->skb;
2384 mapping = pci_unmap_addr(info, mapping);
2385 2381
2386 if (mapping) { 2382 if (dma_unmap_len(info, maplen)) {
2387 if (ACE_IS_TIGON_I(ap)) { 2383 if (ACE_IS_TIGON_I(ap)) {
2388 /* NB: TIGON_1 is special, tx_ring is in io space */ 2384 /* NB: TIGON_1 is special, tx_ring is in io space */
2389 struct tx_desc __iomem *tx; 2385 struct tx_desc __iomem *tx;
@@ -2394,10 +2390,10 @@ static int ace_close(struct net_device *dev)
2394 } else 2390 } else
2395 memset(ap->tx_ring + i, 0, 2391 memset(ap->tx_ring + i, 0,
2396 sizeof(struct tx_desc)); 2392 sizeof(struct tx_desc));
2397 pci_unmap_page(ap->pdev, mapping, 2393 pci_unmap_page(ap->pdev, dma_unmap_addr(info, mapping),
2398 pci_unmap_len(info, maplen), 2394 pci_unmap_len(info, maplen),
2399 PCI_DMA_TODEVICE); 2395 PCI_DMA_TODEVICE);
2400 pci_unmap_addr_set(info, mapping, 0); 2396 dma_unmap_len_set(info, maplen, 0);
2401 } 2397 }
2402 if (skb) { 2398 if (skb) {
2403 dev_kfree_skb(skb); 2399 dev_kfree_skb(skb);