--- zzzz-none-000/linux-2.4.17/drivers/net/pcnet32.c 2001-11-11 18:09:33.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/drivers/net/pcnet32.c 2004-11-24 13:23:31.000000000 +0000 @@ -617,6 +617,15 @@ ltint = 1; } +#if defined(CONFIG_SH_7751_SOLUTION_ENGINE) + a->write_bcr(ioaddr, 18, (a->read_bcr(ioaddr, 18) | 0x0060)); +#if 0 /* May want to try these in case of Tx FIFO underrun */ + a->write_csr(ioaddr, 80, (a->read_csr(ioaddr, 80) & ~0x0C00) | 0x0C00); + a->write_bcr(ioaddr, 25, 0x16); + a->write_bcr(ioaddr, 26, 0x08); +#endif +#endif + dev = init_etherdev(NULL, 0); if(dev==NULL) return -ENOMEM; @@ -645,8 +654,8 @@ if( memcmp( promaddr, dev->dev_addr, 6) ) { printk(" warning PROM address does not match CSR address\n"); -#if defined(__i386__) - printk(KERN_WARNING "%s: Probably a Compaq, using the PROM address of", dev->name); +#if defined(__i386__) || defined(__powerpc__) + printk(KERN_WARNING "%s: Using the PROM address of", dev->name); memcpy(dev->dev_addr, promaddr, 6); #endif } @@ -656,6 +665,22 @@ for (i = 0; i < 6; i++) dev->dev_addr[i]=0; +#ifdef CONFIG_SH_7751_SOLUTION_ENGINE + /* There is no address in the PROM: generate a MAC address */ + /* (Also... maybe should check if BIOS is available for it?) */ + for (i = 0; i < 6; i++) { + if (dev->dev_addr[i] != 0) + break; + } + if (i >= 6) { + dev->dev_addr[0] = 0x02; + dev->dev_addr[1] = dev->dev_addr[2] = 0; + dev->dev_addr[3] = dev->dev_addr[4] = 0; + dev->dev_addr[5] = *(unsigned short*)0xB9000002; + } + printk("\nGenerating MAC address of "); +#endif /* CONFIG_SH_7751_SOLUTION_ENGINE */ + for (i = 0; i < 6; i++) printk(" %2.2x", dev->dev_addr[i] );