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 the duplex of manual media settin...
details: https://anonhg.NetBSD.org/src/rev/857b5eeafc66
branches: trunk
changeset: 998233:857b5eeafc66
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Apr 11 08:50:20 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. Same as a part of
FreeBSD r217413.
diffstat:
sys/dev/mii/brgphy.c | 6 +++---
sys/dev/mii/ciphy.c | 6 +++---
sys/dev/mii/rgephy.c | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 0e5e6e756d8e -r 857b5eeafc66 sys/dev/mii/brgphy.c
--- a/sys/dev/mii/brgphy.c Thu Apr 11 08:34:19 2019 +0000
+++ b/sys/dev/mii/brgphy.c Thu Apr 11 08:50:20 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brgphy.c,v 1.83 2019/03/25 09:20:46 msaitoh Exp $ */
+/* $NetBSD: brgphy.c,v 1.84 2019/04/11 08:50:20 msaitoh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.83 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.84 2019/04/11 08:50:20 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -351,7 +351,7 @@
speed = BMCR_S10;
setit:
brgphy_loop(sc);
- if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+ if ((ife->ifm_media & IFM_FDX) != 0) {
speed |= BMCR_FDX;
gig = GTCR_ADV_1000TFDX;
} else
diff -r 0e5e6e756d8e -r 857b5eeafc66 sys/dev/mii/ciphy.c
--- a/sys/dev/mii/ciphy.c Thu Apr 11 08:34:19 2019 +0000
+++ b/sys/dev/mii/ciphy.c Thu Apr 11 08:50:20 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.32 2019/03/25 09:20:46 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.33 2019/04/11 08:50:20 msaitoh Exp $ */
/*-
* Copyright (c) 2004
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.32 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.33 2019/04/11 08:50:20 msaitoh Exp $");
/*
* Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -184,7 +184,7 @@
case IFM_10_T:
speed = BMCR_S10;
setit:
- if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+ if ((ife->ifm_media & IFM_FDX) != 0) {
speed |= BMCR_FDX;
gig = GTCR_ADV_1000TFDX;
} else
diff -r 0e5e6e756d8e -r 857b5eeafc66 sys/dev/mii/rgephy.c
--- a/sys/dev/mii/rgephy.c Thu Apr 11 08:34:19 2019 +0000
+++ b/sys/dev/mii/rgephy.c Thu Apr 11 08:50:20 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rgephy.c,v 1.52 2019/03/25 09:20:46 msaitoh Exp $ */
+/* $NetBSD: rgephy.c,v 1.53 2019/04/11 08:50:20 msaitoh Exp $ */
/*
* Copyright (c) 2003
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.52 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.53 2019/04/11 08:50:20 msaitoh Exp $");
/*
@@ -231,7 +231,7 @@
anar |= ANAR_10_FD | ANAR_10;
setit:
rgephy_loop(sc);
- if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+ if ((ife->ifm_media & IFM_FDX) != 0) {
speed |= BMCR_FDX;
gig = GTCR_ADV_1000TFDX;
anar &= ~(ANAR_TX | ANAR_10);
Home |
Main Index |
Thread Index |
Old Index