Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/dev/mii Pull up following revision(s) (requested by m...
details: https://anonhg.NetBSD.org/src/rev/b2474923544a
branches: netbsd-6
changeset: 776892:b2474923544a
user: martin <martin%NetBSD.org@localhost>
date: Wed Feb 04 11:35:04 2015 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #1245):
sys/dev/mii/rgephy.c: revision 1.30
sys/dev/mii/brgphy.c: revision 1.64
sys/dev/mii/atphy.c: revision 1.13
sys/dev/mii/urlphy.c: revision 1.26
sys/dev/mii/ciphy.c: revision 1.20
sys/dev/mii/mii_physubr.c: revision 1.76
Fix a bug that the auto negotiation timer isn't cleard as we expected.
To not to forget clearing the timer and to reduce the code duplication,
clear mii_ticks in *mii_phy_auto().
diffstat:
sys/dev/mii/atphy.c | 6 +++---
sys/dev/mii/brgphy.c | 5 +++--
sys/dev/mii/ciphy.c | 5 ++---
sys/dev/mii/mii_physubr.c | 6 +++---
sys/dev/mii/rgephy.c | 6 +++---
sys/dev/mii/urlphy.c | 5 ++---
6 files changed, 16 insertions(+), 17 deletions(-)
diffs (180 lines):
diff -r 3e969f4359a0 -r b2474923544a sys/dev/mii/atphy.c
--- a/sys/dev/mii/atphy.c Wed Feb 04 10:55:00 2015 +0000
+++ b/sys/dev/mii/atphy.c Wed Feb 04 11:35:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atphy.c,v 1.11.8.1 2014/11/04 09:23:20 martin Exp $ */
+/* $NetBSD: atphy.c,v 1.11.8.2 2015/02/04 11:35:04 martin Exp $ */
/* $OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $ */
/*-
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.11.8.1 2014/11/04 09:23:20 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.11.8.2 2015/02/04 11:35:04 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -287,7 +287,6 @@
if (sc->mii_ticks <= sc->mii_anegticks)
break;
- sc->mii_ticks = 0;
atphy_mii_phy_auto(sc);
break;
}
@@ -403,6 +402,7 @@
{
uint16_t anar;
+ sc->mii_ticks = 0;
anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA;
if (sc->mii_flags & MIIF_DOPAUSE)
anar |= ANAR_X_PAUSE_TOWARDS;
diff -r 3e969f4359a0 -r b2474923544a sys/dev/mii/brgphy.c
--- a/sys/dev/mii/brgphy.c Wed Feb 04 10:55:00 2015 +0000
+++ b/sys/dev/mii/brgphy.c Wed Feb 04 11:35:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brgphy.c,v 1.59.8.7 2014/12/07 16:39:55 martin Exp $ */
+/* $NetBSD: brgphy.c,v 1.59.8.8 2015/02/04 11:35:04 martin 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.59.8.7 2014/12/07 16:39:55 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.59.8.8 2015/02/04 11:35:04 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -803,6 +803,7 @@
{
int anar, ktcr = 0;
+ sc->mii_ticks = 0;
brgphy_loop(sc);
PHY_RESET(sc);
diff -r 3e969f4359a0 -r b2474923544a sys/dev/mii/ciphy.c
--- a/sys/dev/mii/ciphy.c Wed Feb 04 10:55:00 2015 +0000
+++ b/sys/dev/mii/ciphy.c Wed Feb 04 11:35:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.19.18.1 2014/11/09 12:13:16 martin Exp $ */
+/* $NetBSD: ciphy.c,v 1.19.18.2 2015/02/04 11:35:04 martin Exp $ */
/*-
* Copyright (c) 2004
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.19.18.1 2014/11/09 12:13:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.19.18.2 2015/02/04 11:35:04 martin Exp $");
/*
* Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -275,7 +275,6 @@
if (++sc->mii_ticks <= MII_ANEGTICKS)
break;
- sc->mii_ticks = 0;
mii_phy_auto(sc, 0);
return (0);
}
diff -r 3e969f4359a0 -r b2474923544a sys/dev/mii/mii_physubr.c
--- a/sys/dev/mii/mii_physubr.c Wed Feb 04 10:55:00 2015 +0000
+++ b/sys/dev/mii/mii_physubr.c Wed Feb 04 11:35:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mii_physubr.c,v 1.73.2.1 2014/11/04 09:23:20 martin Exp $ */
+/* $NetBSD: mii_physubr.c,v 1.73.2.2 2015/02/04 11:35:04 martin Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.73.2.1 2014/11/04 09:23:20 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.73.2.2 2015/02/04 11:35:04 martin Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -202,6 +202,7 @@
struct mii_data *mii = sc->mii_pdata;
struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
+ sc->mii_ticks = 0;
if ((sc->mii_flags & MIIF_DOINGAUTO) == 0) {
/*
* Check for 1000BASE-X. Autonegotiation is a bit
@@ -346,7 +347,6 @@
if (++sc->mii_ticks <= sc->mii_anegticks)
return (EJUSTRETURN);
- sc->mii_ticks = 0;
PHY_RESET(sc);
if (mii_phy_auto(sc, 0) == EJUSTRETURN)
diff -r 3e969f4359a0 -r b2474923544a sys/dev/mii/rgephy.c
--- a/sys/dev/mii/rgephy.c Wed Feb 04 10:55:00 2015 +0000
+++ b/sys/dev/mii/rgephy.c Wed Feb 04 11:35:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rgephy.c,v 1.29.14.1 2014/11/04 09:23:20 martin Exp $ */
+/* $NetBSD: rgephy.c,v 1.29.14.2 2015/02/04 11:35:04 martin Exp $ */
/*
* Copyright (c) 2003
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.29.14.1 2014/11/04 09:23:20 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.29.14.2 2015/02/04 11:35:04 martin Exp $");
/*
@@ -319,7 +319,6 @@
if (sc->mii_ticks <= sc->mii_anegticks)
return 0;
- sc->mii_ticks = 0;
rgephy_mii_phy_auto(sc);
break;
}
@@ -428,6 +427,7 @@
{
int anar;
+ mii->mii_ticks = 0;
rgephy_loop(mii);
rgephy_reset(mii);
diff -r 3e969f4359a0 -r b2474923544a sys/dev/mii/urlphy.c
--- a/sys/dev/mii/urlphy.c Wed Feb 04 10:55:00 2015 +0000
+++ b/sys/dev/mii/urlphy.c Wed Feb 04 11:35:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: urlphy.c,v 1.25.20.1 2014/11/09 12:13:15 martin Exp $ */
+/* $NetBSD: urlphy.c,v 1.25.20.2 2015/02/04 11:35:04 martin Exp $ */
/*
* Copyright (c) 2001, 2002
* Shingo WATANABE <nabe%nabechan.org@localhost>. All rights reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.25.20.1 2014/11/09 12:13:15 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.25.20.2 2015/02/04 11:35:04 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -196,7 +196,6 @@
if (++sc->mii_ticks <= sc->mii_anegticks)
return (0);
- sc->mii_ticks = 0;
PHY_RESET(sc);
if (mii_phy_auto(sc, 0) == EJUSTRETURN)
Home |
Main Index |
Thread Index |
Old Index