[eepro100] 82559ER eeprom

Afzal, Naeem M naeem.m.afzal@intel.com
Fri Jun 14 21:53:01 2002


What could be the reason for the driver to crash during init, when trying to
write eeprom.

Currently linux(2.4.17 rmk2) crashes while in do_eeprom_cmd() when it tries
to write to eeprom. Any suggestion on this would be appreciated.

thanks

naeem
...... do_eeprom_cmd()....

do {
		short dataval = (cmd & (1 << cmd_len)) ? EE_WRITE_1 :
EE_WRITE_0;
		printk("go dataval\n");
		io_outw(dataval, ee_addr); 
		printk("go delay\n");
		udelay(2);
		printk("go dataval EE_SHIFT\n");
		io_outw(dataval | EE_SHIFT_CLK, ee_addr); 
		printk("go delay\n");
		udelay(2);
		retval = (retval << 1) | ((io_inw(ee_addr) & EE_DATA_READ) ?
1 : 0);<--- crashes
	} while (--cmd_len >= 0);

Nic settings:
Linux version 2.4.17-rmk2-adi (root@optimus) (gcc version 2.95.3)
PCI Autoconfig: BAR 0, Mem, size=0x1000, address=0xfffff000
PCI Autoconfig: BAR 1, I/O, size=0x40, address=0xd9ffffc0
PCI Autoconfig: BAR 2, Mem, size=0x20000, address=0xfffc0000


......
go init_etherdev

done init_etherdev

go read eeprom

go EE_ENB, ee_addr=0xD9FFFFCE

go delay

go io_outw

go delay

go dataval

go delay

go dataval EE_SHIFT

go delay

Bad mode in data abort handler detected: mode IRQ_32

Vectors:

Stubs:

Internal error: Oops: 0

CPU: 0

pc : [<ffff0014>]    lr : [<400b4fc8>]    Not tainted

sp : 5ffadc40  ip : 5ffadc34  fp : 5ffadcb0

r10: 06000000  r9 : 4012aebc  r8 : 4012ae98

r7 : 00000000  r6 : 0000001b  r5 : d9ffffce  r4 : 00004803

r3 : 4013f19c  r2 : 00000000  r1 : 0000001a  r0 : 00000000

Flags: nZCv  IRQs off  FIQs on  Mode IRQ_32  Segment kernel

Control: 397F  Table: 00004000  DAC: 0000001D

Process swapper (pid: 1, stackpage=5ffad000)