Re: [patch] 2.3.39: Don't use bounce buffer when not needed (parport)

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Tue Jan 18 2000 - 10:47:44 EST


> + size_t maxlen = 0x10000; /* max 64k per DMA transfer */
>
> + /* above 16 MB we use a bounce buffer as ISA-DMA is not possible */
> + if (buf+length <= MAX_DMA_ADDRESS)
> + dma_addr = virt_to_bus(buf);
> + else {
> + dma_addr = virt_to_bus(priv->dma_buf);
> + maxlen = PAGE_SIZE; /* sizeof(priv->dma_buf) */
> + }

You are missing a test here. You also have to check if the start and end
of the block are in the same 64K range (the PC DMA controller doesnt increment
the top byte on a wrap)

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:18 EST