dcphy.c (190117) | dcphy.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/dc/dcphy.c 190117 2009-03-19 22:34:55Z marius $"); | 34__FBSDID("$FreeBSD: head/sys/dev/dc/dcphy.c 213229 2010-09-27 20:31:03Z marius $"); |
35 36/* 37 * Pseudo-driver for internal NWAY support on DEC 21143 and workalike 38 * controllers. Technically we're abusing the miibus code to handle 39 * media selection and NWAY support here since there is no MII 40 * interface. However the logical operations are roughly the same, 41 * and the alternative is to create a fake MII interface in the driver, 42 * which is harder to do. --- 98 unchanged lines hidden (view full) --- 141 struct mii_attach_args *ma; 142 struct mii_data *mii; 143 struct dc_softc *dc_sc; 144 device_t brdev; 145 146 sc = device_get_softc(dev); 147 ma = device_get_ivars(dev); 148 sc->mii_dev = device_get_parent(dev); | 35 36/* 37 * Pseudo-driver for internal NWAY support on DEC 21143 and workalike 38 * controllers. Technically we're abusing the miibus code to handle 39 * media selection and NWAY support here since there is no MII 40 * interface. However the logical operations are roughly the same, 41 * and the alternative is to create a fake MII interface in the driver, 42 * which is harder to do. --- 98 unchanged lines hidden (view full) --- 141 struct mii_attach_args *ma; 142 struct mii_data *mii; 143 struct dc_softc *dc_sc; 144 device_t brdev; 145 146 sc = device_get_softc(dev); 147 ma = device_get_ivars(dev); 148 sc->mii_dev = device_get_parent(dev); |
149 mii = device_get_softc(sc->mii_dev); | 149 mii = ma->mii_data; |
150 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); 151 152 sc->mii_inst = mii->mii_instance; 153 sc->mii_phy = ma->mii_phyno; 154 sc->mii_service = dcphy_service; 155 sc->mii_pdata = mii; 156 157 /* --- 282 unchanged lines hidden --- | 150 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); 151 152 sc->mii_inst = mii->mii_instance; 153 sc->mii_phy = ma->mii_phyno; 154 sc->mii_service = dcphy_service; 155 sc->mii_pdata = mii; 156 157 /* --- 282 unchanged lines hidden --- |