sean finney on Sun, 17 Nov 2002 21:50:07 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] sis900 (sos!)


heya,

i noticed that there was a 3com controller listed in your lspci, have
you tried using that module instead?

if that doesn't work, as a hack, how about bypassing that code alltogether?
mac addresses really aren't that important (and can be overridden in
userland anyways), so if this isn't a symptom of a larger problem, it
Might Just Work to not read in the address from the EEPROM (see below).
i don't know how comfortable you are with rolling your own kernel and
modules, but see if the attached diff works for you.  of course, don't
hold me liable for any funkiness that results :)

--sean
*** sis900.c	2002-11-17 21:23:11.000000000 -0500
--- sis900.patched.c	2002-11-17 21:28:38.000000000 -0500
***************
*** 226,237 ****
  	if (signature == 0xffff || signature == 0x0000) {
  		printk (KERN_INFO "%s: Error EERPOM read %x\n", 
  			net_dev->name, signature);
- 		return 0;
  	}
  
  	/* get MAC address from EEPROM */
! 	for (i = 0; i < 3; i++)
  	        ((u16 *)(net_dev->dev_addr))[i] = read_eeprom(ioaddr, i+EEPROMMACAddr);
  
  	return 1;
  }
--- 226,244 ----
  	if (signature == 0xffff || signature == 0x0000) {
  		printk (KERN_INFO "%s: Error EERPOM read %x\n", 
  			net_dev->name, signature);
  	}
  
  	/* get MAC address from EEPROM */
! 	if (signature == 0xffff || signature == 0x0000){
! 		printk (KERN_INFO "%s: warning, improvising a mac address...\n",
! 			net_dev->name);
! 		((u16 *)(net_dev->dev_addr))[0] = 0x1337;
! 		((u16 *)(net_dev->dev_addr))[1] = 0xDEAD;
! 		((u16 *)(net_dev->dev_addr))[2] = 0xBEEF;
! 	} else {
! 		for (i = 0; i < 3; i++)
  	        ((u16 *)(net_dev->dev_addr))[i] = read_eeprom(ioaddr, i+EEPROMMACAddr);
+ 	}
  
  	return 1;
  }

Attachment: pgp1l4rr0WzBm.pgp
Description: PGP signature