printk(KERN_ERR "%s: Invalid MTU setting\n", dev->name); 
if (netif_msg_drv(priv)) printk(KERN_ERR "%s: Invalid MTU setting\n", dev->name); 
static int gfar_change_mtu(struct net_device *dev, int new_mtu){	int tempsize, tempval;	struct gfar_private *priv = netdev_priv(dev);	int oldsize = priv->rx_buffer_size;	int frame_size = new_mtu + 18;	if ((frame_size < 64) || (frame_size > JUMBO_FRAME_SIZE)) {		printk(KERN_ERR "%s: Invalid MTU setting\n", dev->name);		return -EINVAL;	}	tempsize =	    (frame_size & ~(INCREMENTAL_BUFFER_SIZE - 1)) +	    INCREMENTAL_BUFFER_SIZE;	/* Only stop and start the controller if it isn't already	 * stopped */	if ((oldsize != tempsize) && (dev->flags & IFF_UP))		stop_gfar(dev);	priv->rx_buffer_size = tempsize;	dev->mtu = new_mtu;	gfar_write(&priv->regs->mrblr, priv->rx_buffer_size);	gfar_write(&priv->regs->maxfrm, priv->rx_buffer_size);	/* If the mtu is larger than the max size for standard	 * ethernet frames (ie, a jumbo frame), then set maccfg2	 * to allow huge frames, and to check the length */	tempval = gfar_read(&priv->regs->maccfg2);	if (priv->rx_buffer_size > DEFAULT_RX_BUFFER_SIZE)		tempval |= (MACCFG2_HUGEFRAME | MACCFG2_LENGTHCHECK);	else		tempval &= ~(MACCFG2_HUGEFRAME | MACCFG2_LENGTHCHECK);	gfar_write(&priv->regs->maccfg2, tempval);	if ((oldsize != tempsize) && (dev->flags & IFF_UP))		startup_gfar(dev);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0bbaf069f053957e8d733784e18a2992afd1dd3c/gianfar.c/buggy/drivers/net/gianfar.c