acphy.c (95877) | acphy.c (96026) |
---|---|
1/*- 2 * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to The NetBSD Foundation 6 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 7 * NASA Ames Research Center. 8 * --- 75 unchanged lines hidden (view full) --- 84#include <dev/mii/miidevs.h> 85 86#include <dev/mii/acphyreg.h> 87 88#include "miibus_if.h" 89 90#if !defined(lint) 91static const char rcsid[] = | 1/*- 2 * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to The NetBSD Foundation 6 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 7 * NASA Ames Research Center. 8 * --- 75 unchanged lines hidden (view full) --- 84#include <dev/mii/miidevs.h> 85 86#include <dev/mii/acphyreg.h> 87 88#include "miibus_if.h" 89 90#if !defined(lint) 91static const char rcsid[] = |
92 "$FreeBSD: head/sys/dev/mii/acphy.c 95877 2002-05-01 19:15:54Z semenu $"; | 92 "$FreeBSD: head/sys/dev/mii/acphy.c 96026 2002-05-04 11:00:30Z phk $"; |
93#endif 94 95static int acphy_probe (device_t); 96static int acphy_attach (device_t); 97 98static device_method_t acphy_methods[] = { 99 /* device interface */ 100 DEVMETHOD(device_probe, acphy_probe), --- 107 unchanged lines hidden (view full) --- 208 switch (IFM_SUBTYPE(ife->ifm_media)) { 209 case IFM_AUTO: 210 /* 211 * If we're already in auto mode, just return. 212 */ 213 if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN) 214 return (0); 215 | 93#endif 94 95static int acphy_probe (device_t); 96static int acphy_attach (device_t); 97 98static device_method_t acphy_methods[] = { 99 /* device interface */ 100 DEVMETHOD(device_probe, acphy_probe), --- 107 unchanged lines hidden (view full) --- 208 switch (IFM_SUBTYPE(ife->ifm_media)) { 209 case IFM_AUTO: 210 /* 211 * If we're already in auto mode, just return. 212 */ 213 if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN) 214 return (0); 215 |
216 (void) mii_phy_auto(sc, 1); | 216 (void) mii_phy_auto(sc); |
217 break; 218 219 default: 220 /* 221 * BMCR data is stored in the ifmedia entry. 222 */ 223 PHY_WRITE(sc, MII_ANAR, 224 mii_anar(ife->ifm_media)); --- 83 unchanged lines hidden --- | 217 break; 218 219 default: 220 /* 221 * BMCR data is stored in the ifmedia entry. 222 */ 223 PHY_WRITE(sc, MII_ANAR, 224 mii_anar(ife->ifm_media)); --- 83 unchanged lines hidden --- |