From owner-svn-src-all@FreeBSD.ORG Mon Sep 28 22:18:39 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 26A071065670; Mon, 28 Sep 2009 22:18:39 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 156B88FC14; Mon, 28 Sep 2009 22:18:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SMIccV067822; Mon, 28 Sep 2009 22:18:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SMIcIQ067820; Mon, 28 Sep 2009 22:18:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200909282218.n8SMIcIQ067820@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 28 Sep 2009 22:18:38 +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: r197600 - head/sys/dev/alc 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: Mon, 28 Sep 2009 22:18:39 -0000 Author: yongari Date: Mon Sep 28 22:18:38 2009 New Revision: 197600 URL: http://svn.freebsd.org/changeset/base/197600 Log: For AR8132 fast ethernet controller, do not report 1000baseT capability to mii(4). Even though AR8132 uses the same model/ revision number of F1 gigabit PHY, the PHY has no ability to establish 1000baseT link. I have no idea why Atheros use the same device/model id for this PHY. With this change atphy(4) does not report 1000baseT media capability and manual 1000baseT configuration is also disabled which is more desirable behavior for 10/100Mbps PHY. Modified: head/sys/dev/alc/if_alc.c Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Mon Sep 28 22:03:44 2009 (r197599) +++ head/sys/dev/alc/if_alc.c Mon Sep 28 22:18:38 2009 (r197600) @@ -234,6 +234,16 @@ alc_miibus_readreg(device_t dev, int phy if (phy != sc->alc_phyaddr) return (0); + /* + * For AR8132 fast ethernet controller, do not report 1000baseT + * capability to mii(4). Even though AR8132 uses the same + * model/revision number of F1 gigabit PHY, the PHY has no + * ability to establish 1000baseT link. + */ + if ((sc->alc_flags & ALC_FLAG_FASTETHER) != 0 && + reg == MII_EXTSR) + return (0); + CSR_WRITE_4(sc, ALC_MDIO, MDIO_OP_EXECUTE | MDIO_OP_READ | MDIO_SUP_PREAMBLE | MDIO_CLK_25_4 | MDIO_REG_ADDR(reg)); for (i = ALC_PHY_TIMEOUT; i > 0; i--) {