Re: "Fix ATAPI transfer lengths" causes CD writing regression

Jeff Garzik
2007-11-01T11:09:51Z

Alan Cox wrote:
>> demonstrated by (a) Alan's patch did not change DMA lbam/lbah
>> programming and (b) Daniel's report of the message "ata2.00: 66 bytes
>
> (a) did. Well the original did, dunno about your version.

We are both half-right. I reverted my version of that completely,
applied your version verbatim, and pushed it upstream. The result:
atapi_xlat _did_ start programming lbam/lbah for DMA (another behavior
change), but request-sense DMA path was not changed to program lba[mh]
for DMA.

>> I am not drawing any conclusions yet, but I'm thinking that blimit=8k
>> may be a better choice for SATA ATAPI.
>
> Only if your transfer is actually 8K or more.

No, that's precisely the problem cause for what Daniel is reporting. We
are setting blimit=xfer_len(==10), when the device wants to return more
than 10 bytes. When set to the old limit (8k), the problem didn't occur.

Prior to this change, __atapi_pio_bytes() happily discarded trailing
data, so the software already knows how to eat trailing data left to us
by the ATAPI device. The printk (and lack of problem) indicated that
this code was active and working fine.

Jeff