printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", dev->name); 
if (netif_msg_drv(tp)) { printk(KERN_ERR "%s: BUG! Tx Ring full when queue awake!\n", dev->name); } 
static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev){	struct rtl8169_private *tp = netdev_priv(dev);	unsigned int frags, entry = tp->cur_tx % NUM_TX_DESC;	struct TxDesc *txd = tp->TxDescArray + entry;	void __iomem *ioaddr = tp->mmio_addr;	dma_addr_t mapping;	u32 status, len;	u32 opts1;	int ret = 0;		if (unlikely(TX_BUFFS_AVAIL(tp) < skb_shinfo(skb)->nr_frags)) {		printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",		       dev->name);		goto err_stop;	}	if (unlikely(le32_to_cpu(txd->opts1) & DescOwn))		goto err_stop;	opts1 = DescOwn | rtl8169_tso_csum(skb, dev);	frags = rtl8169_xmit_frags(tp, skb, opts1);	if (frags) {		len = skb_headlen(skb);		opts1 |= FirstFrag;	} else {		len = skb->len;		if (unlikely(len < ETH_ZLEN)) {			skb = skb_padto(skb, ETH_ZLEN);			if (!skb)				goto err_update_stats;			len = ETH_ZLEN;		}		opts1 |= FirstFrag | LastFrag;		tp->tx_skb[entry].skb = skb;	}	mapping = pci_map_single(tp->pci_dev, skb->data, len, PCI_DMA_TODEVICE);	tp->tx_skb[entry].len = len;	txd->addr = cpu_to_le64(mapping);	txd->opts2 = cpu_to_le32(rtl8169_tx_vlan_tag(tp, skb));	wmb();	/* anti gcc 2.95.3 bugware (sic) */	status = opts1 | len | (RingEnd * !((entry + 1) % NUM_TX_DESC));	txd->opts1 = cpu_to_le32(status);	dev->trans_start = jiffies;	tp->cur_tx += frags + 1;	smp_wmb();	RTL_W8(TxPoll, 0x40);	/* set polling bit */	if (TX_BUFFS_AVAIL(tp) < MAX_SKB_FRAGS) {		netif_stop_queue(dev);		smp_rmb();		if (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)			netif_wake_queue(dev);	}out:	return ret;err_stop:	netif_stop_queue(dev);	ret = 1;err_update_stats:	tp->stats.tx_dropped++;	goto out;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b57b7e5a11c4e45565cf34d786d74ad35483fe83/r8169.c/clean/drivers/net/r8169.c