pnphy.c (190117) | pnphy.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/pnphy.c 190117 2009-03-19 22:34:55Z marius $"); | 34__FBSDID("$FreeBSD: head/sys/dev/dc/pnphy.c 213229 2010-09-27 20:31:03Z marius $"); |
35 36/* 37 * Pseudo-driver for media selection on the Lite-On PNIC 82c168 38 * chip. The NWAY support on this chip is horribly broken, so we 39 * only support manual mode selection. This is lame, but getting 40 * NWAY to work right is amazingly difficult. 41 */ 42 --- 81 unchanged lines hidden (view full) --- 124{ 125 struct mii_softc *sc; 126 struct mii_attach_args *ma; 127 struct mii_data *mii; 128 129 sc = device_get_softc(dev); 130 ma = device_get_ivars(dev); 131 sc->mii_dev = device_get_parent(dev); | 35 36/* 37 * Pseudo-driver for media selection on the Lite-On PNIC 82c168 38 * chip. The NWAY support on this chip is horribly broken, so we 39 * only support manual mode selection. This is lame, but getting 40 * NWAY to work right is amazingly difficult. 41 */ 42 --- 81 unchanged lines hidden (view full) --- 124{ 125 struct mii_softc *sc; 126 struct mii_attach_args *ma; 127 struct mii_data *mii; 128 129 sc = device_get_softc(dev); 130 ma = device_get_ivars(dev); 131 sc->mii_dev = device_get_parent(dev); |
132 mii = device_get_softc(sc->mii_dev); | 132 mii = ma->mii_data; |
133 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); 134 135 sc->mii_inst = mii->mii_instance; 136 sc->mii_phy = ma->mii_phyno; 137 sc->mii_service = pnphy_service; 138 sc->mii_pdata = mii; 139 140 /* --- 120 unchanged lines hidden --- | 133 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); 134 135 sc->mii_inst = mii->mii_instance; 136 sc->mii_phy = ma->mii_phyno; 137 sc->mii_service = pnphy_service; 138 sc->mii_pdata = mii; 139 140 /* --- 120 unchanged lines hidden --- |