Lines Matching +full:rx +full:- +full:enable

1 /* SPDX-License-Identifier: GPL-2.0 */
15 #define GLOB_MSIZE 0x0cUL /* Local-memory Size */
22 #define GLOB_CTRL_EPAR 0x00000020 /* Enable parity */
45 /* The following registers are for per-qe channel information/status. */
48 #define CREG_RXDS 0x08UL /* RX descriptor ring ptr */
50 #define CREG_RIMASK 0x10UL /* RX Interrupt Mask */
54 #define CREG_RXWBUFPTR 0x20UL /* Local memory rx write ptr */
55 #define CREG_RXRBUFPTR 0x24UL /* Local memory rx read ptr */
59 #define CREG_PIPG 0x34UL /* Inter-Frame Gap */
74 #define CREG_STAT_CCOFLOW 0x00100000 /* TX Coll-counter Overflow */
79 #define CREG_STAT_RCCOFLOW 0x00001000 /* RX Coll-counter Overflow */
82 #define CREG_STAT_RXFOFLOW 0x00000200 /* RX FIFO Overflow */
83 #define CREG_STAT_RLCOLL 0x00000100 /* RX Late Collision */
85 #define CREG_STAT_CECOFLOW 0x00000040 /* CRC Error-counter Overflow*/
87 #define CREG_STAT_RXDROP 0x00000010 /* Dropped a RX'd packet */
107 #define CREG_QMASK_RXDROP 0x00000010 /* RX drop */
108 #define CREG_QMASK_RXBERROR 0x00000008 /* RX buffer error */
109 #define CREG_QMASK_RXLEERR 0x00000004 /* RX late error */
110 #define CREG_QMASK_RXPERR 0x00000002 /* RX parity error */
111 #define CREG_QMASK_RXSERR 0x00000001 /* RX sbus error ack */
121 #define CREG_MMASK_RXCOLL 0x00000400 /* RX Coll-Cntr overflow */
125 #define CREG_PIPG_TENAB 0x00000020 /* Enable Throttle */
129 /* Per-channel AMD 79C940 MACE registers. */
146 #define MREGS_CHIPID1 0x10UL /* Chip-ID, low bits */
147 #define MREGS_CHIPID2 0x11UL /* Chip-ID, high bits */
157 #define MREGS_RCCNT 0x1bUL /* RX Collision Count */
180 #define MREGS_RXFCNTL_LOWLAT 0x08 /* RX low latency */
181 #define MREGS_RXFCNTL_AREJECT 0x04 /* RX addr match rej */
182 #define MREGS_RXFCNTL_AUTOSTRIP 0x01 /* RX auto strip */
184 #define MREGS_RXFSTAT_OVERFLOW 0x80 /* RX overflow */
185 #define MREGS_RXFSTAT_LCOLL 0x40 /* RX late collision */
186 #define MREGS_RXFSTAT_FERROR 0x20 /* RX framing error */
187 #define MREGS_RXFSTAT_FCSERROR 0x10 /* RX FCS error */
188 #define MREGS_RXFSTAT_RBCNT 0x0f /* RX msg byte count */
190 #define MREGS_FFCNT_RX 0xf0 /* RX FIFO frame cnt */
199 #define MREGS_IREG_RXIRQ 0x02 /* IRQ RX'd a packet */
205 #define MREGS_IMASK_RXIRQ 0x02 /* IMASK RX interrupts */
210 #define MREGS_POLL_RDTR 0x20 /* RX data transfer request */
217 #define MREGS_BCONFIG_RESET 0x01 /* SW-Reset the MACE */
222 #define MREGS_FCONFIG_RXF64 0x20 /* RX fifo 64 write cycles */
223 #define MREGS_FCONFIG_RXF32 0x10 /* RX fifo 32 write cycles */
224 #define MREGS_FCONFIG_RXF16 0x00 /* RX fifo 16 write cycles */
226 #define MREGS_FCONFIG_RFWU 0x04 /* RX fifo watermark update */
227 #define MREGS_FCONFIG_TBENAB 0x02 /* TX burst enable */
228 #define MREGS_FCONFIG_RBENAB 0x01 /* RX burst enable */
230 #define MREGS_MCONFIG_PROMISC 0x80 /* Promiscuous mode enable */
231 #define MREGS_MCONFIG_TPDDISAB 0x40 /* TX 2part deferral enable */
232 #define MREGS_MCONFIG_MBAENAB 0x20 /* Modified backoff enable */
233 #define MREGS_MCONFIG_RPADISAB 0x08 /* RX physical addr disable */
234 #define MREGS_MCONFIG_RBDISAB 0x04 /* RX broadcast disable */
235 #define MREGS_MCONFIG_TXENAB 0x02 /* Enable transmitter */
236 #define MREGS_MCONFIG_RXENAB 0x01 /* Enable receiver */
243 #define MREGS_PLSCONFIG_IOENAB 0x01 /* PLS I/O enable */
247 #define MREGS_PHYCONFIG_RXPOLARITY 0x20 /* RX polarity */
250 #define MREGS_PHYCONFIG_AUTO 0x04 /* Connector port auto-sel */
258 #define MREGS_UTEST_RTRENAB 0x80 /* Enable resv test register */
262 #define MREGS_UTEST_FCSENAB 0x08 /* Enable FCS on RX */
294 #define NEXT_RX(num) (((num) + 1) & (RX_RING_MAXSIZE - 1))
295 #define NEXT_TX(num) (((num) + 1) & (TX_RING_MAXSIZE - 1))
296 #define PREV_RX(num) (((num) - 1) & (RX_RING_MAXSIZE - 1))
297 #define PREV_TX(num) (((num) - 1) & (TX_RING_MAXSIZE - 1))
300 (((qp)->tx_old <= (qp)->tx_new) ? \
301 (qp)->tx_old + (TX_RING_SIZE - 1) - (qp)->tx_new : \
302 (qp)->tx_old - (qp)->tx_new - 1)
310 ((__u32)((unsigned long)(&(((struct qe_init_block *)0)->mem[elem]))))
332 ((__u32)((unsigned long)(&(((struct sunqe_buffers *)0)->mem[elem][0]))))
335 void __iomem *qcregs; /* QEC per-channel Registers */
336 void __iomem *mregs; /* Per-channel MACE Registers */
337 struct qe_init_block *qe_block; /* RX and TX descriptors */
338 dma_addr_t qblock_dvma; /* RX and TX descriptors */
340 int rx_new, rx_old; /* RX ring extents */