Module Name: src
Committed By: msaitoh
Date: Fri Aug 16 15:24:09 UTC 2019
Modified Files:
src/sys/dev/mii: etphy.c
Log Message:
>From FreeBSD:
- Support ET1011.
- Use mii_phy_flowstatus() to reflect flow status from negotiated result.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/mii/etphy.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/mii/etphy.c
diff -u src/sys/dev/mii/etphy.c:1.5 src/sys/dev/mii/etphy.c:1.6
--- src/sys/dev/mii/etphy.c:1.5 Fri Aug 16 15:17:31 2019
+++ src/sys/dev/mii/etphy.c Fri Aug 16 15:24:09 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: etphy.c,v 1.5 2019/08/16 15:17:31 msaitoh Exp $ */
+/* $NetBSD: etphy.c,v 1.6 2019/08/16 15:24:09 msaitoh Exp $ */
/* $OpenBSD: etphy.c,v 1.4 2008/04/02 20:12:58 brad Exp $ */
/*
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: etphy.c,v 1.5 2019/08/16 15:17:31 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: etphy.c,v 1.6 2019/08/16 15:24:09 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -89,6 +89,7 @@ static const struct mii_phy_funcs etphy_
static const struct mii_phydesc etphys[] = {
MII_PHY_DESC(AGERE, ET1011),
+ MII_PHY_DESC(AGERE, ET1011C),
MII_PHY_END,
};
@@ -258,6 +259,11 @@ etphy_reset(struct mii_softc *sc)
uint16_t reg;
int i;
+ if (sc->mii_mpd_model == MII_MODEL_AGERE_ET1011) {
+ mii_phy_reset(sc);
+ return;
+ }
+
for (i = 0; i < 2; ++i) {
PHY_READ(sc, MII_PHYIDR1, ®);
PHY_READ(sc, MII_PHYIDR2, ®);
@@ -339,7 +345,7 @@ etphy_status(struct mii_softc *sc)
}
if (sr & ETPHY_SR_FDX)
- mii->mii_media_active |= IFM_FDX;
+ mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc);
else
mii->mii_media_active |= IFM_HDX;
}