Use mii_phy_add_media()/mii_phy_setmedia()-compatible media table

indices when manually adding media. Some of these I've missed while
converting drivers to take advantage of said fuctions recently,
others where longstanding bugs.
This commit is contained in:
marius 2007-01-12 22:27:46 +00:00
parent f96ba0731c
commit bbbb7ec1ef
6 changed files with 7 additions and 7 deletions

View File

@ -120,7 +120,7 @@ amphy_attach(device_t dev)
#if 0
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst),
BMCR_LOOP|BMCR_S100);
MII_MEDIA_100_TX);
#endif
mii_phy_reset(sc);

View File

@ -185,7 +185,7 @@ exphy_attach(device_t dev)
#endif
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst),
BMCR_LOOP|BMCR_S100);
MII_MEDIA_100_TX);
exphy_reset(sc);

View File

@ -115,7 +115,7 @@ inphy_attach(device_t dev)
ifmedia_add(&mii->mii_media,
IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst),
BMCR_LOOP|BMCR_S100, NULL);
MII_MEDIA_100_TX, NULL);
mii_phy_reset(sc);

View File

@ -161,10 +161,10 @@ lxtphy_attach(device_t dev)
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst),
BMCR_S100);
MII_MEDIA_100_TX);
printf("100baseFX, ");
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst),
BMCR_S100|BMCR_FDX);
MII_MEDIA_100_TX_FDX);
printf("100baseFX-FDX, ");
#undef ADD

View File

@ -178,7 +178,7 @@ nsphy_attach(device_t dev)
if (strcmp(nic, "pcn") != 0)
#if 1
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP,
sc->mii_inst), BMCR_LOOP|BMCR_S100);
sc->mii_inst), MII_MEDIA_100_TX);
#else
if (strcmp(nic, "pcn") == 0)
sc->mii_flags |= MIIF_NOLOOP;

View File

@ -153,7 +153,7 @@ rlphy_attach(device_t dev)
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst),
BMCR_LOOP|BMCR_S100);
MII_MEDIA_100_TX);
mii_phy_reset(sc);