amphy.c (175703) | amphy.c (213229) |
---|---|
1/*- 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/dev/mii/amphy.c 175703 2008-01-27 01:11:57Z marius $"); | 34__FBSDID("$FreeBSD: head/sys/dev/mii/amphy.c 213229 2010-09-27 20:31:03Z marius $"); |
35 36/* 37 * driver for AMD AM79c873 PHYs 38 * This driver also works for Davicom DM910{1,2} PHYs, which appear 39 * to be AM79c873 workalikes. 40 */ 41 42#include <sys/param.h> --- 58 unchanged lines hidden (view full) --- 101{ 102 struct mii_softc *sc; 103 struct mii_attach_args *ma; 104 struct mii_data *mii; 105 106 sc = device_get_softc(dev); 107 ma = device_get_ivars(dev); 108 sc->mii_dev = device_get_parent(dev); | 35 36/* 37 * driver for AMD AM79c873 PHYs 38 * This driver also works for Davicom DM910{1,2} PHYs, which appear 39 * to be AM79c873 workalikes. 40 */ 41 42#include <sys/param.h> --- 58 unchanged lines hidden (view full) --- 101{ 102 struct mii_softc *sc; 103 struct mii_attach_args *ma; 104 struct mii_data *mii; 105 106 sc = device_get_softc(dev); 107 ma = device_get_ivars(dev); 108 sc->mii_dev = device_get_parent(dev); |
109 mii = device_get_softc(sc->mii_dev); | 109 mii = ma->mii_data; |
110 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); 111 112 sc->mii_inst = mii->mii_instance; 113 sc->mii_phy = ma->mii_phyno; 114 sc->mii_service = amphy_service; 115 sc->mii_pdata = mii; 116 117 mii->mii_instance++; --- 143 unchanged lines hidden --- | 110 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); 111 112 sc->mii_inst = mii->mii_instance; 113 sc->mii_phy = ma->mii_phyno; 114 sc->mii_service = amphy_service; 115 sc->mii_pdata = mii; 116 117 mii->mii_instance++; --- 143 unchanged lines hidden --- |