From owner-svn-src-all@FreeBSD.ORG Wed Feb 19 04:30:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57D87455; Wed, 19 Feb 2014 04:30:54 +0000 (UTC) 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 42B22163D; Wed, 19 Feb 2014 04:30:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1J4Us7Y025348; Wed, 19 Feb 2014 04:30:54 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1J4Ur2d025346; Wed, 19 Feb 2014 04:30:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201402190430.s1J4Ur2d025346@svn.freebsd.org> From: Adrian Chadd Date: Wed, 19 Feb 2014 04:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262201 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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: Wed, 19 Feb 2014 04:30:54 -0000 Author: adrian Date: Wed Feb 19 04:30:53 2014 New Revision: 262201 URL: http://svnweb.freebsd.org/changeset/base/262201 Log: Store away the chip version and revision; some AR8327 code depends upon the chip revision. Modified: head/sys/dev/etherswitch/arswitch/arswitch.c head/sys/dev/etherswitch/arswitch/arswitchvar.h Modified: head/sys/dev/etherswitch/arswitch/arswitch.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch.c Wed Feb 19 04:23:01 2014 (r262200) +++ head/sys/dev/etherswitch/arswitch/arswitch.c Wed Feb 19 04:30:53 2014 (r262201) @@ -112,6 +112,8 @@ arswitch_probe(device_t dev) /* AR8xxx probe */ id = arswitch_readreg(dev, AR8X16_REG_MASK_CTRL); + sc->chip_rev = (id & AR8X16_MASK_CTRL_REV_MASK); + sc->chip_ver = (id & AR8X16_MASK_CTRL_VER_MASK) > AR8X16_MASK_CTRL_VER_SHIFT; switch (id & (AR8X16_MASK_CTRL_VER_MASK | AR8X16_MASK_CTRL_REV_MASK)) { case 0x0101: chipname = "AR8216"; Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 04:23:01 2014 (r262200) +++ head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 04:30:53 2014 (r262201) @@ -53,6 +53,8 @@ struct arswitch_softc { int is_mii; /* PHY mode is MII (XXX which PHY?) */ int page; int is_internal_switch; + int chip_ver; + int chip_rev; int mii_lo_first; ar8x16_switch_type sc_switchtype; char *ifname[AR8X16_NUM_PHYS];