Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/dev/mii Pull up following revision(s) (requested by m...
details: https://anonhg.NetBSD.org/src/rev/3bae786efb49
branches: netbsd-9
changeset: 359887:3bae786efb49
user: martin <martin%NetBSD.org@localhost>
date: Sat Jan 29 16:54:42 2022 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #1409):
sys/dev/mii/igphy.c: revision 1.37
sys/dev/mii/ihphy.c: revision 1.19
sys/dev/mii/makphy.c: revision 1.68
Fix a bug that "ifconfig xx0 media none" set LINK_STATE_UNKNOWN instead of
LINK_STATE_DOWN.
XXX We should check for other PHY drivers, too.
diffstat:
sys/dev/mii/igphy.c | 5 ++---
sys/dev/mii/ihphy.c | 5 ++---
sys/dev/mii/makphy.c | 7 +++----
3 files changed, 7 insertions(+), 10 deletions(-)
diffs (81 lines):
diff -r 5dc7cc24df94 -r 3bae786efb49 sys/dev/mii/igphy.c
--- a/sys/dev/mii/igphy.c Sat Jan 29 16:43:23 2022 +0000
+++ b/sys/dev/mii/igphy.c Sat Jan 29 16:54:42 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: igphy.c,v 1.31.4.1 2020/08/05 15:14:18 martin Exp $ */
+/* $NetBSD: igphy.c,v 1.31.4.2 2022/01/29 16:54:42 martin Exp $ */
/*
* The Intel copyright applies to the analog register setup, and the
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.31.4.1 2020/08/05 15:14:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.31.4.2 2022/01/29 16:54:42 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_mii.h"
@@ -433,7 +433,6 @@
PHY_READ(sc, MII_BMCR, &bmcr);
if (bmcr & BMCR_ISO) {
mii->mii_media_active |= IFM_NONE;
- mii->mii_media_status = 0;
return;
}
diff -r 5dc7cc24df94 -r 3bae786efb49 sys/dev/mii/ihphy.c
--- a/sys/dev/mii/ihphy.c Sat Jan 29 16:43:23 2022 +0000
+++ b/sys/dev/mii/ihphy.c Sat Jan 29 16:54:42 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ihphy.c,v 1.14.4.2 2021/11/20 14:59:04 martin Exp $ */
+/* $NetBSD: ihphy.c,v 1.14.4.3 2022/01/29 16:54:42 martin Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.14.4.2 2021/11/20 14:59:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.14.4.3 2022/01/29 16:54:42 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -238,7 +238,6 @@
PHY_READ(sc, MII_BMCR, &bmcr);
if (bmcr & (BMCR_ISO | BMCR_PDOWN)) {
mii->mii_media_active |= IFM_NONE;
- mii->mii_media_status = 0;
return;
}
diff -r 5dc7cc24df94 -r 3bae786efb49 sys/dev/mii/makphy.c
--- a/sys/dev/mii/makphy.c Sat Jan 29 16:43:23 2022 +0000
+++ b/sys/dev/mii/makphy.c Sat Jan 29 16:54:42 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: makphy.c,v 1.60.2.2 2020/08/05 15:14:18 martin Exp $ */
+/* $NetBSD: makphy.c,v 1.60.2.3 2022/01/29 16:54:42 martin Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.60.2.2 2020/08/05 15:14:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.60.2.3 2022/01/29 16:54:42 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -434,9 +434,8 @@
if (bmcr & BMCR_LOOP)
mii->mii_media_active |= IFM_LOOP;
- if (bmcr & BMCR_ISO) {
+ if (bmcr & (BMCR_ISO | BMCR_PDOWN)) {
mii->mii_media_active |= IFM_NONE;
- mii->mii_media_status = 0;
return;
}
Home |
Main Index |
Thread Index |
Old Index