diff -u -r1.1.1.6 pcnet32.c --- linux/drivers/net/pcnet32.c 2001/01/20 11:10:30 1.1.1.6 +++ linux/drivers/net/pcnet32.c 2001/02/14 21:43:28 @@ -648,10 +648,32 @@ printk(KERN_INFO "%s: %s at %#3lx,", dev->name, chipname, ioaddr); - /* There is a 16 byte station address PROM at the base address. - The first six bytes are the station address. */ - for (i = 0; i < 6; i++) - printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); + /* In most chips, there is a station address PROM at the base address. + * However, if that does not have a valid address, try the "Physical + * Address Registers" CSR12-CSR14 + * Currently, we only check for 00:00:00:00:00:00 as invalid. + */ + { + int valid_station=0; + /* There is a 16 byte station address PROM at the base address. + The first six bytes are the station address. */ + for (i = 0; i < 6; i++) { + unsigned int addr = inb(ioaddr + i); + valid_station |= addr; + dev->dev_addr[i] = addr; + } + if( !valid_station ) { + for (i = 0; i < 3; i++) { + unsigned int v; + v = a->read_csr(ioaddr, i+12); + /* There may be endianness issues here. */ + dev->dev_addr[2*i] = v & 0x0ff; + dev->dev_addr[2*i+1] = (v >> 8) & 0x0ff; + } + } + for (i = 0; i < 6; i++) + printk(" %2.2x", dev->dev_addr[i] ); + } if (((chip_version + 1) & 0xfffe) == 0x2624) { /* Version 0x2623 or 0x2624 */ i = a->read_csr(ioaddr, 80) & 0x0C00; /* Check tx_start_pt */