From 0f8365d463f750dcfdb032070f4fe8818dbb95a7 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 11 Mar 2017 13:40:47 +0000 Subject: 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@ --- sys/dev/mii/rgephy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev/mii/rgephy.c') 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 . 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; -- cgit v1.2.3