Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/mii Fix a bug that ukphy_status() misunderstand mast...



details:   https://anonhg.NetBSD.org/src/rev/a0b8859f72a9
branches:  trunk
changeset: 1004326:a0b8859f72a9
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Oct 24 03:37:58 2019 +0000

description:
Fix a bug that ukphy_status() misunderstand master mode.

diffstat:

 sys/dev/mii/ukphy_subr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 2093c8783b19 -r a0b8859f72a9 sys/dev/mii/ukphy_subr.c
--- a/sys/dev/mii/ukphy_subr.c  Thu Oct 24 03:31:38 2019 +0000
+++ b/sys/dev/mii/ukphy_subr.c  Thu Oct 24 03:37:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ukphy_subr.c,v 1.15 2019/03/25 09:20:46 msaitoh Exp $  */
+/*     $NetBSD: ukphy_subr.c,v 1.16 2019/10/24 03:37:58 msaitoh Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ukphy_subr.c,v 1.15 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukphy_subr.c,v 1.16 2019/10/24 03:37:58 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -119,7 +119,7 @@
                else
                        mii->mii_media_active |= IFM_NONE;
 
-               if ((mii->mii_media_active & IFM_1000_T) &&
+               if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) &&
                    (gtsr & GTSR_MS_RES))
                        mii->mii_media_active |= IFM_ETH_MASTER;
 



Home | Main Index | Thread Index | Old Index