diff options
author | Jie Yang <jie.yang@atheros.com> | 2009-09-17 13:27:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-17 13:27:28 -0400 |
commit | 03f18991614cba1fa5be5dcd1a79b0e30ac44c50 (patch) | |
tree | 2b01d55c9c106d391c0ce9f01c9a6d240672ec81 /drivers/net/atl1e/atl1e.h | |
parent | a19d2158439d6fba8160d7d2446f233f525f09e7 (diff) |
atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
use the wrong API when free dma. So when map dma use a flag to
demostrate whether it is 'pci_map_single' or 'pci_map_page'. When free
the dma, check the flags to select the right APIs('pci_unmap_single'
or 'pci_unmap_page').
set the flags type to u16 instead of unsigned long on David's comments.
Signed-off-by: Jie Yang <jie.yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/atl1e/atl1e.h')
-rw-r--r-- | drivers/net/atl1e/atl1e.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/atl1e/atl1e.h b/drivers/net/atl1e/atl1e.h index ba48220df16a..490d3b38e0cb 100644 --- a/drivers/net/atl1e/atl1e.h +++ b/drivers/net/atl1e/atl1e.h | |||
@@ -377,10 +377,19 @@ struct atl1e_hw { | |||
377 | */ | 377 | */ |
378 | struct atl1e_tx_buffer { | 378 | struct atl1e_tx_buffer { |
379 | struct sk_buff *skb; | 379 | struct sk_buff *skb; |
380 | u16 flags; | ||
381 | #define ATL1E_TX_PCIMAP_SINGLE 0x0001 | ||
382 | #define ATL1E_TX_PCIMAP_PAGE 0x0002 | ||
383 | #define ATL1E_TX_PCIMAP_TYPE_MASK 0x0003 | ||
380 | u16 length; | 384 | u16 length; |
381 | dma_addr_t dma; | 385 | dma_addr_t dma; |
382 | }; | 386 | }; |
383 | 387 | ||
388 | #define ATL1E_SET_PCIMAP_TYPE(tx_buff, type) do { \ | ||
389 | ((tx_buff)->flags) &= ~ATL1E_TX_PCIMAP_TYPE_MASK; \ | ||
390 | ((tx_buff)->flags) |= (type); \ | ||
391 | } while (0) | ||
392 | |||
384 | struct atl1e_rx_page { | 393 | struct atl1e_rx_page { |
385 | dma_addr_t dma; /* receive rage DMA address */ | 394 | dma_addr_t dma; /* receive rage DMA address */ |
386 | u8 *addr; /* receive rage virtual address */ | 395 | u8 *addr; /* receive rage virtual address */ |