unsigned long buf = (unsigned long)d->dma.kvirt + n * d->buf_size; 
unsigned long buf = (unsigned long)d->dma.kvirt; 
static void initialize_dma_it_prg(struct dma_iso_ctx *d, int n, int sync_tag){	struct it_dma_prg *it_prg = d->it_prg[n];	struct dma_prog_region *it_reg = &d->prg_reg[n];	unsigned long buf = (unsigned long)d->dma.kvirt + n * d->buf_size;	int i;	d->last_used_cmd[n] = d->nb_cmd - 1;	for (i=0;i<d->nb_cmd;i++) {		it_prg[i].begin.control = cpu_to_le32(DMA_CTL_OUTPUT_MORE |			DMA_CTL_IMMEDIATE | 8) ;		it_prg[i].begin.address = 0;		it_prg[i].begin.status = 0;		it_prg[i].data[0] = cpu_to_le32(			(IEEE1394_SPEED_100 << 16)			| (/* tag */ 1 << 14)			| (d->channel << 8)			| (TCODE_ISO_DATA << 4));		if (i==0) it_prg[i].data[0] |= cpu_to_le32(sync_tag);		it_prg[i].data[1] = cpu_to_le32(d->packet_size << 16);		it_prg[i].data[2] = 0;		it_prg[i].data[3] = 0;		it_prg[i].end.control = cpu_to_le32(DMA_CTL_OUTPUT_LAST |			    	    	     DMA_CTL_BRANCH);		it_prg[i].end.address =			cpu_to_le32(dma_region_offset_to_bus(&d->dma, (buf+i*d->packet_size) -						(unsigned long)d->dma.kvirt));		if (i<d->nb_cmd-1) {			it_prg[i].end.control |= cpu_to_le32(d->packet_size);			it_prg[i].begin.branchAddress =				cpu_to_le32((dma_prog_region_offset_to_bus(it_reg, (i + 1) *					sizeof(struct it_dma_prg)) & 0xfffffff0) | 0x3);			it_prg[i].end.branchAddress =				cpu_to_le32((dma_prog_region_offset_to_bus(it_reg, (i + 1) *					sizeof(struct it_dma_prg)) & 0xfffffff0) | 0x3);		} else {			/* the last prg generates an interrupt */			it_prg[i].end.control |= cpu_to_le32(DMA_CTL_UPDATE |				DMA_CTL_IRQ | d->left_size);			/* the last prg doesn't branch */			it_prg[i].begin.branchAddress = 0;			it_prg[i].end.branchAddress = 0;		}		it_prg[i].end.status = 0;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/8d98c5cd41d1932bb76a3945b4e8dea889224d87/video1394.c/buggy/drivers/ieee1394/video1394.c