Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
ni5010.h File Reference

Go to the source code of this file.

Macros

#define NI5010_BUFSIZE   2048 /* number of bytes in a buffer */
 
#define NI5010_MAGICVAL0   0x00 /* magic-values for ni5010 card */
 
#define NI5010_MAGICVAL1   0x55
 
#define NI5010_MAGICVAL2   0xAA
 
#define SA_ADDR0   0x02
 
#define SA_ADDR1   0x07
 
#define SA_ADDR2   0x01
 
#define NI5010_IO_EXTENT   32
 
#define PRINTK(x)   if (NI5010_DEBUG) printk x
 
#define PRINTK2(x)   if (NI5010_DEBUG>=2) printk x
 
#define PRINTK3(x)   if (NI5010_DEBUG>=3) printk x
 
#define EDLC_XSTAT   (ioaddr + 0x00) /* EDLC transmit csr */
 
#define EDLC_XCLR   (ioaddr + 0x00) /* EDLC transmit "Clear IRQ" */
 
#define EDLC_XMASK   (ioaddr + 0x01) /* EDLC transmit "IRQ Masks" */
 
#define EDLC_RSTAT   (ioaddr + 0x02) /* EDLC receive csr */
 
#define EDLC_RCLR   (ioaddr + 0x02) /* EDLC receive "Clear IRQ" */
 
#define EDLC_RMASK   (ioaddr + 0x03) /* EDLC receive "IRQ Masks" */
 
#define EDLC_XMODE   (ioaddr + 0x04) /* EDLC transmit Mode */
 
#define EDLC_RMODE   (ioaddr + 0x05) /* EDLC receive Mode */
 
#define EDLC_RESET   (ioaddr + 0x06) /* EDLC RESET register */
 
#define EDLC_TDR1   (ioaddr + 0x07) /* "Time Domain Reflectometry" reg1 */
 
#define EDLC_ADDR   (ioaddr + 0x08) /* EDLC station address, 6 bytes */
 
#define EDLC_TDR2   (ioaddr + 0x0f) /* "Time Domain Reflectometry" reg2 */
 
#define IE_GP   (ioaddr + 0x10) /* GP pointer (word register) */
 
#define IE_RCNT   (ioaddr + 0x10) /* Count of bytes in rcv'd packet */
 
#define IE_MMODE   (ioaddr + 0x12) /* Memory Mode register */
 
#define IE_DMA_RST   (ioaddr + 0x13) /* IE DMA Reset. write only */
 
#define IE_ISTAT   (ioaddr + 0x13) /* IE Interrupt Status. read only */
 
#define IE_RBUF   (ioaddr + 0x14) /* IE Receive Buffer port */
 
#define IE_XBUF   (ioaddr + 0x15) /* IE Transmit Buffer port */
 
#define IE_SAPROM   (ioaddr + 0x16) /* window on station addr prom */
 
#define IE_RESET   (ioaddr + 0x17) /* any write causes Board Reset */
 
#define XS_TPOK   0x80 /* transmit packet successful */
 
#define XS_CS   0x40 /* carrier sense */
 
#define XS_RCVD   0x20 /* transmitted packet received */
 
#define XS_SHORT   0x10 /* transmission media is shorted */
 
#define XS_UFLW   0x08 /* underflow. iff failed board */
 
#define XS_COLL   0x04 /* collision occurred */
 
#define XS_16COLL   0x02 /* 16th collision occurred */
 
#define XS_PERR   0x01 /* parity error */
 
#define XS_CLR_UFLW   0x08 /* clear underflow */
 
#define XS_CLR_COLL   0x04 /* clear collision */
 
#define XS_CLR_16COLL   0x02 /* clear 16th collision */
 
#define XS_CLR_PERR   0x01 /* clear parity error */
 
#define XM_TPOK   0x80 /* =1 to enable Xmt Pkt OK interrupts */
 
#define XM_RCVD   0x20 /* =1 to enable Xmt Pkt Rcvd ints */
 
#define XM_UFLW   0x08 /* =1 to enable Xmt Underflow ints */
 
#define XM_COLL   0x04 /* =1 to enable Xmt Collision ints */
 
#define XM_COLL16   0x02 /* =1 to enable Xmt 16th Coll ints */
 
#define XM_PERR   0x01 /* =1 to enable Xmt Parity Error ints */
 
#define XM_ALL   (XM_TPOK | XM_RCVD | XM_UFLW | XM_COLL | XM_COLL16)
 
#define RS_PKT_OK   0x80 /* received good packet */
 
#define RS_RST_PKT   0x10 /* RESET packet received */
 
#define RS_RUNT   0x08 /* Runt Pkt rcvd. Len < 64 Bytes */
 
#define RS_ALIGN   0x04 /* Alignment error. not 8 bit aligned */
 
#define RS_CRC_ERR   0x02 /* Bad CRC on rcvd pkt */
 
#define RS_OFLW   0x01 /* overflow for rcv FIFO */
 
#define RS_VALID_BITS   ( RS_PKT_OK | RS_RST_PKT | RS_RUNT | RS_ALIGN | RS_CRC_ERR | RS_OFLW )
 
#define RS_CLR_PKT_OK   0x80 /* clear rcvd packet interrupt */
 
#define RS_CLR_RST_PKT   0x10 /* clear RESET packet received */
 
#define RS_CLR_RUNT   0x08 /* clear Runt Pckt received */
 
#define RS_CLR_ALIGN   0x04 /* clear Alignment error */
 
#define RS_CLR_CRC_ERR   0x02 /* clear CRC error */
 
#define RS_CLR_OFLW   0x01 /* clear rcv FIFO Overflow */
 
#define RM_PKT_OK   0x80 /* =1 to enable rcvd good packet ints */
 
#define RM_RST_PKT   0x10 /* =1 to enable RESET packet ints */
 
#define RM_RUNT   0x08 /* =1 to enable Runt Pkt rcvd ints */
 
#define RM_ALIGN   0x04 /* =1 to enable Alignment error ints */
 
#define RM_CRC_ERR   0x02 /* =1 to enable Bad CRC error ints */
 
#define RM_OFLW   0x01 /* =1 to enable overflow error ints */
 
#define RMD_TEST   0x80 /* =1 for Chip testing. normally 0 */
 
#define RMD_ADD_SIZ   0x10 /* =1 5-byte addr match. normally 0 */
 
#define RMD_EN_RUNT   0x08 /* =1 enable runt rcv. normally 0 */
 
#define RMD_EN_RST   0x04 /* =1 to rcv RESET pkt. normally 0 */
 
#define RMD_PROMISC   0x03 /* receive *all* packets. unusual */
 
#define RMD_MULTICAST   0x02 /* receive multicasts too. unusual */
 
#define RMD_BROADCAST   0x01 /* receive broadcasts & normal. usual */
 
#define RMD_NO_PACKETS   0x00 /* don't receive any packets. unusual */
 
#define XMD_COLL_CNT   0xf0 /* coll's since success. read-only */
 
#define XMD_IG_PAR   0x08 /* =1 to ignore parity. ALWAYS set */
 
#define XMD_T_MODE   0x04 /* =1 to power xcvr. ALWAYS set this */
 
#define XMD_LBC   0x02 /* =1 for loopbakc. normally set */
 
#define XMD_DIS_C   0x01 /* =1 disables contention. normally 0 */
 
#define RS_RESET   0x80 /* =1 to hold EDLC in reset state */
 
#define MM_EN_DMA   0x80 /* =1 begin DMA xfer, Cplt clrs it */
 
#define MM_EN_RCV   0x40 /* =1 allows Pkt rcv. clr'd by rcv */
 
#define MM_EN_XMT   0x20 /* =1 begin Xmt pkt. Cplt clrs it */
 
#define MM_BUS_PAGE   0x18 /* =00 ALWAYS. Used when MUX=1 */
 
#define MM_NET_PAGE   0x06 /* =00 ALWAYS. Used when MUX=0 */
 
#define MM_MUX   0x01 /* =1 means Rcv Buff on system bus */
 
#define IS_TDIAG   0x80 /* =1 if Diagnostic problem */
 
#define IS_EN_RCV   0x20 /* =1 until frame is rcv'd cplt */
 
#define IS_EN_XMT   0x10 /* =1 until frame is xmt'd cplt */
 
#define IS_EN_DMA   0x08 /* =1 until DMA is cplt or aborted */
 
#define IS_DMA_INT   0x04 /* =0 iff DMA done interrupt. */
 
#define IS_R_INT   0x02 /* =0 iff unmasked Rcv interrupt */
 
#define IS_X_INT   0x01 /* =0 iff unmasked Xmt interrupt */
 

Macro Definition Documentation

#define EDLC_ADDR   (ioaddr + 0x08) /* EDLC station address, 6 bytes */

Definition at line 41 of file ni5010.h.

#define EDLC_RCLR   (ioaddr + 0x02) /* EDLC receive "Clear IRQ" */

Definition at line 35 of file ni5010.h.

#define EDLC_RESET   (ioaddr + 0x06) /* EDLC RESET register */

Definition at line 39 of file ni5010.h.

#define EDLC_RMASK   (ioaddr + 0x03) /* EDLC receive "IRQ Masks" */

Definition at line 36 of file ni5010.h.

#define EDLC_RMODE   (ioaddr + 0x05) /* EDLC receive Mode */

Definition at line 38 of file ni5010.h.

#define EDLC_RSTAT   (ioaddr + 0x02) /* EDLC receive csr */

Definition at line 34 of file ni5010.h.

#define EDLC_TDR1   (ioaddr + 0x07) /* "Time Domain Reflectometry" reg1 */

Definition at line 40 of file ni5010.h.

#define EDLC_TDR2   (ioaddr + 0x0f) /* "Time Domain Reflectometry" reg2 */

Definition at line 43 of file ni5010.h.

#define EDLC_XCLR   (ioaddr + 0x00) /* EDLC transmit "Clear IRQ" */

Definition at line 32 of file ni5010.h.

#define EDLC_XMASK   (ioaddr + 0x01) /* EDLC transmit "IRQ Masks" */

Definition at line 33 of file ni5010.h.

#define EDLC_XMODE   (ioaddr + 0x04) /* EDLC transmit Mode */

Definition at line 37 of file ni5010.h.

#define EDLC_XSTAT   (ioaddr + 0x00) /* EDLC transmit csr */

Definition at line 31 of file ni5010.h.

#define IE_DMA_RST   (ioaddr + 0x13) /* IE DMA Reset. write only */

Definition at line 49 of file ni5010.h.

#define IE_GP   (ioaddr + 0x10) /* GP pointer (word register) */

Definition at line 44 of file ni5010.h.

#define IE_ISTAT   (ioaddr + 0x13) /* IE Interrupt Status. read only */

Definition at line 50 of file ni5010.h.

#define IE_MMODE   (ioaddr + 0x12) /* Memory Mode register */

Definition at line 48 of file ni5010.h.

#define IE_RBUF   (ioaddr + 0x14) /* IE Receive Buffer port */

Definition at line 51 of file ni5010.h.

#define IE_RCNT   (ioaddr + 0x10) /* Count of bytes in rcv'd packet */

Definition at line 46 of file ni5010.h.

#define IE_RESET   (ioaddr + 0x17) /* any write causes Board Reset */

Definition at line 54 of file ni5010.h.

#define IE_SAPROM   (ioaddr + 0x16) /* window on station addr prom */

Definition at line 53 of file ni5010.h.

#define IE_XBUF   (ioaddr + 0x15) /* IE Transmit Buffer port */

Definition at line 52 of file ni5010.h.

#define IS_DMA_INT   0x04 /* =0 iff DMA done interrupt. */

Definition at line 141 of file ni5010.h.

#define IS_EN_DMA   0x08 /* =1 until DMA is cplt or aborted */

Definition at line 140 of file ni5010.h.

#define IS_EN_RCV   0x20 /* =1 until frame is rcv'd cplt */

Definition at line 138 of file ni5010.h.

#define IS_EN_XMT   0x10 /* =1 until frame is xmt'd cplt */

Definition at line 139 of file ni5010.h.

#define IS_R_INT   0x02 /* =0 iff unmasked Rcv interrupt */

Definition at line 142 of file ni5010.h.

#define IS_TDIAG   0x80 /* =1 if Diagnostic problem */

Definition at line 137 of file ni5010.h.

#define IS_X_INT   0x01 /* =0 iff unmasked Xmt interrupt */

Definition at line 143 of file ni5010.h.

#define MM_BUS_PAGE   0x18 /* =00 ALWAYS. Used when MUX=1 */

Definition at line 131 of file ni5010.h.

#define MM_EN_DMA   0x80 /* =1 begin DMA xfer, Cplt clrs it */

Definition at line 128 of file ni5010.h.

#define MM_EN_RCV   0x40 /* =1 allows Pkt rcv. clr'd by rcv */

Definition at line 129 of file ni5010.h.

#define MM_EN_XMT   0x20 /* =1 begin Xmt pkt. Cplt clrs it */

Definition at line 130 of file ni5010.h.

#define MM_MUX   0x01 /* =1 means Rcv Buff on system bus */

Definition at line 133 of file ni5010.h.

#define MM_NET_PAGE   0x06 /* =00 ALWAYS. Used when MUX=0 */

Definition at line 132 of file ni5010.h.

#define NI5010_BUFSIZE   2048 /* number of bytes in a buffer */

Definition at line 13 of file ni5010.h.

#define NI5010_IO_EXTENT   32

Definition at line 24 of file ni5010.h.

#define NI5010_MAGICVAL0   0x00 /* magic-values for ni5010 card */

Definition at line 15 of file ni5010.h.

#define NI5010_MAGICVAL1   0x55

Definition at line 16 of file ni5010.h.

#define NI5010_MAGICVAL2   0xAA

Definition at line 17 of file ni5010.h.

#define PRINTK (   x)    if (NI5010_DEBUG) printk x

Definition at line 26 of file ni5010.h.

#define PRINTK2 (   x)    if (NI5010_DEBUG>=2) printk x

Definition at line 27 of file ni5010.h.

#define PRINTK3 (   x)    if (NI5010_DEBUG>=3) printk x

Definition at line 28 of file ni5010.h.

#define RM_ALIGN   0x04 /* =1 to enable Alignment error ints */

Definition at line 102 of file ni5010.h.

#define RM_CRC_ERR   0x02 /* =1 to enable Bad CRC error ints */

Definition at line 103 of file ni5010.h.

#define RM_OFLW   0x01 /* =1 to enable overflow error ints */

Definition at line 104 of file ni5010.h.

#define RM_PKT_OK   0x80 /* =1 to enable rcvd good packet ints */

Definition at line 99 of file ni5010.h.

#define RM_RST_PKT   0x10 /* =1 to enable RESET packet ints */

Definition at line 100 of file ni5010.h.

#define RM_RUNT   0x08 /* =1 to enable Runt Pkt rcvd ints */

Definition at line 101 of file ni5010.h.

#define RMD_ADD_SIZ   0x10 /* =1 5-byte addr match. normally 0 */

Definition at line 108 of file ni5010.h.

#define RMD_BROADCAST   0x01 /* receive broadcasts & normal. usual */

Definition at line 114 of file ni5010.h.

#define RMD_EN_RST   0x04 /* =1 to rcv RESET pkt. normally 0 */

Definition at line 110 of file ni5010.h.

#define RMD_EN_RUNT   0x08 /* =1 enable runt rcv. normally 0 */

Definition at line 109 of file ni5010.h.

#define RMD_MULTICAST   0x02 /* receive multicasts too. unusual */

Definition at line 113 of file ni5010.h.

#define RMD_NO_PACKETS   0x00 /* don't receive any packets. unusual */

Definition at line 115 of file ni5010.h.

#define RMD_PROMISC   0x03 /* receive *all* packets. unusual */

Definition at line 112 of file ni5010.h.

#define RMD_TEST   0x80 /* =1 for Chip testing. normally 0 */

Definition at line 107 of file ni5010.h.

#define RS_ALIGN   0x04 /* Alignment error. not 8 bit aligned */

Definition at line 85 of file ni5010.h.

#define RS_CLR_ALIGN   0x04 /* clear Alignment error */

Definition at line 94 of file ni5010.h.

#define RS_CLR_CRC_ERR   0x02 /* clear CRC error */

Definition at line 95 of file ni5010.h.

#define RS_CLR_OFLW   0x01 /* clear rcv FIFO Overflow */

Definition at line 96 of file ni5010.h.

#define RS_CLR_PKT_OK   0x80 /* clear rcvd packet interrupt */

Definition at line 91 of file ni5010.h.

#define RS_CLR_RST_PKT   0x10 /* clear RESET packet received */

Definition at line 92 of file ni5010.h.

#define RS_CLR_RUNT   0x08 /* clear Runt Pckt received */

Definition at line 93 of file ni5010.h.

#define RS_CRC_ERR   0x02 /* Bad CRC on rcvd pkt */

Definition at line 86 of file ni5010.h.

#define RS_OFLW   0x01 /* overflow for rcv FIFO */

Definition at line 87 of file ni5010.h.

#define RS_PKT_OK   0x80 /* received good packet */

Definition at line 82 of file ni5010.h.

#define RS_RESET   0x80 /* =1 to hold EDLC in reset state */

Definition at line 125 of file ni5010.h.

#define RS_RST_PKT   0x10 /* RESET packet received */

Definition at line 83 of file ni5010.h.

#define RS_RUNT   0x08 /* Runt Pkt rcvd. Len < 64 Bytes */

Definition at line 84 of file ni5010.h.

#define RS_VALID_BITS   ( RS_PKT_OK | RS_RST_PKT | RS_RUNT | RS_ALIGN | RS_CRC_ERR | RS_OFLW )

Definition at line 88 of file ni5010.h.

#define SA_ADDR0   0x02

Definition at line 19 of file ni5010.h.

#define SA_ADDR1   0x07

Definition at line 20 of file ni5010.h.

#define SA_ADDR2   0x01

Definition at line 21 of file ni5010.h.

#define XM_ALL   (XM_TPOK | XM_RCVD | XM_UFLW | XM_COLL | XM_COLL16)

Definition at line 79 of file ni5010.h.

#define XM_COLL   0x04 /* =1 to enable Xmt Collision ints */

Definition at line 75 of file ni5010.h.

#define XM_COLL16   0x02 /* =1 to enable Xmt 16th Coll ints */

Definition at line 76 of file ni5010.h.

#define XM_PERR   0x01 /* =1 to enable Xmt Parity Error ints */

Definition at line 77 of file ni5010.h.

#define XM_RCVD   0x20 /* =1 to enable Xmt Pkt Rcvd ints */

Definition at line 73 of file ni5010.h.

#define XM_TPOK   0x80 /* =1 to enable Xmt Pkt OK interrupts */

Definition at line 72 of file ni5010.h.

#define XM_UFLW   0x08 /* =1 to enable Xmt Underflow ints */

Definition at line 74 of file ni5010.h.

#define XMD_COLL_CNT   0xf0 /* coll's since success. read-only */

Definition at line 118 of file ni5010.h.

#define XMD_DIS_C   0x01 /* =1 disables contention. normally 0 */

Definition at line 122 of file ni5010.h.

#define XMD_IG_PAR   0x08 /* =1 to ignore parity. ALWAYS set */

Definition at line 119 of file ni5010.h.

#define XMD_LBC   0x02 /* =1 for loopbakc. normally set */

Definition at line 121 of file ni5010.h.

#define XMD_T_MODE   0x04 /* =1 to power xcvr. ALWAYS set this */

Definition at line 120 of file ni5010.h.

#define XS_16COLL   0x02 /* 16th collision occurred */

Definition at line 63 of file ni5010.h.

#define XS_CLR_16COLL   0x02 /* clear 16th collision */

Definition at line 68 of file ni5010.h.

#define XS_CLR_COLL   0x04 /* clear collision */

Definition at line 67 of file ni5010.h.

#define XS_CLR_PERR   0x01 /* clear parity error */

Definition at line 69 of file ni5010.h.

#define XS_CLR_UFLW   0x08 /* clear underflow */

Definition at line 66 of file ni5010.h.

#define XS_COLL   0x04 /* collision occurred */

Definition at line 62 of file ni5010.h.

#define XS_CS   0x40 /* carrier sense */

Definition at line 58 of file ni5010.h.

#define XS_PERR   0x01 /* parity error */

Definition at line 64 of file ni5010.h.

#define XS_RCVD   0x20 /* transmitted packet received */

Definition at line 59 of file ni5010.h.

#define XS_SHORT   0x10 /* transmission media is shorted */

Definition at line 60 of file ni5010.h.

#define XS_TPOK   0x80 /* transmit packet successful */

Definition at line 57 of file ni5010.h.

#define XS_UFLW   0x08 /* underflow. iff failed board */

Definition at line 61 of file ni5010.h.