Date: Mon, 22 Oct 2012 22:32:52 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241918 - head/sys/dev/etherswitch/arswitch Message-ID: <201210222232.q9MMWqbH023025@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Mon Oct 22 22:32:52 2012 New Revision: 241918 URL: http://svn.freebsd.org/changeset/base/241918 Log: Don't try to cache the page setting - always set the page before doing a switch register read/write. PR: kern/172968 Modified: head/sys/dev/etherswitch/arswitch/arswitch_reg.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_reg.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_reg.c Mon Oct 22 22:29:48 2012 (r241917) +++ head/sys/dev/etherswitch/arswitch/arswitch_reg.c Mon Oct 22 22:32:52 2012 (r241918) @@ -72,10 +72,17 @@ arswitch_split_setpage(device_t dev, uin *phy = (((addr) >> 6) & 0x07) | 0x10; *reg = ((addr) >> 1) & 0x1f; - if (sc->page != page) { - MDIO_WRITEREG(device_get_parent(dev), 0x18, 0, page); - sc->page = page; - } + /* + * The earlier code would only switch the page + * over if the page were different. Experiments have + * shown that this is unstable. + * + * Hence, the page is always set here. + * + * See PR kern/172968 + */ + MDIO_WRITEREG(device_get_parent(dev), 0x18, 0, page); + sc->page = page; } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210222232.q9MMWqbH023025>