Edging ever closer to NetBSD...

This commit is contained in:
Poul-Henning Kamp 2002-04-29 06:48:20 +00:00
parent f3320cac13
commit a295ccc9f0
3 changed files with 11 additions and 12 deletions

View File

@ -222,13 +222,13 @@ mii_phy_update(sc, cmd)
{
struct mii_data *mii = sc->mii_pdata;
if (sc->mii_active != mii->mii_media_active || cmd == MII_MEDIACHG) {
if (sc->mii_media_active != mii->mii_media_active || cmd == MII_MEDIACHG) {
MIIBUS_STATCHG(sc->mii_dev);
sc->mii_active = mii->mii_media_active;
sc->mii_media_active = mii->mii_media_active;
}
if (sc->mii_status != mii->mii_media_status) {
if (sc->mii_media_status != mii->mii_media_status) {
MIIBUS_LINKCHG(sc->mii_dev);
sc->mii_status = mii->mii_media_status;
sc->mii_media_status = mii->mii_media_status;
}
}

View File

@ -45,10 +45,7 @@
#include <sys/queue.h>
/*
* Media Independent Interface autoconfiguration defintions.
*
* This file exports an interface which attempts to be compatible
* with the BSD/OS 3.0 interface.
* Media Independent Interface configuration defintions.
*/
struct mii_softc;
@ -124,9 +121,11 @@ struct mii_softc {
int mii_flags; /* misc. flags; see below */
int mii_capabilities; /* capabilities from BMSR */
int mii_extcapabilities; /* extended capabilities */
int mii_ticks; /* MII_TICK counter */
int mii_active; /* last active media */
int mii_status; /* last active status */
int mii_anegticks; /* ticks before retrying aneg */
int mii_media_active; /* last active media */
int mii_media_status; /* last active status */
};
typedef struct mii_softc mii_softc_t;

View File

@ -375,8 +375,8 @@ mlphy_service(xsc, mii, cmd)
other->mii_inst = sc->mii_inst;
(void) (*other->mii_service)(other, mii, MII_POLLSTAT);
other->mii_inst = other_inst;
sc->mii_active = other->mii_active;
sc->mii_status = other->mii_status;
sc->mii_media_active = other->mii_media_active;
sc->mii_media_status = other->mii_media_status;
} else
ukphy_status(sc);