Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193906
b: refs/heads/master
c: 07e7de8
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and David S. Miller committed Apr 2, 2010
1 parent 860c84e commit e6114d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c57990696a16ae43ea9fddb131b2784292068ba
refs/heads/master: 07e7de8f7a7146b3ac77c52ebd91c93a8370d9a8
16 changes: 6 additions & 10 deletions trunk/drivers/net/acenic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2077,18 +2077,16 @@ static inline void ace_tx_int(struct net_device *dev,

do {
struct sk_buff *skb;
dma_addr_t mapping;
struct tx_ring_info *info;

info = ap->skb->tx_skbuff + idx;
skb = info->skb;
mapping = pci_unmap_addr(info, mapping);

if (mapping) {
pci_unmap_page(ap->pdev, mapping,
if (dma_unmap_len(info, maplen)) {
pci_unmap_page(ap->pdev, dma_unmap_addr(info, mapping),
pci_unmap_len(info, maplen),
PCI_DMA_TODEVICE);
pci_unmap_addr_set(info, mapping, 0);
dma_unmap_len_set(info, maplen, 0);
}

if (skb) {
Expand Down Expand Up @@ -2376,14 +2374,12 @@ static int ace_close(struct net_device *dev)

for (i = 0; i < ACE_TX_RING_ENTRIES(ap); i++) {
struct sk_buff *skb;
dma_addr_t mapping;
struct tx_ring_info *info;

info = ap->skb->tx_skbuff + i;
skb = info->skb;
mapping = pci_unmap_addr(info, mapping);

if (mapping) {
if (dma_unmap_len(info, maplen)) {
if (ACE_IS_TIGON_I(ap)) {
/* NB: TIGON_1 is special, tx_ring is in io space */
struct tx_desc __iomem *tx;
Expand All @@ -2394,10 +2390,10 @@ static int ace_close(struct net_device *dev)
} else
memset(ap->tx_ring + i, 0,
sizeof(struct tx_desc));
pci_unmap_page(ap->pdev, mapping,
pci_unmap_page(ap->pdev, dma_unmap_addr(info, mapping),
pci_unmap_len(info, maplen),
PCI_DMA_TODEVICE);
pci_unmap_addr_set(info, mapping, 0);
dma_unmap_len_set(info, maplen, 0);
}
if (skb) {
dev_kfree_skb(skb);
Expand Down

0 comments on commit e6114d0

Please sign in to comment.