Deleted Added
full compact
brgphy.c (103103) brgphy.c (105135)
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 103103 2002-09-08 19:12:02Z jdp $
32 * $FreeBSD: head/sys/dev/mii/brgphy.c 105135 2002-10-14 22:31:52Z alfred $
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>

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

54#include <dev/mii/miidevs.h>
55
56#include <dev/mii/brgphyreg.h>
57
58#include "miibus_if.h"
59
60#if !defined(lint)
61static 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>

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

54#include <dev/mii/miidevs.h>
55
56#include <dev/mii/brgphyreg.h>
57
58#include "miibus_if.h"
59
60#if !defined(lint)
61static const char rcsid[] =
62 "$FreeBSD: head/sys/dev/mii/brgphy.c 103103 2002-09-08 19:12:02Z jdp $";
62 "$FreeBSD: head/sys/dev/mii/brgphy.c 105135 2002-10-14 22:31:52Z alfred $";
63#endif
64
63#endif
64
65static int brgphy_probe (device_t);
66static int brgphy_attach (device_t);
65static int brgphy_probe(device_t);
66static int brgphy_attach(device_t);
67
68static device_method_t brgphy_methods[] = {
69 /* device interface */
70 DEVMETHOD(device_probe, brgphy_probe),
71 DEVMETHOD(device_attach, brgphy_attach),
72 DEVMETHOD(device_detach, mii_phy_detach),
73 DEVMETHOD(device_shutdown, bus_generic_shutdown),
74 { 0, 0 }

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

83};
84
85DRIVER_MODULE(brgphy, miibus, brgphy_driver, brgphy_devclass, 0, 0);
86
87static int brgphy_service(struct mii_softc *, struct mii_data *, int);
88static void brgphy_status(struct mii_softc *);
89static int brgphy_mii_phy_auto(struct mii_softc *);
90
67
68static device_method_t brgphy_methods[] = {
69 /* device interface */
70 DEVMETHOD(device_probe, brgphy_probe),
71 DEVMETHOD(device_attach, brgphy_attach),
72 DEVMETHOD(device_detach, mii_phy_detach),
73 DEVMETHOD(device_shutdown, bus_generic_shutdown),
74 { 0, 0 }

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

83};
84
85DRIVER_MODULE(brgphy, miibus, brgphy_driver, brgphy_devclass, 0, 0);
86
87static int brgphy_service(struct mii_softc *, struct mii_data *, int);
88static void brgphy_status(struct mii_softc *);
89static int brgphy_mii_phy_auto(struct mii_softc *);
90
91static int brgphy_probe(dev)
91static int
92brgphy_probe(dev)
92 device_t dev;
93{
94 struct mii_attach_args *ma;
95
96 ma = device_get_ivars(dev);
97
98 if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxBROADCOM &&
99 MII_MODEL(ma->mii_id2) == MII_MODEL_xxBROADCOM_BCM5400) {

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

123 MII_MODEL(ma->mii_id2) == MII_MODEL_xxBROADCOM_BCM5703) {
124 device_set_desc(dev, MII_STR_xxBROADCOM_BCM5703);
125 return(0);
126 }
127
128 return(ENXIO);
129}
130
93 device_t dev;
94{
95 struct mii_attach_args *ma;
96
97 ma = device_get_ivars(dev);
98
99 if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxBROADCOM &&
100 MII_MODEL(ma->mii_id2) == MII_MODEL_xxBROADCOM_BCM5400) {

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

124 MII_MODEL(ma->mii_id2) == MII_MODEL_xxBROADCOM_BCM5703) {
125 device_set_desc(dev, MII_STR_xxBROADCOM_BCM5703);
126 return(0);
127 }
128
129 return(ENXIO);
130}
131
131static int brgphy_attach(dev)
132static int
133brgphy_attach(dev)
132 device_t dev;
133{
134 struct mii_softc *sc;
135 struct mii_attach_args *ma;
136 struct mii_data *mii;
137 const char *sep = "";
138
139 sc = device_get_softc(dev);

--- 278 unchanged lines hidden ---
134 device_t dev;
135{
136 struct mii_softc *sc;
137 struct mii_attach_args *ma;
138 struct mii_data *mii;
139 const char *sep = "";
140
141 sc = device_get_softc(dev);

--- 278 unchanged lines hidden ---