diff options
author | Olof Johansson <olof@lixom.net> | 2007-11-28 21:54:28 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:04:19 -0500 |
commit | 72b05b9940f00fbfd71a1cb8ea80eb2cc1f90255 (patch) | |
tree | b137b06594dd6b662e70bb5673d90f2097e7f9fa /drivers/net/pasemi_mac.h | |
parent | 5f06eba4dce361bfc077868d044768476b41d698 (diff) |
pasemi_mac: RX/TX ring management cleanup
pasemi_mac: RX/TX ring management cleanup
Prepare a bit for supporting multiple TX queues by cleaning up some
of the ring management and shuffle things around a bit.
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.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/pasemi_mac.h b/drivers/net/pasemi_mac.h index 60368df72634..1269015fa5da 100644 --- a/drivers/net/pasemi_mac.h +++ b/drivers/net/pasemi_mac.h | |||
@@ -28,17 +28,20 @@ | |||
28 | 28 | ||
29 | struct pasemi_mac_txring { | 29 | struct pasemi_mac_txring { |
30 | spinlock_t lock; | 30 | spinlock_t lock; |
31 | u64 *status; /* Ptr to cacheable status area */ | ||
31 | u64 *ring; | 32 | u64 *ring; |
32 | dma_addr_t dma; | 33 | dma_addr_t dma; |
33 | unsigned int size; | 34 | unsigned int size; |
34 | unsigned int next_to_fill; | 35 | unsigned int next_to_fill; |
35 | unsigned int next_to_clean; | 36 | unsigned int next_to_clean; |
36 | struct pasemi_mac_buffer *ring_info; | 37 | struct pasemi_mac_buffer *ring_info; |
37 | char irq_name[10]; /* "eth%d tx" */ | 38 | int chan; |
39 | struct pasemi_mac *mac; /* Needed in intr handler */ | ||
38 | }; | 40 | }; |
39 | 41 | ||
40 | struct pasemi_mac_rxring { | 42 | struct pasemi_mac_rxring { |
41 | spinlock_t lock; | 43 | spinlock_t lock; |
44 | u64 *status; /* Ptr to cacheable status area */ | ||
42 | u64 *ring; /* RX channel descriptor ring */ | 45 | u64 *ring; /* RX channel descriptor ring */ |
43 | dma_addr_t dma; | 46 | dma_addr_t dma; |
44 | u64 *buffers; /* RX interface buffer ring */ | 47 | u64 *buffers; /* RX interface buffer ring */ |
@@ -47,7 +50,7 @@ struct pasemi_mac_rxring { | |||
47 | unsigned int next_to_fill; | 50 | unsigned int next_to_fill; |
48 | unsigned int next_to_clean; | 51 | unsigned int next_to_clean; |
49 | struct pasemi_mac_buffer *ring_info; | 52 | struct pasemi_mac_buffer *ring_info; |
50 | char irq_name[10]; /* "eth%d rx" */ | 53 | struct pasemi_mac *mac; /* Needed in intr handler */ |
51 | }; | 54 | }; |
52 | 55 | ||
53 | struct pasemi_mac { | 56 | struct pasemi_mac { |
@@ -61,16 +64,12 @@ struct pasemi_mac { | |||
61 | struct phy_device *phydev; | 64 | struct phy_device *phydev; |
62 | struct napi_struct napi; | 65 | struct napi_struct napi; |
63 | 66 | ||
64 | /* Pointer to the cacheable per-channel status registers */ | ||
65 | u64 *rx_status; | ||
66 | u64 *tx_status; | ||
67 | |||
68 | u8 type; | 67 | u8 type; |
69 | #define MAC_TYPE_GMAC 1 | 68 | #define MAC_TYPE_GMAC 1 |
70 | #define MAC_TYPE_XAUI 2 | 69 | #define MAC_TYPE_XAUI 2 |
71 | u32 dma_txch; | 70 | u32 dma_txch; |
72 | u32 dma_if; | ||
73 | u32 dma_rxch; | 71 | u32 dma_rxch; |
72 | u32 dma_if; | ||
74 | 73 | ||
75 | u8 mac_addr[6]; | 74 | u8 mac_addr[6]; |
76 | 75 | ||
@@ -78,8 +77,10 @@ struct pasemi_mac { | |||
78 | 77 | ||
79 | struct pasemi_mac_txring *tx; | 78 | struct pasemi_mac_txring *tx; |
80 | struct pasemi_mac_rxring *rx; | 79 | struct pasemi_mac_rxring *rx; |
81 | unsigned long tx_irq; | 80 | unsigned int tx_irq; |
82 | unsigned long rx_irq; | 81 | unsigned int rx_irq; |
82 | char tx_irq_name[10]; /* "eth%d tx" */ | ||
83 | char rx_irq_name[10]; /* "eth%d rx" */ | ||
83 | int link; | 84 | int link; |
84 | int speed; | 85 | int speed; |
85 | int duplex; | 86 | int duplex; |