lxtphy.c (95667) | lxtphy.c (95722) |
---|---|
1/* OpenBSD: lxtphy.c,v 1.5 2000/08/26 20:04:17 nate Exp */ 2/* NetBSD: lxtphy.c,v 1.19 2000/02/02 23:34:57 thorpej Exp */ 3 4/*- 5 * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to The NetBSD Foundation --- 79 unchanged lines hidden (view full) --- 88#include <dev/mii/miidevs.h> 89 90#include <dev/mii/lxtphyreg.h> 91 92#include "miibus_if.h" 93 94#if !defined(lint) 95static const char rcsid[] = | 1/* OpenBSD: lxtphy.c,v 1.5 2000/08/26 20:04:17 nate Exp */ 2/* NetBSD: lxtphy.c,v 1.19 2000/02/02 23:34:57 thorpej Exp */ 3 4/*- 5 * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to The NetBSD Foundation --- 79 unchanged lines hidden (view full) --- 88#include <dev/mii/miidevs.h> 89 90#include <dev/mii/lxtphyreg.h> 91 92#include "miibus_if.h" 93 94#if !defined(lint) 95static const char rcsid[] = |
96 "$FreeBSD: head/sys/dev/mii/lxtphy.c 95667 2002-04-28 19:25:07Z phk $"; | 96 "$FreeBSD: head/sys/dev/mii/lxtphy.c 95722 2002-04-29 13:07:38Z phk $"; |
97#endif 98 99static int lxtphy_probe (device_t); 100static int lxtphy_attach (device_t); | 97#endif 98 99static int lxtphy_probe (device_t); 100static int lxtphy_attach (device_t); |
101static int lxtphy_detach (device_t); | |
102 103static device_method_t lxtphy_methods[] = { 104 /* device interface */ 105 DEVMETHOD(device_probe, lxtphy_probe), 106 DEVMETHOD(device_attach, lxtphy_attach), | 101 102static device_method_t lxtphy_methods[] = { 103 /* device interface */ 104 DEVMETHOD(device_probe, lxtphy_probe), 105 DEVMETHOD(device_attach, lxtphy_attach), |
107 DEVMETHOD(device_detach, lxtphy_detach), | 106 DEVMETHOD(device_detach, mii_phy_detach), |
108 DEVMETHOD(device_shutdown, bus_generic_shutdown), 109 { 0, 0 } 110}; 111 112static devclass_t lxtphy_devclass; 113 114static driver_t lxtphy_driver = { 115 "lxtphy", --- 64 unchanged lines hidden (view full) --- 180 181 mii_add_media(sc); 182 printf("\n"); 183 184 MIIBUS_MEDIAINIT(sc->mii_dev); 185 return(0); 186} 187 | 107 DEVMETHOD(device_shutdown, bus_generic_shutdown), 108 { 0, 0 } 109}; 110 111static devclass_t lxtphy_devclass; 112 113static driver_t lxtphy_driver = { 114 "lxtphy", --- 64 unchanged lines hidden (view full) --- 179 180 mii_add_media(sc); 181 printf("\n"); 182 183 MIIBUS_MEDIAINIT(sc->mii_dev); 184 return(0); 185} 186 |
188 189static int lxtphy_detach(dev) 190 device_t dev; 191{ 192 struct mii_softc *sc; 193 struct mii_data *mii; 194 195 sc = device_get_softc(dev); 196 mii = device_get_softc(device_get_parent(dev)); 197 sc->mii_dev = NULL; 198 LIST_REMOVE(sc, mii_list); 199 200 return(0); 201} 202 | |
203static int 204lxtphy_service(sc, mii, cmd) 205 struct mii_softc *sc; 206 struct mii_data *mii; 207 int cmd; 208{ 209 struct ifmedia_entry *ife = mii->mii_media.ifm_cur; 210 int reg; --- 146 unchanged lines hidden --- | 187static int 188lxtphy_service(sc, mii, cmd) 189 struct mii_softc *sc; 190 struct mii_data *mii; 191 int cmd; 192{ 193 struct ifmedia_entry *ife = mii->mii_media.ifm_cur; 194 int reg; --- 146 unchanged lines hidden --- |