kernels/linux-2.4.0/drivers/net/dmfe.c
/*
   Dynamic reset the DM910X board
   Stop DM910X board
   Free Tx/Rx allocated memory
   Reset DM910X board
   Re-initilize DM910X board
 */
Dynamic reset the DM910X board
Stop DM910X board
Free Tx/Rx allocated memory
Reset DM910X board
Re-initilize DM910X board
Dynamic reset the DM910X board Stop DM910X board Free Tx / Rx allocated memory Reset DM910X board Re - initilize DM910X board
static void dmfe_dynamic_reset(struct net_device *dev)
{
	struct dmfe_board_info *db = dev->priv;
	DMFE_DBUG(0, "dmfe_dynamic_reset()", 0);
	db->in_reset_state = 1;
	netif_stop_queue(dev);
	db->cr6_data &= ~(CR6_RXSC | CR6_TXSC);		
	update_cr6(db->cr6_data, dev->base_addr);
	dmfe_free_rxbuffer(db);
	db->tx_packet_cnt = 0;
	db->tx_queue_cnt = 0;
	db->rx_avail_cnt = 0;
	db->link_failed = 0;
	db->wait_reset = 0;
	db->rx_error_cnt = 0;
	dmfe_init_dm910x(dev);
	db->in_reset_state = 0;
	netif_wake_queue(dev);
}
static void dmfe_dynamic_reset ( struct net_device * dev ) { struct dmfe_board_info * db = dev -> priv ; DMFE_DBUG ( 0 , " " , 0 ) ; db -> in_reset_state = 1 ; netif_stop_queue ( dev ) ; db -> cr6_data &= ~ ( CR6_RXSC | CR6_TXSC ) ; update_cr6 ( db -> cr6_data , dev -> base_addr ) ; dmfe_free_rxbuffer ( db ) ; db -> tx_packet_cnt = 0 ; db -> tx_queue_cnt = 0 ; db -> rx_avail_cnt = 0 ; db -> link_failed = 0 ; db -> wait_reset = 0 ; db -> rx_error_cnt = 0 ; dmfe_init_dm910x ( dev ) ; db -> in_reset_state = 0 ; netif_wake_queue ( dev ) ; }
Dynamic reset the DM910X board
Stop DM910X board
Free Tx/Rx allocated memory
Reset DM910X board
Re-initilize DM910X board
Dynamic reset the DM910X board Stop DM910X board Free Tx / Rx allocated memory Reset DM910X board Re - initilize DM910X board
/* Enter dynamic reset route */ /* Disable upper layer interface */ /* Disable Tx/Rx */ /* Free Rx Allocate buffer */ /* system variable init */ /* Re-initilize DM910X board */ /* Leave dynamic reser route */ /* Restart upper layer interface */