Module Name: src Committed By: msaitoh Date: Fri Apr 12 05:19:24 UTC 2019
Modified Files: src/sys/arch/mips/adm5120/dev: if_admsw.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.19 -r1.20 src/sys/arch/mips/adm5120/dev/if_admsw.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/arch/mips/adm5120/dev/if_admsw.c diff -u src/sys/arch/mips/adm5120/dev/if_admsw.c:1.19 src/sys/arch/mips/adm5120/dev/if_admsw.c:1.20 --- src/sys/arch/mips/adm5120/dev/if_admsw.c:1.19 Thu Apr 11 08:50:59 2019 +++ src/sys/arch/mips/adm5120/dev/if_admsw.c Fri Apr 12 05:19:24 2019 @@ -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 @@ admsw_mediachange(struct ifnet *ifp) 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;