Deleted Added
full compact
xlphy.c (50577) xlphy.c (50758)
1/* $NetBSD: exphy.c,v 1.16 1999/04/23 04:24:32 thorpej Exp $ */
2
3/*-
4 * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,

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

84#include <dev/mii/mii.h>
85#include <dev/mii/miivar.h>
86#include <dev/mii/miidevs.h>
87
88#include "miibus_if.h"
89
90#if !defined(lint)
91static const char rcsid[] =
1/* $NetBSD: exphy.c,v 1.16 1999/04/23 04:24:32 thorpej Exp $ */
2
3/*-
4 * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,

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

84#include <dev/mii/mii.h>
85#include <dev/mii/miivar.h>
86#include <dev/mii/miidevs.h>
87
88#include "miibus_if.h"
89
90#if !defined(lint)
91static const char rcsid[] =
92 "$Id: exphy.c,v 1.1 1999/08/21 17:40:41 wpaul Exp $";
92 "$FreeBSD: head/sys/dev/mii/exphy.c 50758 1999-09-01 17:07:27Z wpaul $";
93#endif
94
95static int exphy_probe __P((device_t));
96static int exphy_attach __P((device_t));
97static int exphy_detach __P((device_t));
98
99static device_method_t exphy_methods[] = {
100 /* device interface */

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

156 struct mii_softc *sc;
157 struct mii_attach_args *ma;
158 struct mii_data *mii;
159
160 sc = device_get_softc(dev);
161 ma = device_get_ivars(dev);
162 sc->mii_dev = device_get_parent(dev);
163 mii = device_get_softc(sc->mii_dev);
93#endif
94
95static int exphy_probe __P((device_t));
96static int exphy_attach __P((device_t));
97static int exphy_detach __P((device_t));
98
99static device_method_t exphy_methods[] = {
100 /* device interface */

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

156 struct mii_softc *sc;
157 struct mii_attach_args *ma;
158 struct mii_data *mii;
159
160 sc = device_get_softc(dev);
161 ma = device_get_ivars(dev);
162 sc->mii_dev = device_get_parent(dev);
163 mii = device_get_softc(sc->mii_dev);
164 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
165
164
166 sc->mii_inst = mii->mii_instance;
167 sc->mii_phy = ma->mii_phyno;
168 sc->mii_service = exphy_service;
169 sc->mii_pdata = mii;
170
171 /*
172 * The 3Com PHY can never be isolated, so never allow non-zero
173 * instances!
174 */
175 if (mii->mii_instance != 0) {
176 device_printf(dev, "ignoring this PHY, non-zero instance\n");
177 return(ENXIO);
178 }
179
165 /*
166 * The 3Com PHY can never be isolated, so never allow non-zero
167 * instances!
168 */
169 if (mii->mii_instance != 0) {
170 device_printf(dev, "ignoring this PHY, non-zero instance\n");
171 return(ENXIO);
172 }
173
174 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
175
176 sc->mii_inst = mii->mii_instance;
177 sc->mii_phy = ma->mii_phyno;
178 sc->mii_service = exphy_service;
179 sc->mii_pdata = mii;
180 mii->mii_instance++;
181
182 sc->mii_flags |= MIIF_NOISOLATE;
183
184#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
185
186#if 0 /* See above. */
187 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst),

--- 129 unchanged lines hidden ---
180 mii->mii_instance++;
181
182 sc->mii_flags |= MIIF_NOISOLATE;
183
184#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
185
186#if 0 /* See above. */
187 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst),

--- 129 unchanged lines hidden ---