67 #define XMT_RING_LIMIT 0x7C
69 #define AUTOPOLL0 0x88
70 #define AUTOPOLL1 0x8A
71 #define AUTOPOLL2 0x8C
72 #define AUTOPOLL3 0x8E
73 #define AUTOPOLL4 0x90
74 #define AUTOPOLL5 0x92
77 #define DLY_INT_A 0xA8
78 #define DLY_INT_B 0xAC
80 #define FLOW_CONTROL 0xC8
81 #define PHY_ACCESS 0xD0
85 #define XMT_RING_BASE_ADDR0 0x100
86 #define XMT_RING_BASE_ADDR1 0x108
87 #define XMT_RING_BASE_ADDR2 0x110
88 #define XMT_RING_BASE_ADDR3 0x118
90 #define RCV_RING_BASE_ADDR0 0x120
97 #define XMT_RING_LEN0 0x140
98 #define XMT_RING_LEN1 0x144
99 #define XMT_RING_LEN2 0x148
100 #define XMT_RING_LEN3 0x14C
102 #define RCV_RING_LEN0 0x150
104 #define SRAM_SIZE 0x178
105 #define SRAM_BOUNDARY 0x17A
153 #define PHY_SPEED_10 0x2
154 #define PHY_SPEED_100 0x3
416 AP_VAL = (0xF << 0) | (0xF << 4) |( 0xF << 8) |
433 (1 << 9) | (1 << 10),
449 (1 << 9) | (1 << 10),
463 PAUSE_LEN = (0xF << 0) | (0xF << 4) |( 0xF << 8) | (0xF << 12),
476 (1 << 24) |(1 << 25),
477 PHY_REG_ADDR = (1 << 16) | (1 << 17) | (1 << 18)| (1 << 19) | (1 << 20),
510 #define rcv_miss_pkts 0x00
511 #define rcv_octets 0x01
512 #define rcv_broadcast_pkts 0x02
513 #define rcv_multicast_pkts 0x03
514 #define rcv_undersize_pkts 0x04
515 #define rcv_oversize_pkts 0x05
516 #define rcv_fragments 0x06
517 #define rcv_jabbers 0x07
518 #define rcv_unicast_pkts 0x08
519 #define rcv_alignment_errors 0x09
520 #define rcv_fcs_errors 0x0A
521 #define rcv_good_octets 0x0B
522 #define rcv_mac_ctrl 0x0C
523 #define rcv_flow_ctrl 0x0D
524 #define rcv_pkts_64_octets 0x0E
525 #define rcv_pkts_65to127_octets 0x0F
526 #define rcv_pkts_128to255_octets 0x10
527 #define rcv_pkts_256to511_octets 0x11
528 #define rcv_pkts_512to1023_octets 0x12
529 #define rcv_pkts_1024to1518_octets 0x13
530 #define rcv_unsupported_opcode 0x14
531 #define rcv_symbol_errors 0x15
532 #define rcv_drop_pkts_ring1 0x16
533 #define rcv_drop_pkts_ring2 0x17
534 #define rcv_drop_pkts_ring3 0x18
535 #define rcv_drop_pkts_ring4 0x19
536 #define rcv_jumbo_pkts 0x1A
538 #define xmt_underrun_pkts 0x20
539 #define xmt_octets 0x21
540 #define xmt_packets 0x22
541 #define xmt_broadcast_pkts 0x23
542 #define xmt_multicast_pkts 0x24
543 #define xmt_collisions 0x25
544 #define xmt_unicast_pkts 0x26
545 #define xmt_one_collision 0x27
546 #define xmt_multiple_collision 0x28
547 #define xmt_deferred_transmit 0x29
548 #define xmt_late_collision 0x2A
549 #define xmt_excessive_defer 0x2B
550 #define xmt_loss_carrier 0x2C
551 #define xmt_excessive_collision 0x2D
552 #define xmt_back_pressure 0x2E
553 #define xmt_flow_ctrl 0x2F
554 #define xmt_pkts_64_octets 0x30
555 #define xmt_pkts_65to127_octets 0x31
556 #define xmt_pkts_128to255_octets 0x32
557 #define xmt_pkts_256to511_octets 0x33
558 #define xmt_pkts_512to1023_octets 0x34
559 #define xmt_pkts_1024to1518_octet 0x35
560 #define xmt_oversize_pkts 0x36
561 #define xmt_jumbo_pkts 0x37
566 #define PCI_VENDOR_ID_AMD 0x1022
567 #define PCI_DEVICE_ID_AMD8111E_7462 0x7462
571 #define NUM_TX_BUFFERS 32
572 #define NUM_RX_BUFFERS 32
574 #define TX_BUFF_MOD_MASK 31
575 #define RX_BUFF_MOD_MASK 31
577 #define NUM_TX_RING_DR 32
578 #define NUM_RX_RING_DR 32
580 #define TX_RING_DR_MOD_MASK 31
581 #define RX_RING_DR_MOD_MASK 31
583 #define MAX_FILTER_SIZE 64
584 #define AMD8111E_MIN_MTU 60
585 #define AMD8111E_MAX_MTU 9000
587 #define PKT_BUFF_SZ 1536
588 #define MIN_PKT_LEN 60
590 #define AMD8111E_TX_TIMEOUT (3 * HZ)
591 #define SOFT_TIMER_FREQ 0xBEBC
592 #define DELAY_TIMER_CONV 50
594 #define OPTION_VLAN_ENABLE 0x0001
595 #define OPTION_JUMBO_ENABLE 0x0002
596 #define OPTION_MULTICAST_ENABLE 0x0004
597 #define OPTION_WOL_ENABLE 0x0008
598 #define OPTION_WAKE_MAGIC_ENABLE 0x0010
599 #define OPTION_WAKE_PHY_ENABLE 0x0020
600 #define OPTION_INTR_COAL_ENABLE 0x0040
601 #define OPTION_DYN_IPG_ENABLE 0x0080
603 #define PHY_REG_ADDR_MASK 0x1f
606 #define DEFAULT_IPG 0x60
607 #define IFS1_DELTA 36
608 #define IPG_CONVERGE_JIFFIES (HZ/2)
609 #define IPG_STABLE_TIME 5
617 #define REPEAT_CNT 10
646 #define RESET_RX_FLAGS 0x0000
647 #define TT_MASK 0x000c
648 #define TCC_MASK 0x0003
651 #define AMD8111E_REG_DUMP_LEN 13*sizeof(u32)
687 #define SPEED_INVALID 0xffff
688 #define DUPLEX_INVALID 0xff
689 #define AUTONEG_INVALID 0xff
714 #define MAX_TIMEOUT 40
715 #define MAX_EVENT_COUNT 31
795 #define amd8111e_writeq(_UlData,_memMap) \
796 writel(*(u32*)(&_UlData), _memMap); \
797 writel(*(u32*)((u8*)(&_UlData)+4), _memMap+4)
809 static int speed_duplex[
MAX_UNITS] = { 0, };