aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pasemi_mac.h
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2007-10-02 17:25:53 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:54:23 -0400
commitfc9e4d2a93dab4a995e2e75725577b9a60154cbc (patch)
treeefa9ce615e57fdb4bb94d0920daf04a26b30c4ed /drivers/net/pasemi_mac.h
parent18eec695427ce1258fb5dad0ac180fa4d6f64af7 (diff)
pasemi_mac: rework ring management
pasemi_mac: rework ring management Rework ring management, switching to an opaque ring format instead of the struct-based descriptor+pointer setup, since it will be needed for SG support. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/pasemi_mac.h')
-rw-r--r--drivers/net/pasemi_mac.h23
1 files changed, 5 insertions, 18 deletions
diff --git a/drivers/net/pasemi_mac.h b/drivers/net/pasemi_mac.h
index c52cfcb6c4ca..5a896aa87a99 100644
--- a/drivers/net/pasemi_mac.h
+++ b/drivers/net/pasemi_mac.h
@@ -28,25 +28,25 @@
28 28
29struct pasemi_mac_txring { 29struct pasemi_mac_txring {
30 spinlock_t lock; 30 spinlock_t lock;
31 struct pas_dma_xct_descr *desc; 31 u64 *ring;
32 dma_addr_t dma; 32 dma_addr_t dma;
33 unsigned int size; 33 unsigned int size;
34 unsigned int next_to_fill; 34 unsigned int next_to_fill;
35 unsigned int next_to_clean; 35 unsigned int next_to_clean;
36 struct pasemi_mac_buffer *desc_info; 36 struct pasemi_mac_buffer *ring_info;
37 char irq_name[10]; /* "eth%d tx" */ 37 char irq_name[10]; /* "eth%d tx" */
38}; 38};
39 39
40struct pasemi_mac_rxring { 40struct pasemi_mac_rxring {
41 spinlock_t lock; 41 spinlock_t lock;
42 struct pas_dma_xct_descr *desc; /* RX channel descriptor ring */ 42 u64 *ring; /* RX channel descriptor ring */
43 dma_addr_t dma; 43 dma_addr_t dma;
44 u64 *buffers; /* RX interface buffer ring */ 44 u64 *buffers; /* RX interface buffer ring */
45 dma_addr_t buf_dma; 45 dma_addr_t buf_dma;
46 unsigned int size; 46 unsigned int size;
47 unsigned int next_to_fill; 47 unsigned int next_to_fill;
48 unsigned int next_to_clean; 48 unsigned int next_to_clean;
49 struct pasemi_mac_buffer *desc_info; 49 struct pasemi_mac_buffer *ring_info;
50 char irq_name[10]; /* "eth%d rx" */ 50 char irq_name[10]; /* "eth%d rx" */
51}; 51};
52 52
@@ -88,7 +88,7 @@ struct pasemi_mac {
88 char phy_id[BUS_ID_SIZE]; 88 char phy_id[BUS_ID_SIZE];
89}; 89};
90 90
91/* Software status descriptor (desc_info) */ 91/* Software status descriptor (ring_info) */
92struct pasemi_mac_buffer { 92struct pasemi_mac_buffer {
93 struct sk_buff *skb; 93 struct sk_buff *skb;
94 dma_addr_t dma; 94 dma_addr_t dma;
@@ -101,20 +101,7 @@ struct pasdma_status {
101 u64 tx_sta[20]; 101 u64 tx_sta[20];
102}; 102};
103 103
104/* descriptor structure */
105struct pas_dma_xct_descr {
106 union {
107 u64 mactx;
108 u64 macrx;
109 };
110 union {
111 u64 ptr;
112 u64 rxb;
113 };
114};
115
116/* MAC CFG register offsets */ 104/* MAC CFG register offsets */
117
118enum { 105enum {
119 PAS_MAC_CFG_PCFG = 0x80, 106 PAS_MAC_CFG_PCFG = 0x80,
120 PAS_MAC_CFG_TXP = 0x98, 107 PAS_MAC_CFG_TXP = 0x98,