From 0e5636a12a40a5904e9bb88ec8683a6a91eb98e0 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Fri, 16 Jul 1999 14:59:08 +0000 Subject: 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. --- sys/dev/mii/sqphy.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys/dev/mii/sqphy.c') diff --git a/sys/dev/mii/sqphy.c b/sys/dev/mii/sqphy.c index eecc2ec46ec..0f58e2d2589 100644 --- a/sys/dev/mii/sqphy.c +++ b/sys/dev/mii/sqphy.c @@ -1,8 +1,8 @@ -/* $OpenBSD: sqphy.c,v 1.1 1998/11/11 19:34:49 jason Exp $ */ -/* $NetBSD: sqphy.c,v 1.8 1998/11/05 04:08:02 thorpej Exp $ */ +/* $OpenBSD: sqphy.c,v 1.2 1999/07/16 14:59:07 jason Exp $ */ +/* $NetBSD: sqphy.c,v 1.8.6.1 1999/04/23 15:41:25 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 #include #include +#include #include #include @@ -207,7 +208,7 @@ sqphy_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: /* @@ -261,7 +262,8 @@ sqphy_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; } -- cgit v1.2.3