summaryrefslogtreecommitdiffstats
path: root/sys/dev/ed/if_ed_pccard.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2009-03-31 02:50:41 +0000
committerimp <imp@FreeBSD.org>2009-03-31 02:50:41 +0000
commit9b2b26a623ab0e3fdbcaba577416c3cb2ea85443 (patch)
tree82cfbfeb3a10e6d0f0e93efb6f9c5e86965b007a /sys/dev/ed/if_ed_pccard.c
parent949d94d036bd50e48c8f869e547ccf20c638b2d7 (diff)
downloadFreeBSD-src-9b2b26a623ab0e3fdbcaba577416c3cb2ea85443.zip
FreeBSD-src-9b2b26a623ab0e3fdbcaba577416c3cb2ea85443.tar.gz
Go back to filtering all PHY addresses above 16 since at least two
cards still have issues with them. Maybe this is a silicon rev? In any case, doing the filtering only for the AX88790 for the moment.
Diffstat (limited to 'sys/dev/ed/if_ed_pccard.c')
-rw-r--r--sys/dev/ed/if_ed_pccard.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c
index 924cc83..a1b0e8b 100644
--- a/sys/dev/ed/if_ed_pccard.c
+++ b/sys/dev/ed/if_ed_pccard.c
@@ -1101,8 +1101,14 @@ ed_miibus_readreg(device_t dev, int phy, int reg)
* the internal PHY, a bit has to be set, when accessing the external
* PHYs, it must be clear. See Errata 1, page 51, in the AX88790
* datasheet for more details.
+ *
+ * Also, PHYs above 16 appear to be phantoms on some cards, but not
+ * others. Registers read for this are often the same as prior values
+ * read. Filter all register requests to 17-31.
*/
if (sc->chip_type == ED_CHIP_TYPE_AX88790) {
+ if (phy > 0x10)
+ return (0);
if (phy == 0x10)
ed_asic_outb(sc, ED_AX88X90_GPIO,
ED_AX88X90_GPIO_INT_PHY);
@@ -1130,15 +1136,10 @@ ed_miibus_writereg(device_t dev, int phy, int reg, int data)
struct ed_softc *sc;
sc = device_get_softc(dev);
- /*
- * The AX88790 has an interesting quirk. It has an internal phy that
- * needs a special bit set to access, but can also have additional
- * external PHYs set for things like HomeNET media. When accessing
- * the internal PHY, a bit has to be set, when accessing the external
- * PHYs, it must be clear. See Errata 1, page 51, in the AX88790
- * datasheet for more details.
- */
+ /* See ed_miibus_readreg for details */
if (sc->chip_type == ED_CHIP_TYPE_AX88790) {
+ if (phy > 0x10)
+ return (0);
if (phy == 0x10)
ed_asic_outb(sc, ED_AX88X90_GPIO,
ED_AX88X90_GPIO_INT_PHY);
OpenPOWER on IntegriCloud