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/rlphy.c 95722 2002-04-29 13:07:38Z phk $ |
33 */ 34 35/* 36 * driver for RealTek 8139 internal PHYs 37 */ 38 39#include <sys/param.h> 40#include <sys/systm.h> --- 11 unchanged lines hidden (view full) --- 52 53#include <machine/bus.h> 54#include <pci/if_rlreg.h> 55 56#include "miibus_if.h" 57 58#if !defined(lint) 59static const char rcsid[] = |
60 "$FreeBSD: head/sys/dev/mii/rlphy.c 95722 2002-04-29 13:07:38Z phk $"; |
61#endif 62 63static int rlphy_probe (device_t); 64static int rlphy_attach (device_t); |
65 66static device_method_t rlphy_methods[] = { 67 /* device interface */ 68 DEVMETHOD(device_probe, rlphy_probe), 69 DEVMETHOD(device_attach, rlphy_attach), |
70 DEVMETHOD(device_detach, mii_phy_detach), |
71 DEVMETHOD(device_shutdown, bus_generic_shutdown), 72 { 0, 0 } 73}; 74 75static devclass_t rlphy_devclass; 76 77static driver_t rlphy_driver = { 78 "rlphy", --- 89 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 177rlphy_service(sc, mii, cmd) 178 struct mii_softc *sc; 179 struct mii_data *mii; 180 int cmd; 181{ 182 struct ifmedia_entry *ife = mii->mii_media.ifm_cur; 183 --- 167 unchanged lines hidden --- |