Module Name: src Committed By: msaitoh Date: Thu Apr 11 09:16:57 UTC 2019
Modified Files: src/sys/dev/usb: if_aue.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/dev/usb/if_aue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/if_aue.c diff -u src/sys/dev/usb/if_aue.c:1.148 src/sys/dev/usb/if_aue.c:1.149 --- src/sys/dev/usb/if_aue.c:1.148 Tue Mar 12 03:08:34 2019 +++ src/sys/dev/usb/if_aue.c Thu Apr 11 09:16:56 2019 @@ -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_miibus_statchg(struct ifnet *ifp) 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);