/* This function changes the mtu of the device. It restarts the device to initialize the descriptor with new receive buffers.  */
static int amd8111e_change_mtu(struct net_device *dev, int new_mtu)
/* This function changes the mtu of the device. It restarts the device to initialize the descriptor with new receive buffers.  */
static int amd8111e_change_mtu(struct net_device *dev, int new_mtu)
{
	struct amd8111e_priv *lp = netdev_priv(dev);
	int err;
	if ((new_mtu < AMD8111E_MIN_MTU) || (new_mtu > AMD8111E_MAX_MTU))
		return -EINVAL;
	if (!netif_running(dev)) {
		dev->mtu = new_mtu;
		return 0;
	}
	spin_lock_irq(&lp->lock);
	writel(RUN, lp->mmio + CMD0);
	dev->mtu = new_mtu;
	err = amd8111e_restart(dev);
	spin_unlock_irq(&lp->lock);
	if(!err)
		netif_start_queue(dev);
	return err;
}