- Match a lot of Cicada and Vitesse devices correctly. This change also fixes
a bug that ciphy_fixup() didn't work. - Match VSC8221, VSC8234 and VSC8641.
This commit is contained in:
parent
12230c0f48
commit
46a9017a9b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ciphy.c,v 1.36 2019/10/11 09:31:52 msaitoh Exp $ */
|
||||
/* $NetBSD: ciphy.c,v 1.37 2019/10/17 09:22:49 msaitoh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.36 2019/10/11 09:31:52 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.37 2019/10/17 09:22:49 msaitoh Exp $");
|
||||
|
||||
/*
|
||||
* Driver for the Cicada CS8201 10/100/1000 copper PHY.
|
||||
@ -74,16 +74,16 @@ static const struct mii_phy_funcs ciphy_funcs = {
|
||||
};
|
||||
|
||||
static const struct mii_phydesc ciphys[] = {
|
||||
MII_PHY_DESC(CICADA, CS8201),
|
||||
MII_PHY_DESC(CICADA, CS8201A),
|
||||
MII_PHY_DESC(CICADA, CS8201B),
|
||||
MII_PHY_DESC(CICADA, CS8204),
|
||||
MII_PHY_DESC(CICADA, VSC8211),
|
||||
MII_PHY_DESC(CICADA, CS8244),
|
||||
MII_PHY_DESC(CICADA, CS8201),
|
||||
MII_PHY_DESC(CICADA, CS8201A),
|
||||
MII_PHY_DESC(xxCICADA, CS8201B),
|
||||
MII_PHY_DESC(VITESSE, VSC8601),
|
||||
MII_PHY_DESC(xxCICADA, CIS8201),
|
||||
MII_PHY_DESC(xxCICADA, CIS8201A),
|
||||
MII_PHY_DESC(xxCICADA, CIS8201B),
|
||||
MII_PHY_DESC(xxCICADA, CIS8204),
|
||||
MII_PHY_DESC(xxCICADA, VSC8211),
|
||||
MII_PHY_DESC(xxCICADA, VSC8221),
|
||||
MII_PHY_DESC(xxCICADA, VSC8234),
|
||||
MII_PHY_DESC(xxCICADA, VSC8244),
|
||||
MII_PHY_DESC(xxVITESSE, VSC8601),
|
||||
MII_PHY_DESC(xxVITESSE, VSC8641),
|
||||
MII_PHY_END,
|
||||
};
|
||||
|
||||
@ -398,8 +398,8 @@ ciphy_fixup(struct mii_softc *sc)
|
||||
}
|
||||
|
||||
switch (model) {
|
||||
case MII_MODEL_CICADA_CS8201:
|
||||
case MII_MODEL_CICADA_CS8204:
|
||||
case MII_MODEL_xxCICADA_CIS8201:
|
||||
case MII_MODEL_xxCICADA_CIS8204:
|
||||
/* Turn off "aux mode" (whatever that means) */
|
||||
PHY_SETBIT(sc, CIPHY_MII_AUXCSR, CIPHY_AUXCSR_MDPPS);
|
||||
|
||||
@ -418,8 +418,8 @@ ciphy_fixup(struct mii_softc *sc)
|
||||
|
||||
break;
|
||||
|
||||
case MII_MODEL_CICADA_CS8201A:
|
||||
case MII_MODEL_CICADA_CS8201B:
|
||||
case MII_MODEL_xxCICADA_CIS8201A:
|
||||
case MII_MODEL_xxCICADA_CIS8201B:
|
||||
/*
|
||||
* Work around speed polling bug in VT3119/VT3216
|
||||
* when using MII in full duplex mode.
|
||||
@ -431,9 +431,12 @@ ciphy_fixup(struct mii_softc *sc)
|
||||
PHY_CLRBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO);
|
||||
|
||||
break;
|
||||
case MII_MODEL_CICADA_VSC8211:
|
||||
case MII_MODEL_CICADA_CS8244:
|
||||
case MII_MODEL_VITESSE_VSC8601:
|
||||
case MII_MODEL_xxCICADA_VSC8211:
|
||||
case MII_MODEL_xxCICADA_VSC8221:
|
||||
case MII_MODEL_xxCICADA_VSC8234:
|
||||
case MII_MODEL_xxCICADA_VSC8244:
|
||||
case MII_MODEL_xxVITESSE_VSC8601:
|
||||
case MII_MODEL_xxVITESSE_VSC8641:
|
||||
break;
|
||||
default:
|
||||
aprint_error_dev(sc->mii_dev, "unknown CICADA PHY model %x\n",
|
||||
|
Loading…
Reference in New Issue
Block a user