/* This routine should set everything up anew at each open, even registers that "should" only need to be set once at boot, so that there is non-reboot way to recover if something goes wrong.  */
static int tc35815_open(struct net_device *dev)
/* This routine should set everything up anew at each open, even registers that "should" only need to be set once at boot, so that there is non-reboot way to recover if something goes wrong.  */
static int tc35815_open(struct net_device *dev)
{
	struct tc35815_local *lp = netdev_priv(dev);
	if (request_irq(dev->irq, tc35815_interrupt, IRQF_SHARED,
			dev->name, dev))
		return -EAGAIN;
	tc35815_chip_reset(dev);
	if (tc35815_init_queues(dev) != 0) {
		free_irq(dev->irq, dev);
		return -EAGAIN;
	}
	napi_enable(&lp->napi);
	spin_lock_irq(&lp->lock);
	tc35815_chip_init(dev);
	spin_unlock_irq(&lp->lock);
	netif_carrier_off(dev);
	phy_start(lp->phy_dev);
	netif_start_queue(dev);
	return 0;
}