linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: Tejun Heo <tj@kernel.org>, Jeff Garzik <jgarzik@pobox.com>,
	Alan Cox <alan@linux.intel.com>,
	linux-ide@vger.kernel.org, tom.leiming@gmail.com
Subject: Re: [PATCH #upstream-fixes] libata: clear PIO pad area
Date: Tue, 06 Sep 2011 21:28:43 +0400	[thread overview]
Message-ID: <4E66584B.1000109@mvista.com> (raw)
In-Reply-To: <4E6656F5.1050901@ru.mvista.com>

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@kernel.org>
>>>> Cc: Lei Ming<tom.leiming@gmail.com>

>>> 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

  reply	other threads:[~2011-09-06 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-06  4:09 [PATCH #upstream-fixes] libata: clear PIO pad area Tejun Heo
2011-09-06 10:06 ` Sergei Shtylyov
2011-09-06 11:16   ` Alan Cox
2011-09-06 16:58   ` Tejun Heo
2011-09-06 17:23     ` Sergei Shtylyov
2011-09-06 17:28       ` Sergei Shtylyov [this message]
2011-09-06 17:30       ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E66584B.1000109@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=alan@linux.intel.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=tom.leiming@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).