lp->init_block.tlen_rlen = le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS); 
lp->init_block.tlen_rlen = le16_to_cpu(lp->tx_len_bits | lp->rx_len_bits); 
pcnet32_init_ring(struct net_device *dev){    struct pcnet32_private *lp = dev->priv;    int i;    lp->tx_full = 0;    lp->cur_rx = lp->cur_tx = 0;    lp->dirty_rx = lp->dirty_tx = 0;    for (i = 0; i < RX_RING_SIZE; i++) {	struct sk_buff *rx_skbuff = lp->rx_skbuff[i];	if (rx_skbuff == NULL) {	    if (!(rx_skbuff = lp->rx_skbuff[i] = dev_alloc_skb (PKT_BUF_SZ))) {		/* there is not much, we can do at this point */		if (pcnet32_debug & NETIF_MSG_DRV)		    printk(KERN_ERR "%s: pcnet32_init_ring dev_alloc_skb failed.\n",			    dev->name);		return -1;	    }	    skb_reserve (rx_skbuff, 2);	}	rmb();	if (lp->rx_dma_addr[i] == 0)	    lp->rx_dma_addr[i] = pci_map_single(lp->pci_dev, rx_skbuff->data,		    PKT_BUF_SZ-2, PCI_DMA_FROMDEVICE);	lp->rx_ring[i].base = (u32)le32_to_cpu(lp->rx_dma_addr[i]);	lp->rx_ring[i].buf_length = le16_to_cpu(2-PKT_BUF_SZ);	wmb();	/* Make sure owner changes after all others are visible */	lp->rx_ring[i].status = le16_to_cpu(0x8000);    }    /* The Tx buffer address is filled in as needed, but we do need to clear     * the upper ownership bit. */    for (i = 0; i < TX_RING_SIZE; i++) {	lp->tx_ring[i].status = 0;	/* CPU owns buffer */	wmb();	/* Make sure adapter sees owner change */	lp->tx_ring[i].base = 0;	lp->tx_dma_addr[i] = 0;    }    lp->init_block.tlen_rlen = le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS);    for (i = 0; i < 6; i++)	lp->init_block.phys_addr[i] = dev->dev_addr[i];    lp->init_block.rx_ring = (u32)le32_to_cpu(lp->dma_addr +	    offsetof(struct pcnet32_private, rx_ring));    lp->init_block.tx_ring = (u32)le32_to_cpu(lp->dma_addr +	    offsetof(struct pcnet32_private, tx_ring));    wmb();	/* Make sure all changes are visible */    return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/eabf04151682bc7b57c84fea58cf9e4e5a3cf2a9/pcnet32.c/buggy/drivers/net/pcnet32.c