-/* $OpenBSD: rgephy.c,v 1.41 2022/04/06 18:59:29 naddy Exp $ */
+/* $OpenBSD: rgephy.c,v 1.42 2023/04/02 11:28:23 kettenis Exp $ */
/*
* Copyright (c) 2003
* Bill Paul <wpaul@windriver.com>. All rights reserved.
MII_STR_xxREALTEK_RTL8169S },
{ MII_OUI_xxREALTEK, MII_MODEL_xxREALTEK_RTL8251,
MII_STR_xxREALTEK_RTL8251 },
+ { MII_OUI_xxREALTEK, MII_MODEL_xxREALTEK_RTL8211FVD,
+ MII_STR_xxREALTEK_RTL8211FVD },
{ 0, 0,
NULL },
sc->mii_ticks = 0;
break;
}
- } else if (sc->mii_rev == RGEPHY_8211F) {
+ } else if (sc->mii_model == MII_MODEL_xxREALTEK_RTL8211FVD ||
+ (sc->mii_model == MII_MODEL_xxREALTEK_RTL8169S &&
+ sc->mii_rev == RGEPHY_8211F)) {
reg = PHY_READ(sc, RGEPHY_F_SR);
if (reg & RGEPHY_F_SR_LINK) {
sc->mii_ticks = 0;
bmsr = PHY_READ(sc, RL_GMEDIASTAT);
if (bmsr & RL_GMEDIASTAT_LINK)
mii->mii_media_status |= IFM_ACTIVE;
- } else if (sc->mii_rev == RGEPHY_8211F) {
+ } else if (sc->mii_model == MII_MODEL_xxREALTEK_RTL8211FVD ||
+ (sc->mii_model == MII_MODEL_xxREALTEK_RTL8169S &&
+ sc->mii_rev == RGEPHY_8211F)) {
bmsr = PHY_READ(sc, RGEPHY_F_SR);
if (bmsr & RGEPHY_F_SR_LINK)
mii->mii_media_status |= IFM_ACTIVE;
IFM_FDX;
else
mii->mii_media_active |= IFM_HDX;
- } else if (sc->mii_rev == RGEPHY_8211F) {
+ } else if (sc->mii_model == MII_MODEL_xxREALTEK_RTL8211FVD ||
+ (sc->mii_model == MII_MODEL_xxREALTEK_RTL8169S &&
+ sc->mii_rev == RGEPHY_8211F)) {
bmsr = PHY_READ(sc, RGEPHY_F_SR);
if (RGEPHY_F_SR_SPEED(bmsr) == RGEPHY_F_SR_SPEED_1000MBPS)
mii->mii_media_active |= IFM_1000_T;
u_int32_t bmsr;
int i;
- if (sc->mii_model != MII_MODEL_xxREALTEK_RTL8251 &&
+ if (sc->mii_model == MII_MODEL_xxREALTEK_RTL8169S &&
sc->mii_rev < 2) {
PHY_WRITE(sc, MII_BMCR, BMCR_PDOWN);
DELAY(1000);
{
int val;
- if (sc->mii_model == MII_MODEL_xxREALTEK_RTL8251 ||
+ if (sc->mii_model != MII_MODEL_xxREALTEK_RTL8169S ||
sc->mii_rev > 1)
return;