All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Tejun Heo <tj@kernel.org>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>,
	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:23:01 +0400	[thread overview]
Message-ID: <4E6656F5.1050901@ru.mvista.com> (raw)
In-Reply-To: <20110906165854.GK18425@mtj.dyndns.org>

Hello.

On 09/06/2011 08:58 PM, Tejun Heo 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. :-)

> Thanks.

WBR, Sergei

  reply	other threads:[~2011-09-06 17:24 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 [this message]
2011-09-06 17:28       ` Sergei Shtylyov
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=4E6656F5.1050901@ru.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.