Deleted Added
full compact
truephy.c (206563) truephy.c (213229)
1/*-
2 * Copyright (c) 2007 The DragonFly Project. All rights reserved.
3 *
4 * This code is derived from software contributed to The DragonFly Project
5 * by Sepherosa Ziehau <sepherosa@gmail.com>
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $DragonFly: src/sys/dev/netif/mii_layer/truephy.c,v 1.3 2008/02/10 07:29:27 sephe Exp $
1/*-
2 * Copyright (c) 2007 The DragonFly Project. All rights reserved.
3 *
4 * This code is derived from software contributed to The DragonFly Project
5 * by Sepherosa Ziehau <sepherosa@gmail.com>
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $DragonFly: src/sys/dev/netif/mii_layer/truephy.c,v 1.3 2008/02/10 07:29:27 sephe Exp $
35 * $FreeBSD: head/sys/dev/mii/truephy.c 206563 2010-04-13 20:07:52Z yongari $
35 * $FreeBSD: head/sys/dev/mii/truephy.c 213229 2010-09-27 20:31:03Z marius $
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/kernel.h>
41#include <sys/socket.h>
42#include <sys/errno.h>
43#include <sys/module.h>

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

145
146 sc = device_get_softc(dev);
147 ma = device_get_ivars(dev);
148
149 sc->mii_phy = ma->mii_phyno;
150 if (sc->mii_anegticks == 0)
151 sc->mii_anegticks = MII_ANEGTICKS;
152 sc->mii_dev = device_get_parent(dev);
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/kernel.h>
41#include <sys/socket.h>
42#include <sys/errno.h>
43#include <sys/module.h>

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

145
146 sc = device_get_softc(dev);
147 ma = device_get_ivars(dev);
148
149 sc->mii_phy = ma->mii_phyno;
150 if (sc->mii_anegticks == 0)
151 sc->mii_anegticks = MII_ANEGTICKS;
152 sc->mii_dev = device_get_parent(dev);
153 mii = device_get_softc(sc->mii_dev);
153 mii = ma->mii_data;
154 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
155
156 sc->mii_inst = mii->mii_instance;
157 sc->mii_phy = ma->mii_phyno;
158 sc->mii_service = truephy_service;
159 sc->mii_pdata = mii;
160
161 sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP;

--- 199 unchanged lines hidden ---
154 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
155
156 sc->mii_inst = mii->mii_instance;
157 sc->mii_phy = ma->mii_phyno;
158 sc->mii_service = truephy_service;
159 sc->mii_pdata = mii;
160
161 sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP;

--- 199 unchanged lines hidden ---