Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys Pull up following revision(s) (requested by msaitoh i...
details: https://anonhg.NetBSD.org/src/rev/af6b14774dca
branches: netbsd-6
changeset: 776789:af6b14774dca
user: martin <martin%NetBSD.org@localhost>
date: Sun Nov 09 12:13:15 2014 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #1189):
sys/dev/pci/if_wm.c: revision 1.270
sys/dev/mii/inphy.c: revision 1.53
sys/dev/mii/glxtphy.c: revision 1.24
sys/dev/mii/tlphy.c: revision 1.62
sys/dev/mii/iophy.c: revision 1.37
sys/dev/mii/brgphy.c: revision 1.70
sys/dev/mii/ihphy.c: revision 1.8
sys/dev/mii/bmtphy.c: revision 1.31
sys/dev/mii/urlphy.c: revision 1.30
sys/dev/mii/makphy.c: revision 1.40
sys/dev/mii/qsphy.c: revision 1.48
sys/dev/mii/igphy.c: revision 1.23
sys/dev/mii/nsphy.c: revision 1.58
sys/dev/mii/mvphy.c: revision 1.10
sys/dev/pci/if_txp.c: revision 1.41
sys/dev/mii/nsphy.c: revision 1.59
sys/dev/mii/rlphy.c: revision 1.28
sys/dev/mii/icsphy.c: revision 1.49
sys/dev/mii/rlphy.c: revision 1.29
sys/dev/mii/lxtphy.c: revision 1.49
sys/dev/mii/ciphyreg.h: revision 1.5
sys/dev/mii/nsphyter.c: revision 1.38
sys/dev/mii/sqphy.c: revision 1.50
sys/dev/mii/gentbi.c: revision 1.26
sys/dev/mii/gentbi.c: revision 1.27
sys/dev/mii/tqphy.c: revision 1.39
sys/dev/mii/ikphy.c: revision 1.10
sys/dev/mii/dmphy.c: revision 1.35
sys/dev/mii/amhphy.c: revision 1.20
sys/dev/mii/acphy.c: revision 1.24
sys/dev/mii/ciphy.c: revision 1.25
sys/dev/mii/brgphyreg.h: revision 1.8
sys/dev/mii/ukphy_subr.c: revision 1.12
sys/dev/ic/rtl80x9.c: revision 1.16
sys/arch/mips/adm5120/dev/if_admsw.c: revision 1.12
sys/dev/pci/if_kse.c: revision 1.28
sys/dev/mii/ukphy_subr.c: revision 1.13
sys/dev/mii/mii.h: revision 1.18
sys/dev/mii/gphyter.c: revision 1.29
No functional change:
- Fix typo.
- Remove trailing white spaces.
- Capitalize comments.
- Tabify.
- KNF.
IFM_FDX and IFM_HDX use different bit, so set IFM_HDX bit if it's not full
duplex. For many drivers, it recognize half duplex if IFM_FDX isn't set,
but not for others. Same as {Free|Open}BSD.
diffstat:
sys/arch/mips/adm5120/dev/if_admsw.c | 6 ++++--
sys/dev/ic/rtl80x9.c | 6 ++++--
sys/dev/mii/acphy.c | 7 +++++--
sys/dev/mii/amhphy.c | 6 ++++--
sys/dev/mii/bmtphy.c | 13 ++++++-------
sys/dev/mii/brgphy.c | 12 ++++++------
sys/dev/mii/brgphyreg.h | 36 ++++++++++++++++++------------------
sys/dev/mii/ciphy.c | 6 ++++--
sys/dev/mii/ciphyreg.h | 10 +++++-----
sys/dev/mii/dmphy.c | 8 ++++----
sys/dev/mii/gentbi.c | 10 ++++++----
sys/dev/mii/glxtphy.c | 6 ++++--
sys/dev/mii/gphyter.c | 6 ++++--
sys/dev/mii/icsphy.c | 7 +++++--
sys/dev/mii/igphy.c | 6 ++++--
sys/dev/mii/ihphy.c | 9 +++++----
sys/dev/mii/ikphy.c | 6 ++++--
sys/dev/mii/inphy.c | 7 +++++--
sys/dev/mii/iophy.c | 6 ++++--
sys/dev/mii/lxtphy.c | 7 +++++--
sys/dev/mii/makphy.c | 6 ++++--
sys/dev/mii/mii.h | 6 +++---
sys/dev/mii/mvphy.c | 6 ++++--
sys/dev/mii/nsphy.c | 17 +++++++----------
sys/dev/mii/nsphyter.c | 7 +++++--
sys/dev/mii/qsphy.c | 10 +++++-----
sys/dev/mii/rlphy.c | 14 +++++++-------
sys/dev/mii/sqphy.c | 6 ++++--
sys/dev/mii/tlphy.c | 6 ++++--
sys/dev/mii/tqphy.c | 7 +++++--
sys/dev/mii/ukphy_subr.c | 14 +++++++-------
sys/dev/mii/urlphy.c | 7 +++++--
sys/dev/pci/if_kse.c | 8 ++++----
sys/dev/pci/if_txp.c | 10 +++++-----
sys/dev/pci/if_wm.c | 6 ++++--
35 files changed, 179 insertions(+), 131 deletions(-)
diffs (truncated from 1224 to 300 lines):
diff -r 33ccbe44d922 -r af6b14774dca sys/arch/mips/adm5120/dev/if_admsw.c
--- a/sys/arch/mips/adm5120/dev/if_admsw.c Sun Nov 09 12:04:30 2014 +0000
+++ b/sys/arch/mips/adm5120/dev/if_admsw.c Sun Nov 09 12:13:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_admsw.c,v 1.10 2011/07/10 23:13:23 matt Exp $ */
+/* $NetBSD: if_admsw.c,v 1.10.8.1 2014/11/09 12:13:16 martin 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.10 2011/07/10 23:13:23 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.10.8.1 2014/11/09 12:13:16 martin Exp $");
#include <sys/param.h>
@@ -1276,4 +1276,6 @@
ifmr->ifm_active |= (status & PHY_ST_100M) ? IFM_100_TX : IFM_10_T;
if (status & PHY_ST_FDX)
ifmr->ifm_active |= IFM_FDX;
+ else
+ ifmr->ifm_active |= IFM_HDX;
}
diff -r 33ccbe44d922 -r af6b14774dca sys/dev/ic/rtl80x9.c
--- a/sys/dev/ic/rtl80x9.c Sun Nov 09 12:04:30 2014 +0000
+++ b/sys/dev/ic/rtl80x9.c Sun Nov 09 12:13:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtl80x9.c,v 1.15 2009/03/14 15:36:17 dsl Exp $ */
+/* $NetBSD: rtl80x9.c,v 1.15.18.1 2014/11/09 12:13:16 martin Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl80x9.c,v 1.15 2009/03/14 15:36:17 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl80x9.c,v 1.15.18.1 2014/11/09 12:13:16 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -92,6 +92,8 @@
if (NIC_GET(sc->sc_regt, sc->sc_regh, NERTL_RTL3_CONFIG3) &
RTL3_CONFIG3_FUDUP)
ifmr->ifm_active |= IFM_FDX;
+ else
+ ifmr->ifm_active |= IFM_HDX;
}
/* Set NIC to page 0 registers. */
diff -r 33ccbe44d922 -r af6b14774dca sys/dev/mii/acphy.c
--- a/sys/dev/mii/acphy.c Sun Nov 09 12:04:30 2014 +0000
+++ b/sys/dev/mii/acphy.c Sun Nov 09 12:13:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acphy.c,v 1.23 2008/11/17 03:04:27 dyoung Exp $ */
+/* $NetBSD: acphy.c,v 1.23.22.1 2014/11/09 12:13:16 martin Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1.23 2008/11/17 03:04:27 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1.23.22.1 2014/11/09 12:13:16 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -248,8 +248,11 @@
mii->mii_media_active |= IFM_100_TX;
else
mii->mii_media_active |= IFM_10_T;
+
if (dr & DR_DPLX)
mii->mii_media_active |= IFM_FDX;
+ else
+ mii->mii_media_active |= IFM_HDX;
} else
mii->mii_media_active = ife->ifm_media;
}
diff -r 33ccbe44d922 -r af6b14774dca sys/dev/mii/amhphy.c
--- a/sys/dev/mii/amhphy.c Sun Nov 09 12:04:30 2014 +0000
+++ b/sys/dev/mii/amhphy.c Sun Nov 09 12:13:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amhphy.c,v 1.19 2008/11/17 03:04:27 dyoung Exp $ */
+/* $NetBSD: amhphy.c,v 1.19.22.1 2014/11/09 12:13:16 martin Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amhphy.c,v 1.19 2008/11/17 03:04:27 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amhphy.c,v 1.19.22.1 2014/11/09 12:13:16 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -230,6 +230,8 @@
mii->mii_media_active |= IFM_10_T;
if (ssr & SSR_FD)
mii->mii_media_active |= IFM_FDX;
+ else
+ mii->mii_media_active |= IFM_HDX;
} else
mii->mii_media_active = ife->ifm_media;
}
diff -r 33ccbe44d922 -r af6b14774dca sys/dev/mii/bmtphy.c
--- a/sys/dev/mii/bmtphy.c Sun Nov 09 12:04:30 2014 +0000
+++ b/sys/dev/mii/bmtphy.c Sun Nov 09 12:13:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bmtphy.c,v 1.30 2009/10/19 18:41:13 bouyer Exp $ */
+/* $NetBSD: bmtphy.c,v 1.30.18.1 2014/11/09 12:13:15 martin Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bmtphy.c,v 1.30 2009/10/19 18:41:13 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bmtphy.c,v 1.30.18.1 2014/11/09 12:13:15 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -247,7 +247,7 @@
if (bmcr & BMCR_AUTOEN) {
/*
- * The media status bits are only valid of autonegotiation
+ * The media status bits are only valid if autonegotiation
* has completed (or it's disabled).
*/
if ((bmsr & BMSR_ACOMP) == 0) {
@@ -272,7 +272,7 @@
mii->mii_media_active = ife->ifm_media;
}
-static void
+static void
bmtphy_reset(struct mii_softc *sc)
{
u_int16_t data;
@@ -288,8 +288,7 @@
data = PHY_READ(sc, MII_BMTPHY_AUX2);
PHY_WRITE(sc, MII_BMTPHY_AUX2, data | 0x0020);
- /* Enable clocks across APD for
- * Auto-MDIX functionality */
+ /* Enable clocks across APD for Auto-MDIX functionality */
data = PHY_READ(sc, MII_BMTPHY_INTR);
PHY_WRITE(sc, MII_BMTPHY_INTR, data | 0x0004);
@@ -297,4 +296,4 @@
data = PHY_READ(sc, 0x1f);
PHY_WRITE(sc, 0x1f, data & ~0x0080);
}
-}
+}
diff -r 33ccbe44d922 -r af6b14774dca sys/dev/mii/brgphy.c
--- a/sys/dev/mii/brgphy.c Sun Nov 09 12:04:30 2014 +0000
+++ b/sys/dev/mii/brgphy.c Sun Nov 09 12:13:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brgphy.c,v 1.59.8.5 2014/11/04 09:23:20 martin Exp $ */
+/* $NetBSD: brgphy.c,v 1.59.8.6 2014/11/09 12:13:15 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.5 2014/11/04 09:23:20 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.59.8.6 2014/11/09 12:13:15 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -576,7 +576,7 @@
break;
case BRGPHY_RES_1000HD:
- mii->mii_media_active |= IFM_1000_T;
+ mii->mii_media_active |= IFM_1000_T | IFM_HDX;
gtsr = PHY_READ(sc, MII_100T2SR);
if (gtsr & GTSR_MS_RES)
mii->mii_media_active |= IFM_ETH_MASTER;
@@ -587,11 +587,11 @@
break;
case BRGPHY_RES_100T4:
- mii->mii_media_active |= IFM_100_T4;
+ mii->mii_media_active |= IFM_100_T4 | IFM_HDX;
break;
case BRGPHY_RES_100HD:
- mii->mii_media_active |= IFM_100_TX;
+ mii->mii_media_active |= IFM_100_TX | IFM_HDX;
break;
case BRGPHY_RES_10FD:
@@ -599,7 +599,7 @@
break;
case BRGPHY_RES_10HD:
- mii->mii_media_active |= IFM_10_T;
+ mii->mii_media_active |= IFM_10_T | IFM_HDX;
break;
default:
diff -r 33ccbe44d922 -r af6b14774dca sys/dev/mii/brgphyreg.h
--- a/sys/dev/mii/brgphyreg.h Sun Nov 09 12:04:30 2014 +0000
+++ b/sys/dev/mii/brgphyreg.h Sun Nov 09 12:13:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brgphyreg.h,v 1.5 2010/12/09 23:25:49 jym Exp $ */
+/* $NetBSD: brgphyreg.h,v 1.5.14.1 2014/11/09 12:13:16 martin Exp $ */
/*
* Copyright (c) 2000
@@ -44,7 +44,7 @@
#define BRGPHY_MII_PHY_EXTCTL 0x10 /* PHY extended control */
#define BRGPHY_PHY_EXTCTL_MAC_PHY 0x8000 /* 10BIT/GMI-interface */
#define BRGPHY_PHY_EXTCTL_DIS_CROSS 0x4000 /* Disable MDI crossover */
-#define BRGPHY_PHY_EXTCTL_TX_DIS 0x2000 /* Tx output disable d*/
+#define BRGPHY_PHY_EXTCTL_TX_DIS 0x2000 /* Tx output disabled */
#define BRGPHY_PHY_EXTCTL_INT_DIS 0x1000 /* Interrupts disabled */
#define BRGPHY_PHY_EXTCTL_F_INT 0x0800 /* Force interrupt */
#define BRGPHY_PHY_EXTCTL_BY_45 0x0400 /* Bypass 4B5B-Decoder */
@@ -85,7 +85,7 @@
#define BRGPHY_MII_RXERRCNT 0x12 /* RX error counter */
-#define BRGPHY_MII_FCERRCNT 0x13 /* false carrier sense counter */
+#define BRGPHY_MII_FCERRCNT 0x13 /* False carrier sense counter */
#define BGRPHY_FCERRCNT 0x00FF /* False carrier counter */
#define BRGPHY_MII_RXNOCNT 0x14 /* RX not OK counter */
@@ -140,14 +140,14 @@
#define BRGPHY_AUXCTL_DIAG_MODE 0x0004 /* Diagnostic mode */
#define BRGPHY_MII_AUXSTS 0x19 /* AUX status */
-#define BRGPHY_AUXSTS_ACOMP 0x8000 /* autoneg complete */
-#define BRGPHY_AUXSTS_AN_ACK 0x4000 /* autoneg complete ack */
-#define BRGPHY_AUXSTS_AN_ACK_D 0x2000 /* autoneg complete ack detect */
-#define BRGPHY_AUXSTS_AN_NPW 0x1000 /* autoneg next page wait */
-#define BRGPHY_AUXSTS_AN_RES 0x0700 /* AN HDC */
+#define BRGPHY_AUXSTS_ACOMP 0x8000 /* Autoneg complete */
+#define BRGPHY_AUXSTS_AN_ACK 0x4000 /* Autoneg complete ack */
+#define BRGPHY_AUXSTS_AN_ACK_D 0x2000 /* Autoneg complete ack detect */
+#define BRGPHY_AUXSTS_AN_NPW 0x1000 /* Autoneg next page wait */
+#define BRGPHY_AUXSTS_AN_RES 0x0700 /* Autoneg HCD */
#define BRGPHY_AUXSTS_PDF 0x0080 /* Parallel detect. fault */
-#define BRGPHY_AUXSTS_RF 0x0040 /* remote fault */
-#define BRGPHY_AUXSTS_ANP_R 0x0020 /* AN page received */
+#define BRGPHY_AUXSTS_RF 0x0040 /* Remote fault */
+#define BRGPHY_AUXSTS_ANP_R 0x0020 /* Autoneg page received */
#define BRGPHY_AUXSTS_LP_ANAB 0x0010 /* LP AN ability */
#define BRGPHY_AUXSTS_LP_NPAB 0x0008 /* LP Next page ability */
#define BRGPHY_AUXSTS_LINK 0x0004 /* Link status */
@@ -162,11 +162,11 @@
#define BRGPHY_RES_10FD 0x0200 /* 10baseT full duplex */
#define BRGPHY_RES_10HD 0x0100 /* 10baseT half duplex */
-#define BRGPHY_MII_ISR 0x1A /* interrupt status */
+#define BRGPHY_MII_ISR 0x1A /* Interrupt status */
#define BRGPHY_ISR_PSERR 0x4000 /* Pair swap error */
#define BRGPHY_ISR_MDXI_SC 0x2000 /* MDIX Status Change */
-#define BRGPHY_ISR_HCT 0x1000 /* counter above 32K */
-#define BRGPHY_ISR_LCT 0x0800 /* all counter below 128 */
+#define BRGPHY_ISR_HCT 0x1000 /* Counter above 32K */
+#define BRGPHY_ISR_LCT 0x0800 /* All counter below 128 */
#define BRGPHY_ISR_AN_PR 0x0400 /* Autoneg page received */
#define BRGPHY_ISR_NO_HDCL 0x0200 /* No HCD Link */
#define BRGPHY_ISR_NO_HDC 0x0100 /* No HCD */
@@ -177,13 +177,13 @@
#define BRGPHY_ISR_DUP_CHG 0x0008 /* Duplex mode change */
#define BRGPHY_ISR_LSP_CHG 0x0004 /* Link speed changed */
#define BRGPHY_ISR_LNK_CHG 0x0002 /* Link status change */
-#define BRGPHY_ISR_CRCERR 0x0001 /* CEC error */
+#define BRGPHY_ISR_CRCERR 0x0001 /* CRC error */
-#define BRGPHY_MII_IMR 0x1B /* interrupt mask */
+#define BRGPHY_MII_IMR 0x1B /* Interrupt mask */
#define BRGPHY_IMR_PSERR 0x4000 /* Pair swap error */
#define BRGPHY_IMR_MDXI_SC 0x2000 /* MDIX Status Change */
-#define BRGPHY_IMR_HCT 0x1000 /* counter above 32K */
-#define BRGPHY_IMR_LCT 0x0800 /* all counter below 128 */
+#define BRGPHY_IMR_HCT 0x1000 /* Counter above 32K */
+#define BRGPHY_IMR_LCT 0x0800 /* All counter below 128 */
#define BRGPHY_IMR_AN_PR 0x0400 /* Autoneg page received */
#define BRGPHY_IMR_NO_HDCL 0x0200 /* No HCD Link */
#define BRGPHY_IMR_NO_HDC 0x0100 /* No HCD */
@@ -194,7 +194,7 @@
#define BRGPHY_IMR_DUP_CHG 0x0008 /* Duplex mode change */
#define BRGPHY_IMR_LSP_CHG 0x0004 /* Link speed changed */
#define BRGPHY_IMR_LNK_CHG 0x0002 /* Link status change */
-#define BRGPHY_IMR_CRCERR 0x0001 /* CEC error */
+#define BRGPHY_IMR_CRCERR 0x0001 /* CRC error */
Home |
Main Index |
Thread Index |
Old Index