src/add-ons/kernel/drivers/network/ipro1000/dev/e1000/if_igb.c
/*********************************************************************
 *
 *  This routine disables all traffic on the adapter by issuing a
 *  global reset on the MAC and deallocates TX/RX buffers.
 *
 **********************************************************************/
This routine disables all traffic on the adapter by issuing a
global reset on the MAC and deallocates TX/RX buffers.
This routine disables all traffic on the adapter by issuing a global reset on the MAC and deallocates TX / RX buffers .
static void
igb_stop(void *arg)
{
	struct adapter	*adapter = arg;
	struct ifnet	*ifp = adapter->ifp;
	struct tx_ring *txr = adapter->tx_rings;
	IGB_CORE_LOCK_ASSERT(adapter);
	INIT_DEBUGOUT("igb_stop: begin");
	igb_disable_intr(adapter);
	callout_stop(&adapter->timer);
	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
	ifp->if_drv_flags |= IFF_DRV_OACTIVE;
	for (int i = 0; i < adapter->num_queues; i++, txr++) {
		IGB_TX_LOCK(txr);
		txr->queue_status = IGB_QUEUE_IDLE;
		IGB_TX_UNLOCK(txr);
	}
	e1000_reset_hw(&adapter->hw);
	E1000_WRITE_REG(&adapter->hw, E1000_WUC, 0);
	e1000_led_off(&adapter->hw);
	e1000_cleanup_led(&adapter->hw);
}
static void igb_stop ( void * arg ) { struct adapter * adapter = arg ; struct ifnet * ifp = adapter -> ifp ; struct tx_ring * txr = adapter -> tx_rings ; IGB_CORE_LOCK_ASSERT ( adapter ) ; INIT_DEBUGOUT ( " " ) ; igb_disable_intr ( adapter ) ; callout_stop ( & adapter -> timer ) ; ifp -> if_drv_flags &= ~ IFF_DRV_RUNNING ; ifp -> if_drv_flags |= IFF_DRV_OACTIVE ; for ( int i = 0 ; i < adapter -> num_queues ; i ++ , txr ++ ) { IGB_TX_LOCK ( txr ) ; txr -> queue_status = IGB_QUEUE_IDLE ; IGB_TX_UNLOCK ( txr ) ; } e1000_reset_hw ( & adapter -> hw ) ; E1000_WRITE_REG ( & adapter -> hw , E1000_WUC , 0 ) ; e1000_led_off ( & adapter -> hw ) ; e1000_cleanup_led ( & adapter -> hw ) ; }
This routine disables all traffic on the adapter by issuing a
  global reset on the MAC and deallocates TX/RX buffers.
This routine disables all traffic on the adapter by issuing a global reset on the MAC and deallocates TX / RX buffers .
/* Tell the stack that the interface is no longer active */ /* Disarm watchdog timer. */