Go to the documentation of this file.
26 #define HP100_PAGE_PERFORMANCE 0x0
27 #define HP100_PAGE_MAC_ADDRESS 0x1
28 #define HP100_PAGE_HW_MAP 0x2
29 #define HP100_PAGE_EEPROM_CTRL 0x3
30 #define HP100_PAGE_MAC_CTRL 0x4
31 #define HP100_PAGE_MMU_CFG 0x5
32 #define HP100_PAGE_ID_MAC_ADDR 0x6
33 #define HP100_PAGE_MMU_POINTER 0x7
38 #define HP100_REG_HW_ID 0x00
39 #define HP100_REG_TRACE 0x00
40 #define HP100_REG_PAGING 0x02
42 #define HP100_REG_OPTION_LSW 0x04
43 #define HP100_REG_OPTION_MSW 0x06
47 #define HP100_REG_IRQ_STATUS 0x08
48 #define HP100_REG_IRQ_MASK 0x0a
49 #define HP100_REG_FRAGMENT_LEN 0x0c
52 #define HP100_REG_OFFSET 0x0e
53 #define HP100_REG_DATA32 0x10
54 #define HP100_REG_DATA16 0x12
55 #define HP100_REG_TX_MEM_FREE 0x14
56 #define HP100_REG_TX_PDA_L 0x14
57 #define HP100_REG_TX_PDA_H 0x1c
58 #define HP100_REG_RX_PKT_CNT 0x18
59 #define HP100_REG_TX_PKT_CNT 0x19
60 #define HP100_REG_RX_PDL 0x1a
61 #define HP100_REG_TX_PDL 0x1b
62 #define HP100_REG_RX_PDA 0x18
64 #define HP100_REG_SL_EARLY 0x1c
65 #define HP100_REG_STAT_DROPPED 0x20
66 #define HP100_REG_STAT_ERRORED 0x22
67 #define HP100_REG_STAT_ABORT 0x23
68 #define HP100_REG_RX_RING 0x24
69 #define HP100_REG_32_FRAGMENT_LEN 0x28
70 #define HP100_REG_32_OFFSET 0x2c
74 #define HP100_REG_MAC_ADDR 0x08
75 #define HP100_REG_HASH_BYTE0 0x10
79 #define HP100_REG_MEM_MAP_LSW 0x08
80 #define HP100_REG_MEM_MAP_MSW 0x0a
81 #define HP100_REG_IO_MAP 0x0c
82 #define HP100_REG_IRQ_CHANNEL 0x0d
83 #define HP100_REG_SRAM 0x0e
84 #define HP100_REG_BM 0x0f
87 #define HP100_REG_MODECTRL1 0x10
88 #define HP100_REG_MODECTRL2 0x11
89 #define HP100_REG_PCICTRL1 0x12
90 #define HP100_REG_PCICTRL2 0x13
91 #define HP100_REG_PCIBUSMLAT 0x15
92 #define HP100_REG_EARLYTXCFG 0x16
93 #define HP100_REG_EARLYRXCFG 0x18
94 #define HP100_REG_ISAPNPCFG1 0x1a
95 #define HP100_REG_ISAPNPCFG2 0x1b
99 #define HP100_REG_EEPROM_CTRL 0x08
100 #define HP100_REG_BOOTROM_CTRL 0x0a
104 #define HP100_REG_10_LAN_CFG_1 0x08
105 #define HP100_REG_10_LAN_CFG_2 0x09
106 #define HP100_REG_VG_LAN_CFG_1 0x0a
107 #define HP100_REG_VG_LAN_CFG_2 0x0b
108 #define HP100_REG_MAC_CFG_1 0x0c
109 #define HP100_REG_MAC_CFG_2 0x0d
110 #define HP100_REG_MAC_CFG_3 0x0e
111 #define HP100_REG_MAC_CFG_4 0x0f
112 #define HP100_REG_DROPPED 0x10
113 #define HP100_REG_CRC 0x12
114 #define HP100_REG_ABORT 0x13
115 #define HP100_REG_TRAIN_REQUEST 0x14
116 #define HP100_REG_TRAIN_ALLOW 0x16
120 #define HP100_REG_RX_MEM_STOP 0x0c
121 #define HP100_REG_TX_MEM_STOP 0x0e
122 #define HP100_REG_PDL_MEM_STOP 0x10
123 #define HP100_REG_ECB_MEM_STOP 0x14
127 #define HP100_REG_BOARD_ID 0x08
128 #define HP100_REG_BOARD_IO_CHCK 0x0c
129 #define HP100_REG_SOFT_MODEL 0x0d
130 #define HP100_REG_LAN_ADDR 0x10
131 #define HP100_REG_LAN_ADDR_CHCK 0x16
135 #define HP100_REG_PTR_RXSTART 0x08
136 #define HP100_REG_PTR_RXEND 0x0a
137 #define HP100_REG_PTR_TXSTART 0x0c
138 #define HP100_REG_PTR_TXEND 0x0e
139 #define HP100_REG_PTR_RPDLSTART 0x10
140 #define HP100_REG_PTR_RPDLEND 0x12
141 #define HP100_REG_PTR_RINGPTRS 0x14
142 #define HP100_REG_PTR_MEMDEBUG 0x1a
149 #define HP100_HW_ID_CASCADE 0x4850
156 #define HP100_CHIPID_MASK 0xFFF0
157 #define HP100_CHIPID_SHASTA 0x5350
159 #define HP100_CHIPID_RAINIER 0x5360
161 #define HP100_CHIPID_LASSEN 0x5370
168 #define HP100_DEBUG_EN 0x8000
169 #define HP100_RX_HDR 0x4000
171 #define HP100_MMAP_DIS 0x2000
175 #define HP100_EE_EN 0x1000
176 #define HP100_BM_WRITE 0x0800
177 #define HP100_BM_READ 0x0400
178 #define HP100_TRI_INT 0x0200
179 #define HP100_MEM_EN 0x0040
182 #define HP100_IO_EN 0x0020
183 #define HP100_BOOT_EN 0x0010
184 #define HP100_FAKE_INT 0x0008
185 #define HP100_INT_EN 0x0004
186 #define HP100_HW_RST 0x0002
193 #define HP100_PRIORITY_TX 0x0080
194 #define HP100_EE_LOAD 0x0040
195 #define HP100_ADV_NXT_PKT 0x0004
197 #define HP100_TX_CMD 0x0002
206 #define HP100_RX_EARLY_INT 0x2000
207 #define HP100_RX_PDA_ZERO 0x1000
208 #define HP100_RX_PDL_FILL_COMPL 0x0800
209 #define HP100_RX_PACKET 0x0400
210 #define HP100_RX_ERROR 0x0200
211 #define HP100_TX_PDA_ZERO 0x0020
212 #define HP100_TX_SPACE_AVAIL 0x0010
213 #define HP100_TX_COMPLETE 0x0008
214 #define HP100_MISC_ERROR 0x0004
215 #define HP100_TX_ERROR 0x0002
221 #define HP100_AUTO_COMPARE 0x80000000
222 #define HP100_FREE_SPACE 0x7fffffe0
228 #define HP100_ZERO_WAIT_EN 0x80
229 #define HP100_IRQ_SCRAMBLE 0x40
230 #define HP100_BOND_HP 0x20
231 #define HP100_LEVEL_IRQ 0x10
233 #define HP100_IRQMASK 0x0F
239 #define HP100_RAM_SIZE_MASK 0xe0
240 #define HP100_RAM_SIZE_SHIFT 0x05
246 #define HP100_BM_BURST_RD 0x01
248 #define HP100_BM_BURST_WR 0x02
250 #define HP100_BM_MASTER 0x04
251 #define HP100_BM_PAGE_CK 0x08
253 #define HP100_BM_PCI_8CLK 0x40
260 #define HP100_TX_DUALQ 0x10
262 #define HP100_ISR_CLRMODE 0x02
264 #define HP100_EE_NOLOAD 0x04
266 #define HP100_TX_CNT_FLG 0x08
267 #define HP100_PDL_USE3 0x10
270 #define HP100_BUSTYPE_MASK 0xe0
276 #define HP100_EE_MASK 0x0f
278 #define HP100_DIS_CANCEL 0x20
279 #define HP100_EN_PDL_WB 0x40
281 #define HP100_EN_BUS_FAIL 0x80
288 #define HP100_LO_MEM 0x01
289 #define HP100_NO_MEM 0x02
291 #define HP100_USE_ISA 0x04
293 #define HP100_IRQ_HI_MASK 0xf0
294 #define HP100_PCI_IRQ_HI_MASK 0x78
300 #define HP100_RD_LINE_PDL 0x01
301 #define HP100_RD_TX_DATA_MASK 0x06
302 #define HP100_MWI 0x08
303 #define HP100_ARB_MODE 0x10
304 #define HP100_STOP_EN 0x20
306 #define HP100_IGNORE_PAR 0x40
307 #define HP100_PCI_RESET 0x80
313 #define HP100_EN_EARLY_TX 0x8000
314 #define HP100_EN_ADAPTIVE 0x4000
315 #define HP100_EN_TX_UR_IRQ 0x2000
316 #define HP100_EN_LOW_TX 0x1000
317 #define HP100_ET_CNT_MASK 0x0fff
323 #define HP100_EN_EARLY_RX 0x80
324 #define HP100_EN_LOW_RX 0x40
325 #define HP100_RX_TRIP_MASK 0x1f
334 #define HP100_EEPROM_LOAD 0x0001
342 #define HP100_MAC10_SEL 0xc0
343 #define HP100_AUI_SEL 0x20
344 #define HP100_LOW_TH 0x10
345 #define HP100_LINK_BEAT_DIS 0x08
346 #define HP100_LINK_BEAT_ST 0x04
347 #define HP100_R_ROL_ST 0x02
349 #define HP100_AUI_ST 0x01
355 #define HP100_SQU_ST 0x01
357 #define HP100_FULLDUP 0x02
358 #define HP100_DOT3_MAC 0x04
363 #define HP100_AUTO_SEL_10 0x0
364 #define HP100_XCVR_LXT901_10 0x1
365 #define HP100_XCVR_7213 0x2
366 #define HP100_XCVR_82503 0x3
372 #define HP100_FRAME_FORMAT 0x08
373 #define HP100_BRIDGE 0x04
374 #define HP100_PROM_MODE 0x02
376 #define HP100_REPEATER 0x01
383 #define HP100_VG_SEL 0x80
384 #define HP100_LINK_UP_ST 0x40
385 #define HP100_LINK_CABLE_ST 0x20
387 #define HP100_LOAD_ADDR 0x10
390 #define HP100_LINK_CMD 0x08
393 #define HP100_TRN_DONE 0x04
396 #define HP100_LINK_GOOD_ST 0x02
397 #define HP100_VG_RESET 0x01
404 #define HP100_RX_IDLE 0x80
405 #define HP100_TX_IDLE 0x40
406 #define HP100_RX_EN 0x20
407 #define HP100_TX_EN 0x10
408 #define HP100_ACC_ERRORED 0x08
409 #define HP100_ACC_MC 0x04
410 #define HP100_ACC_BC 0x02
411 #define HP100_ACC_PHY 0x01
412 #define HP100_MAC1MODEMASK 0xf0
413 #define HP100_MAC1MODE1 0x00
414 #define HP100_MAC1MODE2 0x00
415 #define HP100_MAC1MODE3 HP100_MAC1MODE2 | HP100_ACC_BC
416 #define HP100_MAC1MODE4 HP100_MAC1MODE3 | HP100_ACC_MC
417 #define HP100_MAC1MODE5 HP100_MAC1MODE4
418 #define HP100_MAC1MODE6 HP100_MAC1MODE5 | HP100_ACC_PHY
422 #define HP100_MAC1MODE7 HP100_MAC1MODE6 | HP100_ACC_ERRORED
428 #define HP100_TR_MODE 0x80
429 #define HP100_TX_SAME 0x40
430 #define HP100_LBK_XCVR 0x20
432 #define HP100_LBK_MAC 0x10
433 #define HP100_CRC_I 0x08
434 #define HP100_ACCNA 0x04
436 #define HP100_KEEP_CRC 0x02
438 #define HP100_ACCFA 0x01
440 #define HP100_MAC2MODEMASK 0x02
441 #define HP100_MAC2MODE1 0x00
442 #define HP100_MAC2MODE2 0x00
443 #define HP100_MAC2MODE3 0x00
444 #define HP100_MAC2MODE4 0x00
445 #define HP100_MAC2MODE5 0x00
446 #define HP100_MAC2MODE6 0x00
447 #define HP100_MAC2MODE7 KEEP_CRC
453 #define HP100_PACKET_PACE 0x03
459 #define HP100_LRF_EN 0x04
461 #define HP100_AUTO_MODE 0x10
467 #define HP100_MAC_SEL_ST 0x01
469 #define HP100_LINK_FAIL_ST 0x02
476 #define HP100_MACRQ_REPEATER 0x0001
479 #define HP100_MACRQ_PROMSC 0x0006
485 #define HP100_MACRQ_FRAMEFMT_EITHER 0x0018
486 #define HP100_MACRQ_FRAMEFMT_802_3 0x0000
487 #define HP100_MACRQ_FRAMEFMT_802_5 0x0010
488 #define HP100_CARD_MACVER 0xe000
489 #define HP100_MALLOW_REPEATER 0x0001
491 #define HP100_MALLOW_PROMSC 0x0004
497 #define HP100_MALLOW_FRAMEFMT 0x00e0
500 #define HP100_MALLOW_ACCDENIED 0x0400
501 #define HP100_MALLOW_CONFIGURE 0x0f00
502 #define HP100_MALLOW_DUPADDR 0x1000
503 #define HP100_HUB_MACVER 0xe000
511 #define HP100_SET_HB 0x0100
512 #define HP100_SET_LB 0x0001
513 #define HP100_RESET_HB 0x0000
514 #define HP100_RESET_LB 0x0000
519 #define HP100_LAN_100 100
520 #define HP100_LAN_10 10
521 #define HP100_LAN_COAX 9
522 #define HP100_LAN_ERR (-1)
528 #define MAX_RX_PDL 30
529 #define MAX_RX_FRAG 2
530 #define MAX_TX_PDL 29
531 #define MAX_TX_FRAG 2
535 #define MAX_RINGSIZE ((MAX_RX_FRAG*8+4+4)*MAX_RX_PDL+(MAX_TX_FRAG*8+4+4)*MAX_TX_PDL)+16
538 #define MIN_ETHER_SIZE 60
539 #define MAX_ETHER_SIZE 1514
554 #define HP100_PKT_LEN_MASK 0x1FFF
559 #define HP100_RX_PRI 0x8000
560 #define HP100_SDF_ERR 0x4000
561 #define HP100_SKEW_ERR 0x2000
562 #define HP100_BAD_SYMBOL_ERR 0x1000
563 #define HP100_RCV_IPM_ERR 0x0800
565 #define HP100_SYMBOL_BAL_ERR 0x0400
566 #define HP100_VG_ALN_ERR 0x0200
567 #define HP100_TRUNC_ERR 0x0100
568 #define HP100_RUNT_ERR 0x0040
570 #define HP100_ALN_ERR 0x0010
571 #define HP100_CRC_ERR 0x0008
575 #define HP100_MULTI_ADDR_HASH 0x0006
576 #define HP100_BROADCAST_ADDR 0x0003
577 #define HP100_MULTI_ADDR_NO_HASH 0x0002
578 #define HP100_PHYS_ADDR_MATCH 0x0001
579 #define HP100_PHYS_ADDR_NO_MATCH 0x0000
585 #define hp100_inb( reg ) \
586 inb( ioaddr + HP100_REG_##reg )
587 #define hp100_inw( reg ) \
588 inw( ioaddr + HP100_REG_##reg )
589 #define hp100_inl( reg ) \
590 inl( ioaddr + HP100_REG_##reg )
591 #define hp100_outb( data, reg ) \
592 outb( data, ioaddr + HP100_REG_##reg )
593 #define hp100_outw( data, reg ) \
594 outw( data, ioaddr + HP100_REG_##reg )
595 #define hp100_outl( data, reg ) \
596 outl( data, ioaddr + HP100_REG_##reg )
597 #define hp100_orb( data, reg ) \
598 outb( inb( ioaddr + HP100_REG_##reg ) | (data), ioaddr + HP100_REG_##reg )
599 #define hp100_orw( data, reg ) \
600 outw( inw( ioaddr + HP100_REG_##reg ) | (data), ioaddr + HP100_REG_##reg )
601 #define hp100_andb( data, reg ) \
602 outb( inb( ioaddr + HP100_REG_##reg ) & (data), ioaddr + HP100_REG_##reg )
603 #define hp100_andw( data, reg ) \
604 outw( inw( ioaddr + HP100_REG_##reg ) & (data), ioaddr + HP100_REG_##reg )
606 #define hp100_page( page ) \
607 outw( HP100_PAGE_##page, ioaddr + HP100_REG_PAGING )
608 #define hp100_ints_off() \
609 outw( HP100_INT_EN | HP100_RESET_LB, ioaddr + HP100_REG_OPTION_LSW )
610 #define hp100_ints_on() \
611 outw( HP100_INT_EN | HP100_SET_LB, ioaddr + HP100_REG_OPTION_LSW )
612 #define hp100_mem_map_enable() \
613 outw( HP100_MMAP_DIS | HP100_RESET_HB, ioaddr + HP100_REG_OPTION_LSW )
614 #define hp100_mem_map_disable() \
615 outw( HP100_MMAP_DIS | HP100_SET_HB, ioaddr + HP100_REG_OPTION_LSW )