Go to the documentation of this file.
28 #define lmc_csrptr_t unsigned long
30 #define LMC_REG_RANGE 0x80
32 #define LMC_PRINTF_FMT "%s"
33 #define LMC_PRINTF_ARGS (sc->lmc_device->name)
35 #define TX_TIMEOUT (2*HZ)
37 #define LMC_TXDESCS 32
38 #define LMC_RXDESCS 32
41 #define LMC_LINK_DOWN 0
44 #define LMC_CSR_READ(sc, csr) \
45 inl((sc)->lmc_csrs.csr)
46 #define LMC_CSR_WRITE(sc, reg, val) \
47 outl((val), (sc)->lmc_csrs.reg)
55 #define DELAY(n) SLOW_DOWN_IO
57 #define lmc_delay() inl(sc->lmc_csrs.csr_9)
60 #define LMC_MII_SYNC(sc) do {int n=32; while( n >= 0 ) { \
61 LMC_CSR_WRITE((sc), csr_9, 0x20000); \
63 LMC_CSR_WRITE((sc), csr_9, 0x30000); \
86 #define csr_enetrom csr_9
87 #define csr_reserved csr_10
88 #define csr_full_duplex csr_11
89 #define csr_bootrom csr_10
91 #define csr_watchdog csr_15
92 #define csr_gp_timer csr_11
93 #define csr_srom_mii csr_9
94 #define csr_sia_status csr_12
95 #define csr_sia_connectivity csr_13
96 #define csr_sia_tx_rx csr_14
97 #define csr_sia_general csr_15
103 #define LMC_TDES_FIRST_BUFFER_SIZE ((u32)(0x000007FF))
104 #define LMC_TDES_SECOND_BUFFER_SIZE ((u32)(0x003FF800))
105 #define LMC_TDES_HASH_FILTERING ((u32)(0x00400000))
106 #define LMC_TDES_DISABLE_PADDING ((u32)(0x00800000))
107 #define LMC_TDES_SECOND_ADDR_CHAINED ((u32)(0x01000000))
108 #define LMC_TDES_END_OF_RING ((u32)(0x02000000))
109 #define LMC_TDES_ADD_CRC_DISABLE ((u32)(0x04000000))
110 #define LMC_TDES_SETUP_PACKET ((u32)(0x08000000))
111 #define LMC_TDES_INVERSE_FILTERING ((u32)(0x10000000))
112 #define LMC_TDES_FIRST_SEGMENT ((u32)(0x20000000))
113 #define LMC_TDES_LAST_SEGMENT ((u32)(0x40000000))
114 #define LMC_TDES_INTERRUPT_ON_COMPLETION ((u32)(0x80000000))
116 #define TDES_SECOND_BUFFER_SIZE_BIT_NUMBER 11
117 #define TDES_COLLISION_COUNT_BIT_NUMBER 3
121 #define LMC_RDES_OVERFLOW ((u32)(0x00000001))
122 #define LMC_RDES_CRC_ERROR ((u32)(0x00000002))
123 #define LMC_RDES_DRIBBLING_BIT ((u32)(0x00000004))
124 #define LMC_RDES_REPORT_ON_MII_ERR ((u32)(0x00000008))
125 #define LMC_RDES_RCV_WATCHDOG_TIMEOUT ((u32)(0x00000010))
126 #define LMC_RDES_FRAME_TYPE ((u32)(0x00000020))
127 #define LMC_RDES_COLLISION_SEEN ((u32)(0x00000040))
128 #define LMC_RDES_FRAME_TOO_LONG ((u32)(0x00000080))
129 #define LMC_RDES_LAST_DESCRIPTOR ((u32)(0x00000100))
130 #define LMC_RDES_FIRST_DESCRIPTOR ((u32)(0x00000200))
131 #define LMC_RDES_MULTICAST_FRAME ((u32)(0x00000400))
132 #define LMC_RDES_RUNT_FRAME ((u32)(0x00000800))
133 #define LMC_RDES_DATA_TYPE ((u32)(0x00003000))
134 #define LMC_RDES_LENGTH_ERROR ((u32)(0x00004000))
135 #define LMC_RDES_ERROR_SUMMARY ((u32)(0x00008000))
136 #define LMC_RDES_FRAME_LENGTH ((u32)(0x3FFF0000))
137 #define LMC_RDES_OWN_BIT ((u32)(0x80000000))
139 #define RDES_FRAME_LENGTH_BIT_NUMBER 16
141 #define LMC_RDES_ERROR_MASK ( (u32)( \
143 | LMC_RDES_DRIBBLING_BIT \
144 | LMC_RDES_REPORT_ON_MII_ERR \
145 | LMC_RDES_COLLISION_SEEN ) )
223 #define STATCHECK 0xBEEFCAFE
359 #define LMC_PCI_TIME 1
360 #define LMC_EXT_TIME 0
362 #define PKT_BUF_SZ 1542
365 #define TIMER_INT 0x00000800
366 #define TP_LINK_FAIL 0x00001000
367 #define TP_LINK_PASS 0x00000010
368 #define NORMAL_INT 0x00010000
369 #define ABNORMAL_INT 0x00008000
370 #define RX_JABBER_INT 0x00000200
371 #define RX_DIED 0x00000100
372 #define RX_NOBUFF 0x00000080
373 #define RX_INT 0x00000040
374 #define TX_FIFO_UNDER 0x00000020
375 #define TX_JABBER 0x00000008
376 #define TX_NOBUFF 0x00000004
377 #define TX_DIED 0x00000002
378 #define TX_INT 0x00000001
381 #define OPERATION_MODE 0x00000200
382 #define PROMISC_MODE 0x00000040
383 #define RECEIVE_ALL 0x40000000
384 #define PASS_BAD_FRAMES 0x00000008
387 #define LMC_DEC_ST 0x00002000
388 #define LMC_DEC_SR 0x00000002
391 #define RECV_WATCHDOG_DISABLE 0x00000010
392 #define JABBER_DISABLE 0x00000001
398 #define TULIP_CMD_RECEIVEALL 0x40000000L
399 #define TULIP_CMD_MUSTBEONE 0x02000000L
400 #define TULIP_CMD_TXTHRSHLDCTL 0x00400000L
401 #define TULIP_CMD_STOREFWD 0x00200000L
402 #define TULIP_CMD_NOHEARTBEAT 0x00080000L
403 #define TULIP_CMD_PORTSELECT 0x00040000L
404 #define TULIP_CMD_FULLDUPLEX 0x00000200L
405 #define TULIP_CMD_OPERMODE 0x00000C00L
406 #define TULIP_CMD_PROMISCUOUS 0x00000041L
407 #define TULIP_CMD_PASSBADPKT 0x00000008L
408 #define TULIP_CMD_THRESHOLDCTL 0x0000C000L
410 #define TULIP_GP_PINSET 0x00000100L
411 #define TULIP_BUSMODE_SWRESET 0x00000001L
412 #define TULIP_WATCHDOG_TXDISABLE 0x00000001L
413 #define TULIP_WATCHDOG_RXDISABLE 0x00000010L
415 #define TULIP_STS_NORMALINTR 0x00010000L
416 #define TULIP_STS_ABNRMLINTR 0x00008000L
417 #define TULIP_STS_ERI 0x00004000L
418 #define TULIP_STS_SYSERROR 0x00002000L
419 #define TULIP_STS_GTE 0x00000800L
420 #define TULIP_STS_ETI 0x00000400L
421 #define TULIP_STS_RXWT 0x00000200L
422 #define TULIP_STS_RXSTOPPED 0x00000100L
423 #define TULIP_STS_RXNOBUF 0x00000080L
424 #define TULIP_STS_RXINTR 0x00000040L
425 #define TULIP_STS_TXUNDERFLOW 0x00000020L
426 #define TULIP_STS_TXJABER 0x00000008L
427 #define TULIP_STS_TXNOBUF 0x00000004L
428 #define TULIP_STS_TXSTOPPED 0x00000002L
429 #define TULIP_STS_TXINTR 0x00000001L
431 #define TULIP_STS_RXS_STOPPED 0x00000000L
433 #define TULIP_STS_RXSTOPPED 0x00000100L
434 #define TULIP_STS_RXNOBUF 0x00000080L
436 #define TULIP_CMD_TXRUN 0x00002000L
437 #define TULIP_CMD_RXRUN 0x00000002L
438 #define TULIP_DSTS_TxDEFERRED 0x00000001
439 #define TULIP_DSTS_OWNER 0x80000000
440 #define TULIP_DSTS_RxMIIERR 0x00000008
441 #define LMC_DSTS_ERRSUM (TULIP_DSTS_RxMIIERR)
443 #define TULIP_DEFAULT_INTR_MASK (TULIP_STS_NORMALINTR \
446 | TULIP_STS_ABNRMLINTR \
447 | TULIP_STS_SYSERROR \
448 | TULIP_STS_TXSTOPPED \
449 | TULIP_STS_TXUNDERFLOW\
450 | TULIP_STS_RXSTOPPED )
452 #define DESC_OWNED_BY_SYSTEM ((u32)(0x00000000))
453 #define DESC_OWNED_BY_DC21X4 ((u32)(0x80000000))
455 #ifndef TULIP_CMD_RECEIVEALL
456 #define TULIP_CMD_RECEIVEALL 0x40000000L
460 #define LMC_ADAP_HSSI 2
461 #define LMC_ADAP_DS3 3
462 #define LMC_ADAP_SSI 4
463 #define LMC_ADAP_T1 5
467 #define LMC_CRC_LEN_16 2
468 #define LMC_CRC_LEN_32 4