kernels/linux-2.4.0/drivers/ieee1394/ohci1394.c
/* Put the buffer back into the dma context */
Put the buffer back into the dma context
Put the buffer back into the dma context
static void insert_dma_buffer(struct dma_rcv_ctx *d, int idx)
{
	struct ti_ohci *ohci = (struct ti_ohci*)(d->ohci);
	DBGMSG(ohci->id, "Inserting dma buf ctx=%d idx=%d", d->ctx, idx);
	d->prg_cpu[idx]->status = d->buf_size;
	d->prg_cpu[idx]->branchAddress &= 0xfffffff0;
	idx = (idx + d->num_desc - 1 ) % d->num_desc;
	d->prg_cpu[idx]->branchAddress |= 0x1;
	if (!(reg_read(ohci, d->ctrlSet) & 0x400)) {
		PRINT(KERN_INFO, ohci->id, 
		      "Waking dma cxt=%d ... processing is probably too slow",
		      d->ctx);
		reg_write(ohci, d->ctrlSet, 0x1000);
	}
}
static void insert_dma_buffer ( struct dma_rcv_ctx * d , int idx ) { struct ti_ohci * ohci = ( struct ti_ohci * ) ( d -> ohci ) ; DBGMSG ( ohci -> id , " " , d -> ctx , idx ) ; d -> prg_cpu [ idx ] -> status = d -> buf_size ; d -> prg_cpu [ idx ] -> branchAddress &= 0xfffffff0 ; idx = ( idx + d -> num_desc - 1 ) % d -> num_desc ; d -> prg_cpu [ idx ] -> branchAddress |= 0x1 ; if ( ! ( reg_read ( ohci , d -> ctrlSet ) & 0x400 ) ) { PRINT ( KERN_INFO , ohci -> id , " " , d -> ctx ) ; reg_write ( ohci , d -> ctrlSet , 0x1000 ) ; } }
Put the buffer back into the dma context
Put the buffer back into the dma context
/* wake up the dma context if necessary */