Deleted Added
full compact
xmphy.c (92739) xmphy.c (95722)
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 *
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 92739 2002-03-20 02:08:01Z alfred $
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[] =
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 92739 2002-03-20 02:08:01Z alfred $";
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);
63#endif
64
65static int xmphy_probe (device_t);
66static int xmphy_attach (device_t);
67static int xmphy_detach (device_t);
68
69static device_method_t xmphy_methods[] = {
70 /* device interface */
71 DEVMETHOD(device_probe, xmphy_probe),
72 DEVMETHOD(device_attach, xmphy_attach),
67
68static device_method_t xmphy_methods[] = {
69 /* device interface */
70 DEVMETHOD(device_probe, xmphy_probe),
71 DEVMETHOD(device_attach, xmphy_attach),
73 DEVMETHOD(device_detach, xmphy_detach),
72 DEVMETHOD(device_detach, mii_phy_detach),
74 DEVMETHOD(device_shutdown, bus_generic_shutdown),
75 { 0, 0 }
76};
77
78static devclass_t xmphy_devclass;
79
80static driver_t xmphy_driver = {
81 "xmphy",

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

158 printf("\n");
159#undef ADD
160#undef PRINT
161
162 MIIBUS_MEDIAINIT(sc->mii_dev);
163 return(0);
164}
165
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
166static int xmphy_detach(dev)
167 device_t dev;
168{
169 struct mii_softc *sc;
170 struct mii_data *mii;
171
172 sc = device_get_softc(dev);
173 mii = device_get_softc(device_get_parent(dev));
174 if (sc->mii_flags & MIIF_DOINGAUTO)
175 untimeout(mii_phy_auto_timeout, sc, sc->mii_auto_ch);
176 sc->mii_dev = NULL;
177 LIST_REMOVE(sc, mii_list);
178
179 return(0);
180}
181
182static int
183xmphy_service(sc, mii, cmd)
184 struct mii_softc *sc;
185 struct mii_data *mii;
186 int cmd;
187{
188 struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
189 int reg;

--- 210 unchanged lines hidden ---
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 ---