switch (IFM_SUBTYPE(ife->ifm_media)) { mii_phy_setmedia(sc);
mii_phy_setmedia(sc);
txphy_service(sc, mii, cmd)	struct mii_softc *sc;	struct mii_data *mii;	int cmd;{	struct ifmedia_entry *ife = mii->mii_media.ifm_cur;	if ((sc->mii_dev.dv_flags & DVF_ACTIVE) == 0)		return (ENXIO);	/*	 * Can't isolate the RTL8139 phy, so it has to be the only one.	 */	if (IFM_INST(ife->ifm_media) != sc->mii_inst)		panic("txphy_service: attempt to isolate phy");	switch (cmd) {	case MII_POLLSTAT:		break;	case MII_MEDIACHG:		/*		 * If the interface is not up, don't do anything.		 */		if ((mii->mii_ifp->if_flags & IFF_UP) == 0)			break;		switch (IFM_SUBTYPE(ife->ifm_media)) {		  mii_phy_setmedia(sc);		break;	case MII_TICK:		if (mii_phy_tick(sc) == EJUSTRETURN)			return (0);		break;	case MII_DOWN:		mii_phy_down(sc);		return (0);	}	/* Update the media status. */	mii_phy_status(sc);	/* Callback if something changed. */	mii_phy_update(sc, cmd);	return (0);}