printk(KERN_DEBUG "%s: event = %#x, status = %#x, next = %#x, size = %#x\n", 
printk(KERN_DEBUG "%s: event = %#x, status = %#x, next = %#x, size = %#x\n", 
eepro_rx(struct net_device *dev){	struct eepro_local *lp = netdev_priv(dev);	short ioaddr = dev->base_addr;	short boguscount = 20;	short rcv_car = lp->rx_start;	unsigned rcv_event, rcv_status, rcv_next_frame, rcv_size;	if (net_debug > 5)		printk(KERN_DEBUG "%s: entering eepro_rx routine.\n", dev->name);	/* Set the read pointer to the start of the RCV */	outw(rcv_car, ioaddr + HOST_ADDRESS_REG);	rcv_event = inw(ioaddr + IO_PORT);	while (rcv_event == RCV_DONE) {		rcv_status = inw(ioaddr + IO_PORT);		rcv_next_frame = inw(ioaddr + IO_PORT);		rcv_size = inw(ioaddr + IO_PORT);		if ((rcv_status & (RX_OK | RX_ERROR)) == RX_OK) {			/* Malloc up new buffer. */			struct sk_buff *skb;			lp->stats.rx_bytes+=rcv_size;			rcv_size &= 0x3fff;			skb = dev_alloc_skb(rcv_size+5);			if (skb == NULL) {				printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n", dev->name);				lp->stats.rx_dropped++;				rcv_car = lp->rx_start + RCV_HEADER + rcv_size;				lp->rx_start = rcv_next_frame;				outw(rcv_next_frame, ioaddr + HOST_ADDRESS_REG);				break;			}			skb->dev = dev;			skb_reserve(skb,2);			if (lp->version == LAN595)				insw(ioaddr+IO_PORT, skb_put(skb,rcv_size), (rcv_size + 3) >> 1);			else { /* LAN595TX or LAN595FX, capable of 32-bit I/O processing */				unsigned short temp = inb(ioaddr + INT_MASK_REG);				outb(temp | IO_32_BIT, ioaddr + INT_MASK_REG);				insl(ioaddr+IO_PORT_32_BIT, skb_put(skb,rcv_size),					(rcv_size + 3) >> 2);				outb(temp & ~(IO_32_BIT), ioaddr + INT_MASK_REG);			}			skb->protocol = eth_type_trans(skb,dev);			netif_rx(skb);			dev->last_rx = jiffies;			lp->stats.rx_packets++;		}		else { /* Not sure will ever reach here,			I set the 595 to discard bad received frames */			lp->stats.rx_errors++;			if (rcv_status & 0x0100)				lp->stats.rx_over_errors++;			else if (rcv_status & 0x0400)				lp->stats.rx_frame_errors++;			else if (rcv_status & 0x0800)				lp->stats.rx_crc_errors++;			printk(KERN_DEBUG "%s: event = %#x, status = %#x, next = %#x, size = %#x\n", 				dev->name, rcv_event, rcv_status, rcv_next_frame, rcv_size);		}		if (rcv_status & 0x1000)			lp->stats.rx_length_errors++;		rcv_car = lp->rx_start + RCV_HEADER + rcv_size;		lp->rx_start = rcv_next_frame;		if (--boguscount == 0)			break;		outw(rcv_next_frame, ioaddr + HOST_ADDRESS_REG);		rcv_event = inw(ioaddr + IO_PORT);	}	if (rcv_car == 0)		rcv_car = lp->rcv_upper_limit | 0xff;	outw(rcv_car - 1, ioaddr + RCV_STOP);	if (net_debug > 5)		printk(KERN_DEBUG "%s: exiting eepro_rx routine.\n", dev->name);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d61780c0d384939ef31c46b47442854d5def4623/eepro.c/buggy/drivers/net/eepro.c