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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 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 * $FreeBSD: head/sys/dev/mii/mlphy.c 95722 2002-04-29 13:07:38Z phk $ |
33 */ 34 35/* 36 * driver for Micro Linear 6692 PHYs 37 * 38 * The Micro Linear 6692 is a strange beast, and dealing with it using 39 * this code framework is tricky. The 6692 is actually a 100Mbps-only 40 * device, which means that a second PHY is required to support 10Mbps --- 28 unchanged lines hidden (view full) --- 69struct mlphy_softc { 70 struct mii_softc ml_mii; 71 int ml_state; 72 int ml_linked; 73}; 74 75static int mlphy_probe (device_t); 76static int mlphy_attach (device_t); |
77 78static device_method_t mlphy_methods[] = { 79 /* device interface */ 80 DEVMETHOD(device_probe, mlphy_probe), 81 DEVMETHOD(device_attach, mlphy_attach), |
82 DEVMETHOD(device_detach, mii_phy_detach), |
83 DEVMETHOD(device_shutdown, bus_generic_shutdown), 84 { 0, 0 } 85}; 86 87static devclass_t mlphy_devclass; 88 89static driver_t mlphy_driver = { 90 "mlphy", --- 77 unchanged lines hidden (view full) --- 168 device_printf(dev, " "); 169 mii_add_media(sc); 170 printf("\n"); 171#undef ADD 172 MIIBUS_MEDIAINIT(sc->mii_dev); 173 return(0); 174} 175 |
176static int 177mlphy_service(xsc, mii, cmd) 178 struct mii_softc *xsc; 179 struct mii_data *mii; 180 int cmd; 181{ 182 struct ifmedia_entry *ife = mii->mii_media.ifm_cur; 183 int reg; --- 249 unchanged lines hidden --- |