kernels/linux-2.4.0/drivers/net/irda/smc-ircc.c
/*
 * Function ircc_dma_receive (self)
 *
 *    Get ready for receiving a frame. The device will initiate a DMA
 *    if it starts to receive a frame.
 *
 */
Function ircc_dma_receive (self)
Get ready for receiving a frame. The device will initiate a DMA
if it starts to receive a frame.
Function ircc_dma_receive ( self ) Get ready for receiving a frame . The device will initiate a DMA if it starts to receive a frame .
static int ircc_dma_receive(struct ircc_cb *self, int iobase) 
{	
	setup_dma(self->io.dma, self->rx_buff.data, self->rx_buff.truesize, 
		  DMA_RX_MODE);
	register_bank(iobase, 4);
	outb((2050 >> 8) & 0x0f, iobase+IRCC_RX_SIZE_HI);
	outb(2050 & 0xff, iobase+IRCC_RX_SIZE_LO);
	self->io.direction = IO_RECV;
	self->rx_buff.data = self->rx_buff.head;
	register_bank(iobase, 0);
	outb(IRCC_LCR_B_SCE_RECEIVE | IRCC_LCR_B_SIP_ENABLE, 
	     iobase+IRCC_LCR_B);
	register_bank(iobase, 1);
	outb(inb(iobase+IRCC_SCE_CFGB) | IRCC_CFGB_DMA_ENABLE | 
	     IRCC_CFGB_DMA_BURST, iobase+IRCC_SCE_CFGB);
	return 0;
}
static int ircc_dma_receive ( struct ircc_cb * self , int iobase ) { setup_dma ( self -> io . dma , self -> rx_buff . data , self -> rx_buff . truesize , DMA_RX_MODE ) ; register_bank ( iobase , 4 ) ; outb ( ( 2050 >> 8 ) & 0x0f , iobase + IRCC_RX_SIZE_HI ) ; outb ( 2050 & 0xff , iobase + IRCC_RX_SIZE_LO ) ; self -> io . direction = IO_RECV ; self -> rx_buff . data = self -> rx_buff . head ; register_bank ( iobase , 0 ) ; outb ( IRCC_LCR_B_SCE_RECEIVE | IRCC_LCR_B_SIP_ENABLE , iobase + IRCC_LCR_B ) ; register_bank ( iobase , 1 ) ; outb ( inb ( iobase + IRCC_SCE_CFGB ) | IRCC_CFGB_DMA_ENABLE | IRCC_CFGB_DMA_BURST , iobase + IRCC_SCE_CFGB ) ; return 0 ; }
Function ircc_dma_receive (self)
    Get ready for receiving a frame.
Function ircc_dma_receive ( self ) Get ready for receiving a frame .
/* Turn off chip DMA */ //register_bank(iobase, 1); //outb(inb(iobase+IRCC_SCE_CFGB) & ~IRCC_CFGB_DMA_ENABLE,  //     iobase+IRCC_SCE_CFGB); /* Set max Rx frame size */ /* Setup DMA controller */ /* Enable receiver */ /* Enable burst mode chip Rx DMA */