mii.c (147287) | mii.c (155669) |
---|---|
1/* $NetBSD: mii.c,v 1.12 1999/08/03 19:41:49 drochner Exp $ */ 2 3/*- 4 * Copyright (c) 1998 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, --- 24 unchanged lines hidden (view full) --- 33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 * POSSIBILITY OF SUCH DAMAGE. 38 */ 39 40#include <sys/cdefs.h> | 1/* $NetBSD: mii.c,v 1.12 1999/08/03 19:41:49 drochner Exp $ */ 2 3/*- 4 * Copyright (c) 1998 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, --- 24 unchanged lines hidden (view full) --- 33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 * POSSIBILITY OF SUCH DAMAGE. 38 */ 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/sys/dev/mii/mii.c 147287 2005-06-11 00:20:38Z brooks $"); | 41__FBSDID("$FreeBSD: head/sys/dev/mii/mii.c 155669 2006-02-14 12:10:03Z glebius $"); |
42 43/* 44 * MII bus layer, glues MII-capable network interface drivers to sharable 45 * PHY drivers. This exports an interface compatible with BSD/OS 3.0's, 46 * plus some NetBSD extensions. 47 */ 48 49#include <sys/param.h> --- 185 unchanged lines hidden (view full) --- 235 parent = device_get_parent(dev); 236 return(MIIBUS_WRITEREG(parent, phy, reg, data)); 237} 238 239static void 240miibus_statchg(device_t dev) 241{ 242 device_t parent; | 42 43/* 44 * MII bus layer, glues MII-capable network interface drivers to sharable 45 * PHY drivers. This exports an interface compatible with BSD/OS 3.0's, 46 * plus some NetBSD extensions. 47 */ 48 49#include <sys/param.h> --- 185 unchanged lines hidden (view full) --- 235 parent = device_get_parent(dev); 236 return(MIIBUS_WRITEREG(parent, phy, reg, data)); 237} 238 239static void 240miibus_statchg(device_t dev) 241{ 242 device_t parent; |
243 struct mii_data *mii; 244 struct ifnet *ifp; |
|
243 244 parent = device_get_parent(dev); 245 MIIBUS_STATCHG(parent); | 245 246 parent = device_get_parent(dev); 247 MIIBUS_STATCHG(parent); |
248 249 mii = device_get_softc(dev); 250 251 /* 252 * Note that each NIC's softc must start with an ifnet pointer. 253 * XXX: EVIL HACK! 254 */ 255 ifp = *(struct ifnet **)device_get_softc(parent); 256 ifp->if_baudrate = ifmedia_baudrate(mii->mii_media_active); |
|
246 return; 247} 248 249static void 250miibus_linkchg(device_t dev) 251{ 252 struct mii_data *mii; 253 device_t parent; --- 138 unchanged lines hidden --- | 257 return; 258} 259 260static void 261miibus_linkchg(device_t dev) 262{ 263 struct mii_data *mii; 264 device_t parent; --- 138 unchanged lines hidden --- |