From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 02:50:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B6B9106574D; Tue, 31 Mar 2009 02:50:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 488C28FC0A; Tue, 31 Mar 2009 02:50:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2V2ofHg085509; Tue, 31 Mar 2009 02:50:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2V2of6K085508; Tue, 31 Mar 2009 02:50:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200903310250.n2V2of6K085508@svn.freebsd.org> From: Warner Losh Date: Tue, 31 Mar 2009 02:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190586 - head/sys/dev/ed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 02:50:42 -0000 Author: imp Date: Tue Mar 31 02:50:41 2009 New Revision: 190586 URL: http://svn.freebsd.org/changeset/base/190586 Log: 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. Modified: head/sys/dev/ed/if_ed_pccard.c Modified: head/sys/dev/ed/if_ed_pccard.c ============================================================================== --- head/sys/dev/ed/if_ed_pccard.c Tue Mar 31 02:50:18 2009 (r190585) +++ head/sys/dev/ed/if_ed_pccard.c Tue Mar 31 02:50:41 2009 (r190586) @@ -1101,8 +1101,14 @@ ed_miibus_readreg(device_t dev, int phy, * 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 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);