/* Auto configure the media here rather than setting the port at compile time. This routine is called by de4x5_init() and when a loss of media is detected (excessive collisions, loss of carrier, no carrier or link fail  or no recent receive activity) to check whether the user has been sneaky and changed the port on us.  */
static int autoconf_media(struct net_device *dev)
/* Auto configure the media here rather than setting the port at compile time. This routine is called by de4x5_init() and when a loss of media is detected (excessive collisions, loss of carrier, no carrier or link fail  or no recent receive activity) to check whether the user has been sneaky and changed the port on us.  */
static int autoconf_media(struct net_device *dev)
{
	struct de4x5_private *lp = netdev_priv(dev);
	u_long iobase = dev->base_addr;
	disable_ast(dev);
	lp->c_media = AUTO;
	inl(DE4X5_MFC);
	lp->media = INIT;
	lp->tcount = 0;
	de4x5_ast(dev);
	return lp->media;
}