Re: 82559ER: PHY detection fails, MII not accessible
Malte Cornils <[email protected]> Tue, 16 Sep 2003 15:32:48 +0200
| Newsgroups | gmane.linux.drivers.eepro100.devel |
|---|---|
| Message-ID | <[email protected]> |
--Boundary-00=_AExZ/01L2rmEH71 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wednesday 10 September 2003 16:15, I wrote: > I'm seeing some interesting things with some 82559ER controllers. We were > attempting link beat detection, on one of the controllers, this worked > flawlessly; the other seems to have an unsupported register layout. > [...] > Maybe the EEPROM is structured differently on this specific chipset, so the > assumption that EEPROM info is stored in eeprom_contents[6] is wrong? > eeprom_contents[3] and eeprom_contents[4] seem like good candidates :-) I have written a quick patch to the current eepro100.c from scyld, which enables a new module option eeprom_newrev. If you insert the module with insmod pci-scan insmod eepro100 eeprom_newrev=1 then the driver will use the non-standard EEPROM location for MII, link beat detection works on the weird chipsets then. If no module option is passed, the old behaviour is used (for standard eepro100 cards). Lacking is auto-detection of chipset/EEPROM type and some debug infos in the driver still use the old EEPROM locations unconditionally. But, it works for me (tm). -Malte #8-) PS: patch command is: patch -p0 eepro100.c < eepro100.diff then compile and install eepro100 and pci-scan following the instructions on scyld's website. --Boundary-00=_AExZ/01L2rmEH71 Content-Type: text/x-diff; charset="iso-8859-1"; name="eepro100.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="eepro100.diff" --- eepro100_old.c 2003-09-16 15:20:20.000000000 +0200 +++ eepro100.c 2003-09-11 16:27:36.000000000 +0200 @@ -57,6 +57,8 @@ /* Maximum events (Rx packets, etc.) to handle at each interrupt. */ static int max_interrupt_work = 20; +static int eeprom_newrev = 0; + /* Maximum number of multicast addresses to filter (vs. rx-all-multicast) */ static int multicast_filter_limit = 64; @@ -162,6 +164,7 @@ MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i"); MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); MODULE_PARM(congenb, "i"); +MODULE_PARM(eeprom_newrev, "i"); MODULE_PARM(txfifo, "i"); MODULE_PARM(rxfifo, "i"); MODULE_PARM(txdmacount, "i"); @@ -175,6 +178,8 @@ "EEPro100: force fixed speed+duplex 0x10 0x20 0x100 0x200"); MODULE_PARM_DESC(max_interrupt_work, "EEPro100 maximum events handled per interrupt"); +MODULE_PARM_DESC(eeprom_newrev, + "EEPro100: Weird EEPROM Layout for obscure 82559ER cards"); MODULE_PARM_DESC(full_duplex, "EEPro100 set to forced full duplex when not 0" " (deprecated)"); MODULE_PARM_DESC(rx_copybreak, @@ -806,8 +811,8 @@ if (sp->full_duplex) sp->medialock = 1; - sp->phy[0] = eeprom[6]; - sp->phy[1] = eeprom[7]; + sp->phy[0] = eeprom_newrev ? eeprom[3] : eeprom[6]; + sp->phy[1] = eeprom_newrev ? eeprom[4] : eeprom[7]; sp->rx_bug = (eeprom[3] & 0x03) == 3 ? 0 : 1; if (sp->rx_bug) --Boundary-00=_AExZ/01L2rmEH71--