mlphy.c (515db302) mlphy.c (b9bc8a8c)
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.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

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

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: src/sys/dev/mii/mlphy.c,v 1.2.2.3 2001/02/09 09:50:15 asmodai Exp $
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.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

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

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: src/sys/dev/mii/mlphy.c,v 1.2.2.3 2001/02/09 09:50:15 asmodai Exp $
33 * $DragonFly: src/sys/dev/netif/mii_layer/mlphy.c,v 1.6 2005/10/24 15:55:32 dillon Exp $
33 * $DragonFly: src/sys/dev/netif/mii_layer/mlphy.c,v 1.7 2005/10/24 16:55:40 dillon Exp $
34 */
35
36/*
37 * driver for Micro Linear 6692 PHYs
38 *
39 * The Micro Linear 6692 is a strange beast, and dealing with it using
40 * this code framework is tricky. The 6692 is actually a 100Mbps-only
41 * device, which means that a second PHY is required to support 10Mbps

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

137 struct mlphy_softc *msc;
138 struct mii_softc *sc;
139 struct mii_attach_args *ma;
140 struct mii_data *mii;
141
142 msc = device_get_softc(dev);
143 sc = &msc->ml_mii;
144 ma = device_get_ivars(dev);
34 */
35
36/*
37 * driver for Micro Linear 6692 PHYs
38 *
39 * The Micro Linear 6692 is a strange beast, and dealing with it using
40 * this code framework is tricky. The 6692 is actually a 100Mbps-only
41 * device, which means that a second PHY is required to support 10Mbps

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

137 struct mlphy_softc *msc;
138 struct mii_softc *sc;
139 struct mii_attach_args *ma;
140 struct mii_data *mii;
141
142 msc = device_get_softc(dev);
143 sc = &msc->ml_mii;
144 ma = device_get_ivars(dev);
145 mii_softc_init(sc);
145 mii_softc_init(sc, ma);
146 sc->mii_dev = device_get_parent(dev);
147 mii = device_get_softc(sc->mii_dev);
148 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
149
150 sc->mii_inst = mii->mii_instance;
146 sc->mii_dev = device_get_parent(dev);
147 mii = device_get_softc(sc->mii_dev);
148 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
149
150 sc->mii_inst = mii->mii_instance;
151 sc->mii_phy = ma->mii_phyno;
152 sc->mii_service = mlphy_service;
153 sc->mii_pdata = mii;
154
155 mii->mii_instance++;
156
157#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
158
159#if 0 /* See above. */

--- 301 unchanged lines hidden ---
151 sc->mii_service = mlphy_service;
152 sc->mii_pdata = mii;
153
154 mii->mii_instance++;
155
156#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
157
158#if 0 /* See above. */

--- 301 unchanged lines hidden ---