Go to the documentation of this file.
20 #define TX_RING_ENTRIES 64
22 #define RX_RING_ENTRIES 16
24 #define TX_RING_BUFFER_SIZE (TX_RING_ENTRIES*sizeof(tx_packet))
25 #define RX_BUFFER_SIZE 1546
26 #define METH_RX_BUFF_SIZE 4096
27 #define METH_RX_HEAD 34
28 #define RX_BUFFER_OFFSET (sizeof(rx_status_vector)+2)
29 #define RX_BUCKET_SIZE 256
112 #define TX_INFO_RPTR 0x00FF0000
113 #define TX_INFO_WPTR 0x000000FF
117 #define SGI_MAC_RESET BIT(0)
118 #define METH_PHY_FDX BIT(1)
119 #define METH_PHY_LOOP BIT(2)
121 #define METH_100MBIT BIT(3)
122 #define METH_PHY_MII BIT(4)
127 #define METH_ACCEPT_MY 0
128 #define METH_ACCEPT_MCAST 0x20
129 #define METH_ACCEPT_AMCAST 0x40
130 #define METH_PROMISC 0x60
132 #define METH_PHY_LINK_FAIL BIT(7)
134 #define METH_MAC_IPG 0x1ffff00
136 #define METH_DEFAULT_IPG ((17<<15) | (11<<22) | (21<<8))
146 #define METH_REV_SHIFT 29
152 #define METH_RX_OFFSET_SHIFT 12
153 #define METH_RX_DEPTH_SHIFT 4
155 #define METH_DMA_TX_EN BIT(1)
156 #define METH_DMA_TX_INT_EN BIT(0)
157 #define METH_DMA_RX_EN BIT(15)
158 #define METH_DMA_RX_INT_EN BIT(9)
161 #define METH_RX_FIFO_WPTR(x) (((x)>>16)&0xf)
162 #define METH_RX_FIFO_RPTR(x) (((x)>>8)&0xf)
163 #define METH_RX_FIFO_DEPTH(x) ((x)&0x1f)
167 #define METH_RX_ST_VALID BIT(63)
168 #define METH_RX_ST_RCV_CODE_VIOLATION BIT(16)
169 #define METH_RX_ST_DRBL_NBL BIT(17)
170 #define METH_RX_ST_CRC_ERR BIT(18)
171 #define METH_RX_ST_MCAST_PKT BIT(19)
172 #define METH_RX_ST_BCAST_PKT BIT(20)
173 #define METH_RX_ST_INV_PREAMBLE_CTX BIT(21)
174 #define METH_RX_ST_LONG_EVT_SEEN BIT(22)
175 #define METH_RX_ST_BAD_PACKET BIT(23)
176 #define METH_RX_ST_CARRIER_EVT_SEEN BIT(24)
177 #define METH_RX_ST_MCAST_FILTER_MATCH BIT(25)
178 #define METH_RX_ST_PHYS_ADDR_MATCH BIT(26)
180 #define METH_RX_STATUS_ERRORS \
182 METH_RX_ST_RCV_CODE_VIOLATION| \
183 METH_RX_ST_CRC_ERR| \
184 METH_RX_ST_INV_PREAMBLE_CTX| \
185 METH_RX_ST_LONG_EVT_SEEN| \
186 METH_RX_ST_BAD_PACKET| \
187 METH_RX_ST_CARRIER_EVT_SEEN \
191 #define METH_INT_TX_EMPTY BIT(0)
192 #define METH_INT_TX_PKT BIT(1)
194 #define METH_INT_TX_LINK_FAIL BIT(2)
195 #define METH_INT_MEM_ERROR BIT(3)
197 #define METH_INT_TX_ABORT BIT(4)
198 #define METH_INT_RX_THRESHOLD BIT(5)
199 #define METH_INT_RX_UNDERFLOW BIT(6)
200 #define METH_INT_RX_OVERFLOW BIT(7)
203 #define METH_INT_RX_RPTR_MASK 0x0000F00
207 #define METH_INT_TX_RPTR_MASK 0x1FF0000
209 #define METH_INT_RX_SEQ_MASK 0x2E000000
213 #define METH_INT_ERROR (METH_INT_TX_LINK_FAIL| \
214 METH_INT_MEM_ERROR| \
216 METH_INT_RX_OVERFLOW| \
217 METH_INT_RX_UNDERFLOW)
219 #define METH_INT_MCAST_HASH BIT(30)
222 #define METH_TX_ST_DONE BIT(63)
223 #define METH_TX_ST_SUCCESS BIT(23)
224 #define METH_TX_ST_TOOLONG BIT(24)
225 #define METH_TX_ST_UNDERRUN BIT(25)
226 #define METH_TX_ST_EXCCOLL BIT(26)
227 #define METH_TX_ST_DEFER BIT(27)
228 #define METH_TX_ST_LATECOLL BIT(28)
232 #define METH_TX_CMD_INT_EN BIT(24)
235 #define MDIO_BUSY BIT(16)
236 #define MDIO_DATA_MASK 0xFFFF
238 #define PHY_QS6612X 0x0181441
239 #define PHY_ICS1889 0x0015F41
240 #define PHY_ICS1890 0x0015F42
241 #define PHY_DP83840 0x20005C0
243 #define ADVANCE_RX_PTR(x) x=(x+1)&(RX_RING_ENTRIES-1)