Re: [PATCH] libata: eliminate the home grown dma padding in favour of that provided by the block layer

Tejun Heo
2008-01-09T05:14:24Z

James Bottomley wrote:
>> Also, DMA alignment at
>> block layer isn't enough for ATA. ATA needs drain buffers for ATAPI
>> commands with variable length response. :-(
>
> OK, where is this in the libata code? The dma_pad size is only 4 bytes,
> so this drain, I assume is only a word long? Given the word alignment
> requirements of ATA doesn't this still mean it's only draining up to the
> word boundary anyway (so the code is still correct)?

Patch is acked but not merged yet.

http://git.kernel.org/?p=linux/kernel/git/tj/libata-dev.git;a=commit;h=6cd22a0febc74bebe52d58eb22271b8770892a2d

The full function can be read from the following. It's
ata_sg_setup_extra().

http://git.kernel.org/?p=linux/kernel/git/tj/libata-dev.git;a=blob;f=drivers/ata/libata-core.c;h=d763c072e6cefc724ea24cb68a7adf47b340f054;hb=6cd22a0febc74bebe52d58eb22271b8770892a2d

--
tejun