FreeBSD/sys/dev/sn/if_sn.c
/* 1. zero the interrupt mask
 * 2. clear the enable receive flag
 * 3. clear the enable xmit flags
 */
1. zero the interrupt mask
2. clear the enable receive flag
3. clear the enable xmit flags
1 . zero the interrupt mask 2 . clear the enable receive flag 3 . clear the enable xmit flags
static void
snstop(struct sn_softc *sc)
{
	struct ifnet   *ifp = sc->ifp;
	SMC_SELECT_BANK(sc, 2);
	CSR_WRITE_1(sc, INTR_MASK_REG_B, 0x00);
	SMC_SELECT_BANK(sc, 0);
	CSR_WRITE_2(sc, RECV_CONTROL_REG_W, 0x0000);
	CSR_WRITE_2(sc, TXMIT_CONTROL_REG_W, 0x0000);
	sc->timer = 0;
	callout_stop(&sc->watchdog);
	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
}
static void snstop ( struct sn_softc * sc ) { struct ifnet * ifp = sc -> ifp ; SMC_SELECT_BANK ( sc , 2 ) ; CSR_WRITE_1 ( sc , INTR_MASK_REG_B , 0x00 ) ; SMC_SELECT_BANK ( sc , 0 ) ; CSR_WRITE_2 ( sc , RECV_CONTROL_REG_W , 0x0000 ) ; CSR_WRITE_2 ( sc , TXMIT_CONTROL_REG_W , 0x0000 ) ; sc -> timer = 0 ; callout_stop ( & sc -> watchdog ) ; ifp -> if_drv_flags &= ~ ( IFF_DRV_RUNNING | IFF_DRV_OACTIVE ) ; }
1. zero the interrupt mask
 2. clear the enable receive flag
 3. clear the enable xmit flags
1 . zero the interrupt mask 2 . clear the enable receive flag 3 . clear the enable xmit flags
/*
	 * Clear interrupt mask; disable all interrupts.
	 */ /*
	 * Disable transmitter and Receiver
	 */ /*
	 * Cancel watchdog.
	 */