Thread (7 messages) 7 messages, 3 authors, 2011-09-06

Re: [PATCH #upstream-fixes] libata: clear PIO pad area

From: Sergei Shtylyov <hidden>
Date: 2011-09-06 17:24:19

Hello.

On 09/06/2011 08:58 PM, Tejun Heo wrote:
quoted
quoted
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.
quoted
quoted
Signed-off-by: Tejun Heo<tj@kernel.org>
Cc: Lei Ming<tom.leiming@gmail.com>
quoted
    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. :-)
Thanks.
WBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help