diff options
author | Jie Yang <jie.yang@atheros.com> | 2009-12-06 17:56:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-08 23:48:06 -0500 |
commit | 4b45e3424e7210688f95039b8cdffb11d2e48934 (patch) | |
tree | bb9327eb5a537815dbfd1c8f1e9657095584bbf8 /drivers/net/atl1c/atl1c.h | |
parent | b38310e99ed09163062902285edd6d7b3fc136d6 (diff) |
atl1c:add pci map direction in atl1c_buffer flags
add pci map direction in atl1c_buffer flags, it is used when call pci_unmap
apis.
Signed-off-by: Jie Yang <jie.yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/atl1c/atl1c.h')
-rw-r--r-- | drivers/net/atl1c/atl1c.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h index a348a22551d9..7e09084f75a9 100644 --- a/drivers/net/atl1c/atl1c.h +++ b/drivers/net/atl1c/atl1c.h | |||
@@ -479,6 +479,9 @@ struct atl1c_buffer { | |||
479 | #define ATL1C_PCIMAP_PAGE 0x0008 | 479 | #define ATL1C_PCIMAP_PAGE 0x0008 |
480 | #define ATL1C_PCIMAP_TYPE_MASK 0x000C | 480 | #define ATL1C_PCIMAP_TYPE_MASK 0x000C |
481 | 481 | ||
482 | #define ATL1C_PCIMAP_TODEVICE 0x0010 | ||
483 | #define ATL1C_PCIMAP_FROMDEVICE 0x0020 | ||
484 | #define ATL1C_PCIMAP_DIRECTION_MASK 0x0030 | ||
482 | dma_addr_t dma; | 485 | dma_addr_t dma; |
483 | }; | 486 | }; |
484 | 487 | ||
@@ -487,9 +490,11 @@ struct atl1c_buffer { | |||
487 | ((buff)->flags) |= (state); \ | 490 | ((buff)->flags) |= (state); \ |
488 | } while (0) | 491 | } while (0) |
489 | 492 | ||
490 | #define ATL1C_SET_PCIMAP_TYPE(buff, type) do { \ | 493 | #define ATL1C_SET_PCIMAP_TYPE(buff, type, direction) do { \ |
491 | ((buff)->flags) &= ~ATL1C_PCIMAP_TYPE_MASK; \ | 494 | ((buff)->flags) &= ~ATL1C_PCIMAP_TYPE_MASK; \ |
492 | ((buff)->flags) |= (type); \ | 495 | ((buff)->flags) |= (type); \ |
496 | ((buff)->flags) &= ~ATL1C_PCIMAP_DIRECTION_MASK; \ | ||
497 | ((buff)->flags) |= (direction); \ | ||
493 | } while (0) | 498 | } while (0) |
494 | 499 | ||
495 | /* transimit packet descriptor (tpd) ring */ | 500 | /* transimit packet descriptor (tpd) ring */ |