summaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1c/atl1c.h
diff options
context:
space:
mode:
authorJie Yang <jie.yang@atheros.com>2009-12-06 22:56:59 +0000
committerDavid S. Miller <davem@davemloft.net>2009-12-08 20:48:06 -0800
commit4b45e3424e7210688f95039b8cdffb11d2e48934 (patch)
treebb9327eb5a537815dbfd1c8f1e9657095584bbf8 /drivers/net/atl1c/atl1c.h
parentb38310e99ed09163062902285edd6d7b3fc136d6 (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.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h
index a348a22551d..7e09084f75a 100644
--- a/drivers/net/atl1c/atl1c.h
+++ b/drivers/net/atl1c/atl1c.h
@@ -479,6 +479,9 @@ struct atl1c_buffer {
#define ATL1C_PCIMAP_PAGE 0x0008
#define ATL1C_PCIMAP_TYPE_MASK 0x000C
+#define ATL1C_PCIMAP_TODEVICE 0x0010
+#define ATL1C_PCIMAP_FROMDEVICE 0x0020
+#define ATL1C_PCIMAP_DIRECTION_MASK 0x0030
dma_addr_t dma;
};
@@ -487,9 +490,11 @@ struct atl1c_buffer {
((buff)->flags) |= (state); \
} while (0)
-#define ATL1C_SET_PCIMAP_TYPE(buff, type) do { \
- ((buff)->flags) &= ~ATL1C_PCIMAP_TYPE_MASK; \
- ((buff)->flags) |= (type); \
+#define ATL1C_SET_PCIMAP_TYPE(buff, type, direction) do { \
+ ((buff)->flags) &= ~ATL1C_PCIMAP_TYPE_MASK; \
+ ((buff)->flags) |= (type); \
+ ((buff)->flags) &= ~ATL1C_PCIMAP_DIRECTION_MASK; \
+ ((buff)->flags) |= (direction); \
} while (0)
/* transimit packet descriptor (tpd) ring */