/* 
/* 
static void sbdma_tx_process(struct sbmac_softc *sc,sbmacdma_t *d){	int curidx;	int hwidx;	sbdmadscr_t *dsc;	struct sk_buff *sb;	unsigned long flags;	spin_lock_irqsave(&(sc->sbm_lock), flags);		for (;;) {		/* 		 * figure out where we are (as an index) and where		 * the hardware is (also as an index)		 *		 * This could be done faster if (for example) the 		 * descriptor table was page-aligned and contiguous in		 * both virtual and physical memory -- you could then		 * just compare the low-order bits of the virtual address		 * (sbdma_remptr) and the physical address (sbdma_curdscr CSR)		 */				curidx = d->sbdma_remptr - d->sbdma_dscrtable;		hwidx = (int) (((__raw_readq(d->sbdma_curdscr) & M_DMA_CURDSCR_ADDR) -				d->sbdma_dscrtable_phys) / sizeof(sbdmadscr_t));		/*		 * If they're the same, that means we've processed all		 * of the descriptors up to (but not including) the one that		 * the hardware is working on right now.		 */				if (curidx == hwidx)			break;				/*		 * Otherwise, get the packet's sk_buff ptr back		 */				dsc = &(d->sbdma_dscrtable[curidx]);		sb = d->sbdma_ctxtable[curidx];		d->sbdma_ctxtable[curidx] = NULL;				/*		 * Stats		 */				sc->sbm_stats.tx_bytes += sb->len;		sc->sbm_stats.tx_packets++;				/*		 * for transmits, we just free buffers.		 */				dev_kfree_skb_irq(sb);				/* 		 * .. and advance to the next buffer.		 */		d->sbdma_remptr = SBDMA_NEXTBUF(d,sbdma_remptr);			}		/*	 * Decide if we should wake up the protocol or not.	 * Other drivers seem to do this when we reach a low	 * watermark on the transmit queue.	 */		netif_wake_queue(d->sbdma_eth->sbm_dev);		spin_unlock_irqrestore(&(sc->sbm_lock), flags);	}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/74b0247fbd4b6ed1693a420d85cf50267d840ef4/sb1250-mac.c/buggy/drivers/net/sb1250-mac.c