diff options
author | Jason Wright <jason@cvs.openbsd.org> | 1999-07-16 14:59:08 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 1999-07-16 14:59:08 +0000 |
commit | 0e5636a12a40a5904e9bb88ec8683a6a91eb98e0 (patch) | |
tree | 79139316eab4e879279fa709452e905153b78c4e /sys/dev/mii/inphy.c | |
parent | 9e2853823c92af3c3ed247622175ff75af176b46 (diff) |
Sync with NetBSD:
o Implement asynchronous autonegotiation when driven by the MII tick
(one-second clock). Prevents .5s delays every 5 seconds when the interface
is up but there is no link.
o Correct the sense of the PCR_FLINK100 bit in nsphy.c.
Diffstat (limited to 'sys/dev/mii/inphy.c')
-rw-r--r-- | sys/dev/mii/inphy.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/mii/inphy.c b/sys/dev/mii/inphy.c index 6f43b03fb1a..38c2660ca52 100644 --- a/sys/dev/mii/inphy.c +++ b/sys/dev/mii/inphy.c @@ -1,8 +1,8 @@ -/* $OpenBSD: inphy.c,v 1.2 1998/11/11 19:34:46 jason Exp $ */ -/* $NetBSD: inphy.c,v 1.10 1998/11/05 04:08:02 thorpej Exp $ */ +/* $OpenBSD: inphy.c,v 1.3 1999/07/16 14:59:06 jason Exp $ */ +/* $NetBSD: inphy.c,v 1.10.6.1 1999/04/23 15:39:09 perry Exp $ */ /*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. + * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -78,6 +78,7 @@ #include <sys/device.h> #include <sys/malloc.h> #include <sys/socket.h> +#include <sys/errno.h> #include <net/if.h> #include <net/if_media.h> @@ -216,7 +217,7 @@ inphy_service(sc, mii, cmd) */ if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN) return (0); - (void) mii_phy_auto(sc); + (void) mii_phy_auto(sc, 1); break; case IFM_100_T4: /* @@ -270,7 +271,8 @@ inphy_service(sc, mii, cmd) sc->mii_ticks = 0; mii_phy_reset(sc); - (void) mii_phy_auto(sc); + if (mii_phy_auto(sc, 0) == EJUSTRETURN) + return (0); break; } |