From owner-svn-src-head@FreeBSD.ORG Tue Oct 29 05:14:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ADEBC56C; Tue, 29 Oct 2013 05:14:39 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 821732901; Tue, 29 Oct 2013 05:14:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9T5EdN0004406; Tue, 29 Oct 2013 05:14:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9T5EdJ6004404; Tue, 29 Oct 2013 05:14:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201310290514.r9T5EdJ6004404@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 29 Oct 2013 05:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257304 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Oct 2013 05:14:39 -0000 Author: yongari Date: Tue Oct 29 05:14:38 2013 New Revision: 257304 URL: http://svnweb.freebsd.org/changeset/base/257304 Log: Add support for new Gigabit PHY of RealTek. I don't have a copy of data sheet so I'm not sure exact PHY model name. Vendor's web page indicates RTL8251 is latest PHY so I used the name. This PHY is used with RTL8168G, RTL8168GU and RTL8411B. Modified: head/sys/dev/mii/miidevs head/sys/dev/mii/rgephy.c Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Tue Oct 29 04:31:07 2013 (r257303) +++ head/sys/dev/mii/miidevs Tue Oct 29 05:14:38 2013 (r257304) @@ -304,6 +304,7 @@ model yyREALTEK RTL8201L 0x0020 RTL8201L model xxREALTEK RTL8169S 0x0011 RTL8169S/8110S/8211 1000BASE-T media interface model REALTEK RTL8305SC 0x0005 RTL8305SC 10/100 802.1q switch model REALTEK RTL8201E 0x0008 RTL8201E 10/100 media interface +model REALTEK RTL8251 0x0000 RTL8251 1000BASE-T media interface model REALTEK RTL8169S 0x0011 RTL8169S/8110S/8211 1000BASE-T media interface /* Seeq Seeq PHYs */ Modified: head/sys/dev/mii/rgephy.c ============================================================================== --- head/sys/dev/mii/rgephy.c Tue Oct 29 04:31:07 2013 (r257303) +++ head/sys/dev/mii/rgephy.c Tue Oct 29 05:14:38 2013 (r257304) @@ -91,6 +91,7 @@ static void rgephy_load_dspcode(struct m static const struct mii_phydesc rgephys[] = { MII_PHY_DESC(REALTEK, RTL8169S), + MII_PHY_DESC(REALTEK, RTL8251), MII_PHY_END }; @@ -395,7 +396,8 @@ rgephy_loop(struct mii_softc *sc) { int i; - if (sc->mii_mpd_rev < 2) { + if (sc->mii_mpd_model != MII_MODEL_REALTEK_RTL8251 && + sc->mii_mpd_rev < 2) { PHY_WRITE(sc, RGEPHY_MII_BMCR, RGEPHY_BMCR_PDOWN); DELAY(1000); } @@ -428,7 +430,8 @@ rgephy_load_dspcode(struct mii_softc *sc { int val; - if (sc->mii_mpd_rev >= 2) + if (sc->mii_mpd_model == MII_MODEL_REALTEK_RTL8251 || + sc->mii_mpd_rev >= 2) return; PHY_WRITE(sc, 31, 0x0001);