summaryrefslogtreecommitdiff
path: root/sys/dev/mii
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-03-11 13:40:47 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-03-11 13:40:47 +0000
commit0f8365d463f750dcfdb032070f4fe8818dbb95a7 (patch)
treec782b1ca1b424d800b4d8c416ad9bfb59473ad0f /sys/dev/mii
parent3db44835013f5fbe990c41bc7a6ebd216f9e9ac4 (diff)
Add support for RTL8153 devices. Heavily based on changes made by Kevin Lo
to the FreeBSD driver. This driver will attach instead of cdce(4), which doesn't expose a PHY and doesn't work with my 5c20 revision of the chip. ok jimatthew@, jcs@
Diffstat (limited to 'sys/dev/mii')
-rw-r--r--sys/dev/mii/rgephy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c
index ab0e7c7c687..b4c95d078fa 100644
--- a/sys/dev/mii/rgephy.c
+++ b/sys/dev/mii/rgephy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rgephy.c,v 1.38 2015/07/19 06:35:18 yuo Exp $ */
+/* $OpenBSD: rgephy.c,v 1.39 2017/03/11 13:40:46 kettenis Exp $ */
/*
* Copyright (c) 2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
@@ -249,7 +249,7 @@ setit:
* need to restart the autonegotiation process. Read
* the BMSR twice in case it's latched.
*/
- if (strcmp(devname, "re") == 0) {
+ if (strcmp(devname, "re") == 0 || strcmp(devname, "ure") == 0) {
reg = PHY_READ(sc, RL_GMEDIASTAT);
if (reg & RL_GMEDIASTAT_LINK) {
sc->mii_ticks = 0;
@@ -305,7 +305,7 @@ rgephy_status(struct mii_softc *sc)
mii->mii_media_status = IFM_AVALID;
mii->mii_media_active = IFM_ETHER;
- if (strcmp(devname, "re") == 0) {
+ if (strcmp(devname, "re") == 0 || strcmp(devname, "ure") == 0) {
bmsr = PHY_READ(sc, RL_GMEDIASTAT);
if (bmsr & RL_GMEDIASTAT_LINK)
mii->mii_media_status |= IFM_ACTIVE;
@@ -330,7 +330,7 @@ rgephy_status(struct mii_softc *sc)
}
}
- if (strcmp(devname, "re") == 0) {
+ if (strcmp(devname, "re") == 0 || strcmp(devname, "ure") == 0) {
bmsr = PHY_READ(sc, RL_GMEDIASTAT);
if (bmsr & RL_GMEDIASTAT_1000MBPS)
mii->mii_media_active |= IFM_1000_T;