Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/adm5120/dev Fix a bug that the duplex of manua...



details:   https://anonhg.NetBSD.org/src/rev/d279f3b0b570
branches:  trunk
changeset: 455767:d279f3b0b570
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Apr 12 05:19:24 2019 +0000

description:
Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.

diffstat:

 sys/arch/mips/adm5120/dev/if_admsw.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b09e4933bf6f -r d279f3b0b570 sys/arch/mips/adm5120/dev/if_admsw.c
--- a/sys/arch/mips/adm5120/dev/if_admsw.c      Fri Apr 12 04:50:21 2019 +0000
+++ b/sys/arch/mips/adm5120/dev/if_admsw.c      Fri Apr 12 05:19:24 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_admsw.c,v 1.19 2019/04/11 08:50:59 msaitoh Exp $ */
+/* $NetBSD: if_admsw.c,v 1.20 2019/04/12 05:19:24 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.19 2019/04/11 08:50:59 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.20 2019/04/12 05:19:24 msaitoh Exp $");
 
 
 #include <sys/param.h>
@@ -1237,7 +1237,7 @@
                else
                        val = PHY_CNTL2_100M;
        } else if (IFM_SUBTYPE(ifm->ifm_media) == IFM_10_T) {
-               if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)
+               if ((ifm->ifm_media & IFM_FDX) != 0)
                        val = PHY_CNTL2_FDX;
                else
                        val = 0;



Home | Main Index | Thread Index | Old Index