Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Fix a bug that the duplex of manual media settin...



details:   https://anonhg.NetBSD.org/src/rev/2c204e2bf1f1
branches:  trunk
changeset: 450371:2c204e2bf1f1
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Apr 11 09:16:56 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/dev/usb/if_aue.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b297677a1c1f -r 2c204e2bf1f1 sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c      Thu Apr 11 09:14:07 2019 +0000
+++ b/sys/dev/usb/if_aue.c      Thu Apr 11 09:16:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_aue.c,v 1.148 2019/03/12 03:08:34 msaitoh Exp $     */
+/*     $NetBSD: if_aue.c,v 1.149 2019/04/11 09:16:56 msaitoh Exp $     */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.148 2019/03/12 03:08:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.149 2019/04/11 09:16:56 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -538,7 +538,7 @@
                AUE_CLRBIT(sc, AUE_CTL1, AUE_CTL1_SPEEDSEL);
        }
 
-       if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX)
+       if ((mii->mii_media_active & IFM_FDX) != 0)
                AUE_SETBIT(sc, AUE_CTL1, AUE_CTL1_DUPLEX);
        else
                AUE_CLRBIT(sc, AUE_CTL1, AUE_CTL1_DUPLEX);



Home | Main Index | Thread Index | Old Index