d->sbdma_dscrcnt = 
d->sbdma_dscrcnt = 
static void sbdma_initctx(sbmacdma_t *d,			  struct sbmac_softc *s,			  int chan,			  int txrx,			  int maxdescr){	/* 	 * Save away interesting stuff in the structure 	 */		d->sbdma_eth       = s;	d->sbdma_channel   = chan;	d->sbdma_txdir     = txrx;	#if 0	/* RMON clearing */	s->sbe_idx =(s->sbm_base - A_MAC_BASE_0)/MAC_SPACING;#endif	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_TX_BYTES)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_COLLISIONS)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_LATE_COL)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_EX_COL)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_FCS_ERROR)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_TX_ABORT)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_TX_BAD)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_TX_GOOD)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_TX_RUNT)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_TX_OVERSIZE)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_BYTES)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_MCAST)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_BCAST)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_BAD)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_GOOD)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_RUNT)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_OVERSIZE)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_FCS_ERROR)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_LENGTH_ERROR)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_CODE_ERROR)));	__raw_writeq(0, IOADDR(A_MAC_REGISTER(s->sbe_idx, R_MAC_RMON_RX_ALIGN_ERROR)));	/* 	 * initialize register pointers 	 */		d->sbdma_config0 = 		s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_CONFIG0);	d->sbdma_config1 = 		s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_CONFIG1);	d->sbdma_dscrbase = 		s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_DSCR_BASE);	d->sbdma_dscrcnt = 		s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_DSCR_CNT);	d->sbdma_curdscr = 			s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_CUR_DSCRADDR);		/*	 * Allocate memory for the ring	 */		d->sbdma_maxdescr = maxdescr;		d->sbdma_dscrtable = (sbdmadscr_t *) 		kmalloc((d->sbdma_maxdescr+1)*sizeof(sbdmadscr_t), GFP_KERNEL);	/*	 * The descriptor table must be aligned to at least 16 bytes or the	 * MAC will corrupt it.	 */	d->sbdma_dscrtable = (sbdmadscr_t *)		ALIGN((unsigned long)d->sbdma_dscrtable, sizeof(sbdmadscr_t));		memset(d->sbdma_dscrtable,0,d->sbdma_maxdescr*sizeof(sbdmadscr_t));		d->sbdma_dscrtable_end = d->sbdma_dscrtable + d->sbdma_maxdescr;		d->sbdma_dscrtable_phys = virt_to_phys(d->sbdma_dscrtable);		/*	 * And context table	 */		d->sbdma_ctxtable = (struct sk_buff **) 		kmalloc(d->sbdma_maxdescr*sizeof(struct sk_buff *), GFP_KERNEL);		memset(d->sbdma_ctxtable,0,d->sbdma_maxdescr*sizeof(struct sk_buff *));	#ifdef CONFIG_SBMAC_COALESCE	/*	 * Setup Rx/Tx DMA coalescing defaults	 */	if ( int_pktcnt ) {		d->sbdma_int_pktcnt = int_pktcnt;	} else {		d->sbdma_int_pktcnt = 1;	}		if ( int_timeout ) {		d->sbdma_int_timeout = int_timeout;	} else {		d->sbdma_int_timeout = 0;	}#endif}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/74b0247fbd4b6ed1693a420d85cf50267d840ef4/sb1250-mac.c/buggy/drivers/net/sb1250-mac.c