Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/mii Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/91b6062d6c1e
branches:  netbsd-8
changeset: 359894:91b6062d6c1e
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jan 29 16:56:18 2022 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #1726):

        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 9f141f80d5e5 -r 91b6062d6c1e sys/dev/mii/igphy.c
--- a/sys/dev/mii/igphy.c       Sat Jan 29 16:45:49 2022 +0000
+++ b/sys/dev/mii/igphy.c       Sat Jan 29 16:56:18 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: igphy.c,v 1.26.10.2 2020/08/05 17:22:46 martin Exp $   */
+/*     $NetBSD: igphy.c,v 1.26.10.3 2022/01/29 16:56:18 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.26.10.2 2020/08/05 17:22:46 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.26.10.3 2022/01/29 16:56:18 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mii.h"
@@ -443,7 +443,6 @@
        bmcr = PHY_READ(sc, MII_BMCR);
        if (bmcr & BMCR_ISO) {
                mii->mii_media_active |= IFM_NONE;
-               mii->mii_media_status = 0;
                return;
        }
 
diff -r 9f141f80d5e5 -r 91b6062d6c1e sys/dev/mii/ihphy.c
--- a/sys/dev/mii/ihphy.c       Sat Jan 29 16:45:49 2022 +0000
+++ b/sys/dev/mii/ihphy.c       Sat Jan 29 16:56:18 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ihphy.c,v 1.10.8.3 2021/11/20 15:11:32 martin Exp $    */
+/*     $NetBSD: ihphy.c,v 1.10.8.4 2022/01/29 16:56:18 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.10.8.3 2021/11/20 15:11:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.10.8.4 2022/01/29 16:56:18 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -244,7 +244,6 @@
        bmcr = PHY_READ(sc, MII_BMCR);
        if (bmcr & (BMCR_ISO | BMCR_PDOWN)) {
                mii->mii_media_active |= IFM_NONE;
-               mii->mii_media_status = 0;
                return;
        }
 
diff -r 9f141f80d5e5 -r 91b6062d6c1e sys/dev/mii/makphy.c
--- a/sys/dev/mii/makphy.c      Sat Jan 29 16:45:49 2022 +0000
+++ b/sys/dev/mii/makphy.c      Sat Jan 29 16:56:18 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: makphy.c,v 1.42.8.5 2020/08/05 17:22:46 martin Exp $   */
+/*     $NetBSD: makphy.c,v 1.42.8.6 2022/01/29 16:56:18 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.42.8.5 2020/08/05 17:22:46 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.42.8.6 2022/01/29 16:56:18 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -475,9 +475,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