Re: [PATCH] pcnet32.c: MAC address may be in CSR registers

2001-02-15 Thread Eli Carter
Alan Cox wrote: > > > Peter pointed out that the contents of the CSR12-14 registers are > > initialized from the EEPROM, so reading the EEPROM is superfluous--we > > should just read the CSRs and not read the EEPROM. I think he has a > > point, so I'll make that change and submit yet another pat

Re: [PATCH] pcnet32.c: MAC address may be in CSR registers

2001-02-15 Thread Eli Carter
Alan Cox wrote: > I'd rather keep the existing initialisation behaviour of using the eeprom > for 2.2. There are also some power management cases where I am not sure > the values are restored on the pcnet/pci. > > For 2.2 conservatism is the key. For 2.4 by all means default to CSR12-14 and > pri

Re: [PATCH] pcnet32.c: MAC address may be in CSR registers

2001-02-15 Thread Alan Cox
> Peter pointed out that the contents of the CSR12-14 registers are > initialized from the EEPROM, so reading the EEPROM is superfluous--we > should just read the CSRs and not read the EEPROM. I think he has a > point, so I'll make that change and submit yet another patch pair. I'd rather keep

Re: [PATCH] pcnet32.c: MAC address may be in CSR registers

2001-02-15 Thread Eli Carter
Alan Cox wrote: > > > +int is_valid_ether_addr( char* address ) > > +{ > > +int i,isvalid=0; > > +for( i=0; i<6; i++) > > + isvalid |= address[i]; > > +return isvalid && !(address[0]&1); > > +} > > static and why not oops, I *meant* static... doesn't gcc do mind reading? ;) (I

Re: [PATCH] pcnet32.c: MAC address may be in CSR registers

2001-02-15 Thread Richard B. Johnson
On Wed, 14 Feb 2001, Eli Carter wrote: > Eli Carter wrote: > > I'm dealing with an AMD chip that does not have the station address in > > the PROM at the base address, but resides in the "Physical Address > > Registers" in the chip (thanks to the bootloader in my case). This > > patch makes the

Re: [PATCH] pcnet32.c: MAC address may be in CSR registers

2001-02-14 Thread Alan Cox
> +int is_valid_ether_addr( char* address ) > +{ > +int i,isvalid=0; > +for( i=0; i<6; i++) > + isvalid |= address[i]; > +return isvalid && !(address[0]&1); > +} static and why not static inline int is_valid_ea(u8 *addr) { return memcmp(addr, "\000\000\000\000\000\000",

Re: [PATCH] pcnet32.c: MAC address may be in CSR registers

2001-02-14 Thread Eli Carter
Eli Carter wrote: > I'm dealing with an AMD chip that does not have the station address in > the PROM at the base address, but resides in the "Physical Address > Registers" in the chip (thanks to the bootloader in my case). This > patch makes the driver try those registers if the station address

[PATCH] pcnet32.c: MAC address may be in CSR registers

2001-02-14 Thread Eli Carter
All, Thomas Bogendoerfer is listed as maintainer. Richard, I know you've done some work with this driver so I thought you might be interested. Alan, I'd like to see this find its way into the official version(s), so feedback would be appreciated if you don't apply it. (In your copious spare ti