mlphy.c (213364) | mlphy.c (213893) |
---|---|
1/*- 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.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 --- 18 unchanged lines hidden (view full) --- 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 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.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 --- 18 unchanged lines hidden (view full) --- 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 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/mii/mlphy.c 213364 2010-10-02 18:53:12Z marius $"); | 35__FBSDID("$FreeBSD: head/sys/dev/mii/mlphy.c 213893 2010-10-15 14:52:11Z marius $"); |
36 37/* 38 * driver for Micro Linear 6692 PHYs 39 * 40 * The Micro Linear 6692 is a strange beast, and dealing with it using 41 * this code framework is tricky. The 6692 is actually a 100Mbps-only 42 * device, which means that a second PHY is required to support 10Mbps 43 * modes. However, even though the 6692 does not support 10Mbps modes, --- 97 unchanged lines hidden (view full) --- 141 142 msc = device_get_softc(dev); 143 sc = &msc->ml_mii; 144 ma = device_get_ivars(dev); 145 sc->mii_dev = device_get_parent(dev); 146 mii = ma->mii_data; 147 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); 148 | 36 37/* 38 * driver for Micro Linear 6692 PHYs 39 * 40 * The Micro Linear 6692 is a strange beast, and dealing with it using 41 * this code framework is tricky. The 6692 is actually a 100Mbps-only 42 * device, which means that a second PHY is required to support 10Mbps 43 * modes. However, even though the 6692 does not support 10Mbps modes, --- 97 unchanged lines hidden (view full) --- 141 142 msc = device_get_softc(dev); 143 sc = &msc->ml_mii; 144 ma = device_get_ivars(dev); 145 sc->mii_dev = device_get_parent(dev); 146 mii = ma->mii_data; 147 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); 148 |
149 sc->mii_flags = miibus_get_flags(dev); |
|
149 sc->mii_inst = mii->mii_instance++; 150 sc->mii_phy = ma->mii_phyno; 151 sc->mii_service = mlphy_service; 152 sc->mii_pdata = mii; 153 154#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) 155 156 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst), --- 246 unchanged lines hidden --- | 150 sc->mii_inst = mii->mii_instance++; 151 sc->mii_phy = ma->mii_phyno; 152 sc->mii_service = mlphy_service; 153 sc->mii_pdata = mii; 154 155#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) 156 157 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst), --- 246 unchanged lines hidden --- |