u_int16_t		bmcr;
int			bmcr;
static void mx_setcfg(sc, bmcr)	struct mx_softc		*sc;	u_int16_t		bmcr;{	int			i, restart = 0;	if (CSR_READ_4(sc, MX_NETCFG) & (MX_NETCFG_TX_ON|MX_NETCFG_RX_ON)) {		restart = 1;		MX_CLRBIT(sc, MX_NETCFG, (MX_NETCFG_TX_ON|MX_NETCFG_RX_ON));		for (i = 0; i < MX_TIMEOUT; i++) {			DELAY(10);			if (CSR_READ_4(sc, MX_ISR) & MX_ISR_TX_IDLE)				break;		}		if (i == MX_TIMEOUT)			printf("mx%d: failed to force tx and "				"rx to idle state\n", sc->mx_unit);	}	if (bmcr & PHY_BMCR_SPEEDSEL) {		MX_CLRBIT(sc, MX_NETCFG, MX_NETCFG_SPEEDSEL);		if (sc->mx_phy_addr == 0) {			MX_SETBIT(sc, MX_NETCFG, MX_NETCFG_PORTSEL|				MX_NETCFG_PCS|MX_NETCFG_SCRAMBLER);		}	} else		MX_SETBIT(sc, MX_NETCFG, MX_NETCFG_SPEEDSEL);	if (bmcr & PHY_BMCR_DUPLEX)		MX_SETBIT(sc, MX_NETCFG, MX_NETCFG_FULLDUPLEX);	else		MX_CLRBIT(sc, MX_NETCFG, MX_NETCFG_FULLDUPLEX);	if (restart)		MX_SETBIT(sc, MX_NETCFG, MX_NETCFG_TX_ON|MX_NETCFG_RX_ON);	return;}