1/* 2 * Copyright (c) 2000 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 --- 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/xmphy.c 95722 2002-04-29 13:07:38Z phk $ |
33 */ 34 35/* 36 * driver for the XaQti XMAC II's internal PHY. This is sort of 37 * like a 10/100 PHY, except the only thing we're really autoselecting 38 * here is full/half duplex. Speed is always 1000mbps. 39 */ 40 --- 13 unchanged lines hidden (view full) --- 54#include <dev/mii/miidevs.h> 55 56#include <dev/mii/xmphyreg.h> 57 58#include "miibus_if.h" 59 60#if !defined(lint) 61static const char rcsid[] = |
62 "$FreeBSD: head/sys/dev/mii/xmphy.c 95722 2002-04-29 13:07:38Z phk $"; |
63#endif 64 65static int xmphy_probe (device_t); 66static int xmphy_attach (device_t); |
67 68static device_method_t xmphy_methods[] = { 69 /* device interface */ 70 DEVMETHOD(device_probe, xmphy_probe), 71 DEVMETHOD(device_attach, xmphy_attach), |
72 DEVMETHOD(device_detach, mii_phy_detach), |
73 DEVMETHOD(device_shutdown, bus_generic_shutdown), 74 { 0, 0 } 75}; 76 77static devclass_t xmphy_devclass; 78 79static driver_t xmphy_driver = { 80 "xmphy", --- 76 unchanged lines hidden (view full) --- 157 printf("\n"); 158#undef ADD 159#undef PRINT 160 161 MIIBUS_MEDIAINIT(sc->mii_dev); 162 return(0); 163} 164 |
165static int 166xmphy_service(sc, mii, cmd) 167 struct mii_softc *sc; 168 struct mii_data *mii; 169 int cmd; 170{ 171 struct ifmedia_entry *ife = mii->mii_media.ifm_cur; 172 int reg; --- 210 unchanged lines hidden --- |