Date: Thu, 18 Nov 2010 18:05:59 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r215461 - stable/7/sys/dev/mii Message-ID: <201011181805.oAII5xGI040442@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Thu Nov 18 18:05:59 2010 New Revision: 215461 URL: http://svn.freebsd.org/changeset/base/215461 Log: MFC: r215348 Return from mii_attach() after calling bus_generic_attach(9) on the device_t of the MAC driver in order to attach miibus(4) on the first pass instead of falling through to also calling it on the device_t of miibus(4). The latter code flow was intended to attach the PHY drivers the same way regardless of whether it's the first or a repeated pass, modulo the bus_generic_attach() call in miibus_attach() which shouldn't be there. However, it turned out that these variants cause miibus(4) to be attached twice under certain conditions when using MAC drivers as modules. Submitted by: yongari Modified: stable/7/sys/dev/mii/mii.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/mii.c ============================================================================== --- stable/7/sys/dev/mii/mii.c Thu Nov 18 18:03:52 2010 (r215460) +++ stable/7/sys/dev/mii/mii.c Thu Nov 18 18:05:59 2010 (r215461) @@ -447,6 +447,9 @@ mii_attach(device_t dev, device_t *miibu rv = bus_generic_attach(dev); if (rv != 0) goto fail; + + /* Attaching of the PHY drivers is done in miibus_attach(). */ + return (0); } rv = bus_generic_attach(*miibus); if (rv != 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011181805.oAII5xGI040442>