writel((u32) (np->ring_addr + RX_RING*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr); 
if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) writel((u32) (np->ring_addr + RX_RING*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr); else writel((u32) (np->ring_addr + RX_RING*sizeof(struct ring_desc_ex)), base + NvRegTxRingPhysAddr); 
static void nv_tx_timeout(struct net_device *dev){	struct fe_priv *np = get_nvpriv(dev);	u8 __iomem *base = get_hwbase(dev);	printk(KERN_INFO "%s: Got tx_timeout. irq: %08x\n", dev->name,			readl(base + NvRegIrqStatus) & NVREG_IRQSTAT_MASK);	{		int i;		printk(KERN_INFO "%s: Ring at %lx: next %d nic %d\n",				dev->name, (unsigned long)np->ring_addr,				np->next_tx, np->nic_tx);		printk(KERN_INFO "%s: Dumping tx registers\n", dev->name);		for (i=0;i<0x400;i+= 32) {			printk(KERN_INFO "%3x: %08x %08x %08x %08x %08x %08x %08x %08x\n",					i,					readl(base + i + 0), readl(base + i + 4),					readl(base + i + 8), readl(base + i + 12),					readl(base + i + 16), readl(base + i + 20),					readl(base + i + 24), readl(base + i + 28));		}		printk(KERN_INFO "%s: Dumping tx ring\n", dev->name);		for (i=0;i<TX_RING;i+= 4) {			printk(KERN_INFO "%03x: %08x %08x // %08x %08x // %08x %08x // %08x %08x\n",					i, 					le32_to_cpu(np->tx_ring[i].PacketBuffer),					le32_to_cpu(np->tx_ring[i].FlagLen),					le32_to_cpu(np->tx_ring[i+1].PacketBuffer),					le32_to_cpu(np->tx_ring[i+1].FlagLen),					le32_to_cpu(np->tx_ring[i+2].PacketBuffer),					le32_to_cpu(np->tx_ring[i+2].FlagLen),					le32_to_cpu(np->tx_ring[i+3].PacketBuffer),					le32_to_cpu(np->tx_ring[i+3].FlagLen));		}	}	spin_lock_irq(&np->lock);	/* 1) stop tx engine */	nv_stop_tx(dev);	/* 2) check that the packets were not sent already: */	nv_tx_done(dev);	/* 3) if there are dead entries: clear everything */	if (np->next_tx != np->nic_tx) {		printk(KERN_DEBUG "%s: tx_timeout: dead entries!\n", dev->name);		nv_drain_tx(dev);		np->next_tx = np->nic_tx = 0;		writel((u32) (np->ring_addr + RX_RING*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr);		netif_wake_queue(dev);	}	/* 4) restart tx engine */	nv_start_tx(dev);	spin_unlock_irq(&np->lock);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ee73362cdd7d9b8166424f5f9e3176c629ac5cb2/forcedeth.c/clean/drivers/net/forcedeth.c