2#error multicast support is not yet implemented
56#define LAN595FX_10ISA 3
58#define SLOW_DOWN inb(0x80);
65#define GetBit(x,y) ((x & (1<<y))>>y)
72#define ee_FlashMask 0x7
91#define ee_reserved1 10
93#define ee_reserved2 14
107#define ee_BootTypeMask 0x3
109#define ee_FlashSock 4
113#define ee_PowerMgt 10
119#define ee_StepMask 0x0F
121#define ee_BoardMask 0x0FFF
124#define ee_INT_TO_IRQ 0
125#define ee_FX_INT2IRQ 0x1EB8
129#define ee_Checksum 0xBABA
133#define ee_addr_vendor 0x10
134#define ee_addr_id 0x11
135#define ee_addr_SN 0x12
136#define ee_addr_CRC_8 0x14
139#define ee_vendor_intel0 0x25
140#define ee_vendor_intel1 0xD4
141#define ee_id_eepro10p0 0x10
142#define ee_id_eepro10p1 0x31
148#define RAM_SIZE 0x8000
151#define RCV_DEFAULT_RAM 0x6000
152#define RCV_RAM rcv_ram
157#define XMT_RAM (RAM_SIZE - RCV_RAM)
159#define XMT_START ((rcv_start + RCV_RAM) % RAM_SIZE)
161#define RCV_LOWER_LIMIT (rcv_start >> 8)
162#define RCV_UPPER_LIMIT (((rcv_start + RCV_RAM) - 2) >> 8)
163#define XMT_LOWER_LIMIT (XMT_START >> 8)
164#define XMT_UPPER_LIMIT (((XMT_START + XMT_RAM) - 2) >> 8)
166#define RCV_START_PRO 0x00
167#define RCV_START_10 XMT_RAM
171#define RCV_DONE 0x0008
173#define RX_ERROR 0x0d81
175#define TX_DONE_BIT 0x0080
176#define CHAIN_BIT 0x8000
177#define XMT_STATUS 0x02
178#define XMT_CHAIN 0x04
179#define XMT_COUNT 0x06
181#define BANK0_SELECT 0x00
182#define BANK1_SELECT 0x40
183#define BANK2_SELECT 0x80
186#define COMMAND_REG 0x00
189#define DIAGNOSE_CMD 0x07
190#define RCV_ENABLE_CMD 0x08
191#define RCV_DISABLE_CMD 0x0a
192#define STOP_RCV_CMD 0x0b
193#define RESET_CMD 0x0e
194#define POWER_DOWN_CMD 0x18
195#define RESUME_XMT_CMD 0x1c
196#define SEL_RESET_CMD 0x1e
197#define STATUS_REG 0x01
200#define EXEC_STATUS 0x30
202#define R_ROBIN_BITS 0xc0
203#define ID_REG_MASK 0x2c
204#define ID_REG_SIG 0x24
205#define AUTO_ENABLE 0x10
206#define INT_MASK_REG 0x03
207#define RX_STOP_MASK 0x01
210#define EXEC_MASK 0x08
212#define IO_32_BIT 0x10
216#define XMT_BAR_PRO 0x0a
217#define XMT_BAR_10 0x0b
220#define HOST_ADDRESS_REG 0x0c
222#define IO_PORT_32_BIT 0x0c
226#define WORD_WIDTH 0x02
227#define INT_ENABLE 0x80
228#define INT_NO_REG 0x02
229#define RCV_LOWER_LIMIT_REG 0x08
230#define RCV_UPPER_LIMIT_REG 0x09
232#define XMT_LOWER_LIMIT_REG_PRO 0x0a
233#define XMT_UPPER_LIMIT_REG_PRO 0x0b
234#define XMT_LOWER_LIMIT_REG_10 0x0b
235#define XMT_UPPER_LIMIT_REG_10 0x0a
240#define XMT_Chain_Int 0x20
241#define XMT_Chain_ErrStop 0x40
242#define RCV_Discard_BadFrame 0x80
244#define PRMSC_Mode 0x01
251#define A_N_ENABLE 0x02
253#define I_ADD_REG0 0x04
254#define I_ADD_REG1 0x05
255#define I_ADD_REG2 0x06
256#define I_ADD_REG3 0x07
257#define I_ADD_REG4 0x08
258#define I_ADD_REG5 0x09
260#define EEPROM_REG_PRO 0x0a
261#define EEPROM_REG_10 0x0b
273#define eeprom_delay() { udelay(40); }
274#define EE_READ_CMD (6 << 6)
277#define eepro_full_reset(ioaddr) outb(RESET_CMD, ioaddr); udelay(255);
280#define eepro_sel_reset(ioaddr) \
282 outb ( SEL_RESET_CMD, ioaddr ); \
288#define eepro_clear_int(ioaddr) outb(ALL_MASK, ioaddr + STATUS_REG)
291#define eepro_en_rx(ioaddr) outb(RCV_ENABLE_CMD, ioaddr)
294#define eepro_dis_rx(ioaddr) outb(RCV_DISABLE_CMD, ioaddr)
297#define eepro_sw2bank0(ioaddr) outb(BANK0_SELECT, ioaddr)
298#define eepro_sw2bank1(ioaddr) outb(BANK1_SELECT, ioaddr)
299#define eepro_sw2bank2(ioaddr) outb(BANK2_SELECT, ioaddr)
317 DBG(
"Stepping %d\n", temp_reg >> 5);
359 unsigned int rcv_event, rcv_status, rcv_next_frame, rcv_size;
377 if ( ! retrieve )
return 1;
383 printf(
"%hX %hX %d %hhX\n", rcv_status, rcv_next_frame, rcv_size,
387 printf(
"Receive error %hX\n", rcv_status);
395 for (i = 0; i < 48; i++) {
397 putchar(i % 16 == 15 ?
'\n' :
' ');
462 while (boguscount > 0) {
468 if ((
status & 0x2000) == 0) {
505 unsigned short retval = 0;
515 outb(ctrl_val, ee_addr);
517 for (i = 8; i >= 0; i--) {
518 short outval = (
read_cmd & (1 << i)) ? ctrl_val |
EEDI : ctrl_val;
519 outb(outval, ee_addr);
522 outb(outval, ee_addr);
525 outb(ctrl_val, ee_addr);
526 for (i = 16; i > 0; i--) {
530 outb(ctrl_val, ee_addr);
537 outb(ctrl_val, ee_addr);
580 if ( ( station_addr.saddr[2] == 0x0000 ) ||
581 ( station_addr.saddr[2] == 0xFFFF ) ) {
593 name =
"Intel EtherExpress 10 ISA";
595 name =
"Intel EtherExpress Pro/10+ ISA";
597 }
else if (station_addr.saddr[0] ==
SA_ADDR1) {
598 name =
"Intel EtherExpress Pro/10 ISA";
602 name =
"Intel 82595-based LAN card";
604 station_addr.saddr[0] =
bswap_16(station_addr.saddr[0]);
605 station_addr.saddr[1] =
bswap_16(station_addr.saddr[1]);
606 station_addr.saddr[2] =
bswap_16(station_addr.saddr[2]);
631 0x300, 0x210, 0x240, 0x280, 0x2C0, 0x200, 0x320, 0x340, 0x360,
640ISA_ROM (
"eepro",
"Intel Etherexpress Pro/10" );
#define assert(condition)
Assert a condition at run-time.
int putchar(int character)
Write a single character to each console device.
static unsigned long ioaddr
static unsigned eeprom_reg
static struct nic_operations eepro_operations
static unsigned xmt_lower_limit_reg
#define RCV_Discard_BadFrame
#define eepro_sw2bank1(ioaddr)
static unsigned int mem_end
static unsigned int tx_start
static void eepro_irq(struct nic *nic __unused, irq_action_t action __unused)
static unsigned int mem_start
#define XMT_LOWER_LIMIT_REG_10
#define eepro_sel_reset(ioaddr)
static isa_probe_addr_t eepro_probe_addrs[]
#define eepro_sw2bank0(ioaddr)
static int eepro_probe1(isa_probe_addr_t ioaddr)
#define RCV_UPPER_LIMIT_REG
#define XMT_UPPER_LIMIT_REG_10
#define eepro_full_reset(ioaddr)
static unsigned rcv_start
static unsigned int tx_end
#define XMT_Chain_ErrStop
static int eepro_poll(struct nic *nic, int retrieve)
#define XMT_LOWER_LIMIT_REG_PRO
#define eepro_sw2bank2(ioaddr)
static void eepro_disable(struct nic *nic, struct isa_device *isa __unused)
#define eepro_en_rx(ioaddr)
#define RCV_LOWER_LIMIT_REG
static unsigned xmt_upper_limit_reg
static unsigned int rx_start
static void eepro_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p)
#define eepro_clear_int(ioaddr)
static int eepro_probe(struct nic *nic, struct isa_device *isa)
#define XMT_UPPER_LIMIT_REG_PRO
static int read_eeprom(uint16_t ioaddr, int location)
static void eepro_reset(struct nic *nic)
uint8_t id
Request identifier.
uint32_t type
Operating system type.
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
#define __unused
Declare a variable or data structure as unused.
#define DBG(...)
Print a debugging message.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define outb(data, io_addr)
#define outw(data, io_addr)
#define insw(io_addr, data, count)
#define outsw(io_addr, data, count)
uint16_t isa_probe_addr_t
#define ISA_ROM(IMAGE, DESCRIPTION)
#define GENERIC_ISAPNP_VENDOR
int dummy_connect(struct nic *nic __unused)
uint32_t end
Ending offset.
#define DRIVER(_name_text, _unused2, _unused3, _name, _probe, _disable, _fake_bss)
#define ISA_DRIVER(_name, _probe_addrs, _probe_addr, _vendor_id, _prod_id)
struct @002057171240057303273132130141036221271355330106 no_fake_bss
static struct command_descriptor read_cmd
"read" command descriptor
uint16_t ioaddr
I/O address.
unsigned char * node_addr
struct nic_operations * nic_op
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
int printf(const char *fmt,...)
Write a formatted string to the console.