Deleted Added
full compact
acphy.c (95667) acphy.c (95722)
1/*-
2 * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
7 * NASA Ames Research Center.
8 *

--- 75 unchanged lines hidden (view full) ---

84#include <dev/mii/miidevs.h>
85
86#include <dev/mii/acphyreg.h>
87
88#include "miibus_if.h"
89
90#if !defined(lint)
91static const char rcsid[] =
1/*-
2 * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
7 * NASA Ames Research Center.
8 *

--- 75 unchanged lines hidden (view full) ---

84#include <dev/mii/miidevs.h>
85
86#include <dev/mii/acphyreg.h>
87
88#include "miibus_if.h"
89
90#if !defined(lint)
91static const char rcsid[] =
92 "$FreeBSD: head/sys/dev/mii/acphy.c 95667 2002-04-28 19:25:07Z phk $";
92 "$FreeBSD: head/sys/dev/mii/acphy.c 95722 2002-04-29 13:07:38Z phk $";
93#endif
94
95static int acphy_probe (device_t);
96static int acphy_attach (device_t);
93#endif
94
95static int acphy_probe (device_t);
96static int acphy_attach (device_t);
97static int acphy_detach (device_t);
98
99static device_method_t acphy_methods[] = {
100 /* device interface */
101 DEVMETHOD(device_probe, acphy_probe),
102 DEVMETHOD(device_attach, acphy_attach),
97
98static device_method_t acphy_methods[] = {
99 /* device interface */
100 DEVMETHOD(device_probe, acphy_probe),
101 DEVMETHOD(device_attach, acphy_attach),
103 DEVMETHOD(device_detach, acphy_detach),
102 DEVMETHOD(device_detach, mii_phy_detach),
104 DEVMETHOD(device_shutdown, bus_generic_shutdown),
105 { 0, 0 }
106};
107
108static devclass_t acphy_devclass;
109
110static driver_t acphy_driver = {
111 "acphy",

--- 51 unchanged lines hidden (view full) ---

163 device_printf(dev, " ");
164 mii_add_media(sc);
165 printf("\n");
166
167 MIIBUS_MEDIAINIT(sc->mii_dev);
168 return (0);
169}
170
103 DEVMETHOD(device_shutdown, bus_generic_shutdown),
104 { 0, 0 }
105};
106
107static devclass_t acphy_devclass;
108
109static driver_t acphy_driver = {
110 "acphy",

--- 51 unchanged lines hidden (view full) ---

162 device_printf(dev, " ");
163 mii_add_media(sc);
164 printf("\n");
165
166 MIIBUS_MEDIAINIT(sc->mii_dev);
167 return (0);
168}
169
171static int acphy_detach(dev)
172 device_t dev;
173{
174 struct mii_softc *sc;
175 struct mii_data *mii;
176
177 sc = device_get_softc(dev);
178 mii = device_get_softc(device_get_parent(dev));
179 sc->mii_dev = NULL;
180 LIST_REMOVE(sc, mii_list);
181
182 return(0);
183}
184
185static int
186acphy_service(sc, mii, cmd)
187 struct mii_softc *sc;
188 struct mii_data *mii;
189 int cmd;
190{
191 struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
192 int reg;

--- 154 unchanged lines hidden ---
170static int
171acphy_service(sc, mii, cmd)
172 struct mii_softc *sc;
173 struct mii_data *mii;
174 int cmd;
175{
176 struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
177 int reg;

--- 154 unchanged lines hidden ---