/* called as task when tx hangs, resets interface (if interface is up)  */
static void spider_net_tx_timeout_task(struct work_struct *work)
/* called as task when tx hangs, resets interface (if interface is up)  */
static void spider_net_tx_timeout_task(struct work_struct *work)
{
	struct spider_net_card *card =
		container_of(work, struct spider_net_card, tx_timeout_task);
	struct net_device *netdev = card->netdev;
	if (!(netdev->flags & IFF_UP))
		goto out;
	netif_device_detach(netdev);
	spider_net_stop(netdev);
	spider_net_workaround_rxramfull(card);
	spider_net_init_card(card);
	if (spider_net_setup_phy(card))
		goto out;
	spider_net_open(netdev);
	spider_net_kick_tx_dma(card);
	netif_device_attach(netdev);
out:
	atomic_dec(&card->tx_timeout_task_counter);
}