/* This is nasty, to use the MISR command you have to wait for 6 memory locations to be zero. This is the way the driver does on other OS'es so we should be ok with the empty loop.  */
static void xl_wait_misr_flags(struct net_device *dev)
/* This is nasty, to use the MISR command you have to wait for 6 memory locations to be zero. This is the way the driver does on other OS'es so we should be ok with the empty loop.  */
static void xl_wait_misr_flags(struct net_device *dev)
{
	struct xl_private *xl_priv = netdev_priv(dev);
	u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
	int i  ; 
	writel(MMIO_BYTE_READ | MISR_RW, xl_mmio + MMIO_MAC_ACCESS_CMD) ; 
	if (readb(xl_mmio + MMIO_MACDATA) != 0) {
		for (i=0; i<6; i++) { 
			writel(MEM_BYTE_READ | 0xDFFE0 | i, xl_mmio + MMIO_MAC_ACCESS_CMD) ; 
			while (readb(xl_mmio + MMIO_MACDATA) != 0 ) {} ;
		} 
	}
	writel(MMIO_BYTE_WRITE | MISR_AND, xl_mmio + MMIO_MAC_ACCESS_CMD) ; 
	writeb(0x80, xl_mmio + MMIO_MACDATA) ; 
	return ; 
}