--- media.c.old Sun Mar 18 23:23:54 2001 +++ media.c Sun Mar 18 14:22:40 2001 @@ -151,6 +151,37 @@ u32 new_csr6=0; int i; + /* WARNING: + The code block below is a hack to get the Intel AnyPoint HomePNA 1Mbps + PCI card working in the Linux 2.4 tulip driver. In the process it will + break any other 21145 chips! When the 2.4 kernel driver adds the + missing media and expands the media selection portion of the "options" + module parameter, then this can be done more safely. + */ + if (tp->chip_id == I21145 /* && tp->medialock && dev->if_port == 18 */ ) { + /* Intel 21145 HomePNA port selection + + The code below is based on information in Appendix C of Intel's + 21145 hardware reference manual, available at + http://www.intel.com/design/network/manuals/ + */ + if (tulip_debug) + printk(KERN_DEBUG "%s: Intel 21145 HomePNA.\n", + dev->name); + /* CSR6<18> = 0, CSR6<19> = 1 + CSR13<31:0> = 00000000H + CSR14<31:0> = 00000505H + CSR15<4> = 1 + CSR13<31:0> = 30480009H + */ + outl(((inl(ioaddr + CSR6) & (~(1 << 18))) | (1 << 19)), ioaddr + CSR6); + outl(0x00000000, ioaddr + CSR13); + outl(0x00000505, ioaddr + CSR14); + outl(inl(ioaddr + CSR15) | 0x10, ioaddr + CSR15); + outl(0x30480009, ioaddr + CSR13); + return; + } + if (mtable) { struct medialeaf *mleaf = &mtable->mleaf[tp->cur_index]; unsigned char *p = mleaf->leafdata;