! (inw(ioaddr + Wn7_MasterStatus) & 0x8000)) { 
! (ioread16(ioaddr + Wn7_MasterStatus) & 0x8000)) { 
static int vortex_rx(struct net_device *dev){	struct vortex_private *vp = netdev_priv(dev);	long ioaddr = dev->base_addr;	int i;	short rx_status;	if (vortex_debug > 5)		printk(KERN_DEBUG "vortex_rx(): status %4.4x, rx_status %4.4x.\n",			   inw(ioaddr+EL3_STATUS), inw(ioaddr+RxStatus));	while ((rx_status = inw(ioaddr + RxStatus)) > 0) {		if (rx_status & 0x4000) { /* Error, update stats. */			unsigned char rx_error = inb(ioaddr + RxErrors);			if (vortex_debug > 2)				printk(KERN_DEBUG " Rx error: status %2.2x.\n", rx_error);			vp->stats.rx_errors++;			if (rx_error & 0x01)  vp->stats.rx_over_errors++;			if (rx_error & 0x02)  vp->stats.rx_length_errors++;			if (rx_error & 0x04)  vp->stats.rx_frame_errors++;			if (rx_error & 0x08)  vp->stats.rx_crc_errors++;			if (rx_error & 0x10)  vp->stats.rx_length_errors++;		} else {			/* The packet length: up to 4.5K!. */			int pkt_len = rx_status & 0x1fff;			struct sk_buff *skb;			skb = dev_alloc_skb(pkt_len + 5);			if (vortex_debug > 4)				printk(KERN_DEBUG "Receiving packet size %d status %4.4x.\n",					   pkt_len, rx_status);			if (skb != NULL) {				skb->dev = dev;				skb_reserve(skb, 2);	/* Align IP on 16 byte boundaries */				/* 'skb_put()' points to the start of sk_buff data area. */				if (vp->bus_master &&					! (inw(ioaddr + Wn7_MasterStatus) & 0x8000)) {					dma_addr_t dma = pci_map_single(VORTEX_PCI(vp), skb_put(skb, pkt_len),									   pkt_len, PCI_DMA_FROMDEVICE);					outl(dma, ioaddr + Wn7_MasterAddr);					outw((skb->len + 3) & ~3, ioaddr + Wn7_MasterLen);					outw(StartDMAUp, ioaddr + EL3_CMD);					while (inw(ioaddr + Wn7_MasterStatus) & 0x8000)						;					pci_unmap_single(VORTEX_PCI(vp), dma, pkt_len, PCI_DMA_FROMDEVICE);				} else {					insl(ioaddr + RX_FIFO, skb_put(skb, pkt_len),						 (pkt_len + 3) >> 2);				}				outw(RxDiscard, ioaddr + EL3_CMD); /* Pop top Rx packet. */				skb->protocol = eth_type_trans(skb, dev);				netif_rx(skb);				dev->last_rx = jiffies;				vp->stats.rx_packets++;				/* Wait a limited time to go to next packet. */				for (i = 200; i >= 0; i--)					if ( ! (inw(ioaddr + EL3_STATUS) & CmdInProgress))						break;				continue;			} else if (vortex_debug > 0)				printk(KERN_NOTICE "%s: No memory to allocate a sk_buff of "					   "size %d.\n", dev->name, pkt_len);		}		vp->stats.rx_dropped++;		issue_and_wait(dev, RxDiscard);	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/62afe595de7aaac6c140103a34dc8c208afa34e7/3c59x.c/buggy/drivers/net/3c59x.c