Hello. On 09/06/2011 09:23 PM, Sergei Shtylyov wrote:
ata_sff_data_xfer[32]() use pad area if the transfer size isn't multiple of transfer size; however, this area wasn't cleared and garbage data in pad area could be transferred to the device. Make sure the pad area is cleared.
Signed-off-by: Tejun Heo<tj@xxxxxxxxxx> Cc: Lei Ming<tom.leiming@xxxxxxxxx>
And what's the problem with garbage data? Why it's worse than 0s?
There were devices which puke on random garbage at the end of CDB and
Note that ATAPI CDBs are always aligned to 4 bytes, so this path should never be hit when sending them.
in general sending indeterministic garbage to external device is a bad idea. It increases chance of problems which can be difficult to reproduce and track down while gaining nothing.
Problems with "don't care" padding bytes? Dunno...
It really is a stupid thing to do.
Well, at least the old code was equally stupid before I patched it. :-)
Only in ata_sff_data_xfer32(). It was I who removed the padding buffer initialization in ata_sff_data_xfer()...
Thanks.
WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html