Deleted Added
full compact
brgphy.c (67164) brgphy.c (69925)
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/brgphy.c 67164 2000-10-15 14:19:01Z phk $
32 * $FreeBSD: head/sys/dev/mii/brgphy.c 69925 2000-12-12 19:31:14Z wpaul $
33 */
34
35/*
36 * Driver for the Broadcom BCR5400 1000baseTX PHY. Speed is always
37 * 1000mbps; all we need to negotiate here is full or half duplex.
38 */
39
40#include <sys/param.h>

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

53#include <dev/mii/miidevs.h>
54
55#include <dev/mii/brgphyreg.h>
56
57#include "miibus_if.h"
58
59#if !defined(lint)
60static const char rcsid[] =
33 */
34
35/*
36 * Driver for the Broadcom BCR5400 1000baseTX PHY. Speed is always
37 * 1000mbps; all we need to negotiate here is full or half duplex.
38 */
39
40#include <sys/param.h>

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

53#include <dev/mii/miidevs.h>
54
55#include <dev/mii/brgphyreg.h>
56
57#include "miibus_if.h"
58
59#if !defined(lint)
60static const char rcsid[] =
61 "$FreeBSD: head/sys/dev/mii/brgphy.c 67164 2000-10-15 14:19:01Z phk $";
61 "$FreeBSD: head/sys/dev/mii/brgphy.c 69925 2000-12-12 19:31:14Z wpaul $";
62#endif
63
64static int brgphy_probe __P((device_t));
65static int brgphy_attach __P((device_t));
66static int brgphy_detach __P((device_t));
67
68static device_method_t brgphy_methods[] = {
69 /* device interface */

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

160static int brgphy_detach(dev)
161 device_t dev;
162{
163 struct mii_softc *sc;
164 struct mii_data *mii;
165
166 sc = device_get_softc(dev);
167 mii = device_get_softc(device_get_parent(dev));
62#endif
63
64static int brgphy_probe __P((device_t));
65static int brgphy_attach __P((device_t));
66static int brgphy_detach __P((device_t));
67
68static device_method_t brgphy_methods[] = {
69 /* device interface */

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

160static int brgphy_detach(dev)
161 device_t dev;
162{
163 struct mii_softc *sc;
164 struct mii_data *mii;
165
166 sc = device_get_softc(dev);
167 mii = device_get_softc(device_get_parent(dev));
168 if (sc->mii_flags & MIIF_DOINGAUTO)
169 untimeout(mii_phy_auto_timeout, sc, sc->mii_auto_ch);
168 sc->mii_dev = NULL;
169 LIST_REMOVE(sc, mii_list);
170
171 return(0);
172}
173int
174brgphy_service(sc, mii, cmd)
175 struct mii_softc *sc;

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

394
395 /*
396 * Just let it finish asynchronously. This is for the benefit of
397 * the tick handler driving autonegotiation. Don't want 500ms
398 * delays all the time while the system is running!
399 */
400 if ((mii->mii_flags & MIIF_DOINGAUTO) == 0) {
401 mii->mii_flags |= MIIF_DOINGAUTO;
170 sc->mii_dev = NULL;
171 LIST_REMOVE(sc, mii_list);
172
173 return(0);
174}
175int
176brgphy_service(sc, mii, cmd)
177 struct mii_softc *sc;

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

396
397 /*
398 * Just let it finish asynchronously. This is for the benefit of
399 * the tick handler driving autonegotiation. Don't want 500ms
400 * delays all the time while the system is running!
401 */
402 if ((mii->mii_flags & MIIF_DOINGAUTO) == 0) {
403 mii->mii_flags |= MIIF_DOINGAUTO;
402 timeout(mii_phy_auto_timeout, mii, hz >> 1);
404 mii->mii_auto_ch = timeout(mii_phy_auto_timeout, mii, hz >> 1);
403 }
404 return (EJUSTRETURN);
405}
405 }
406 return (EJUSTRETURN);
407}