From: Jeff Garzik <jeff@garzik.org>
To: Tejun Heo <htejun@gmail.com>
Cc: IDE/ATA development list <linux-ide@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [PATCH #upstream-fixes] libata: use atapi_cmd_type() to determine cmd type instead of transfer size
Date: Mon, 17 Mar 2008 08:27:52 -0400 [thread overview]
Message-ID: <47DE63C8.2000006@garzik.org> (raw)
In-Reply-To: <47D5EFD4.2090801@gmail.com>
Tejun Heo wrote:
> pata_ali and pata_it821x were using qc->nbytes to determine whether a
> command is data transfer type or not. As now qc->nbytes can be
> extended by padding and draining buffers, this tests are not useful
> anymore. Use atapi_cmd_type() instead.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/ata/pata_ali.c | 2 +-
> drivers/ata/pata_it821x.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
> index 7e68edf..8786455 100644
> --- a/drivers/ata/pata_ali.c
> +++ b/drivers/ata/pata_ali.c
> @@ -295,7 +295,7 @@ static void ali_lock_sectors(struct ata_device *adev)
> static int ali_check_atapi_dma(struct ata_queued_cmd *qc)
> {
> /* If its not a media command, its not worth it */
> - if (qc->nbytes < 2048)
> + if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC)
> return -EOPNOTSUPP;
> return 0;
> }
applied the pata_ali portion of this patch
next prev parent reply other threads:[~2008-03-17 12:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-11 2:35 [PATCH #upstream-fixes] libata: use atapi_cmd_type() to determine cmd type instead of transfer size Tejun Heo
2008-03-11 12:50 ` Rafael J. Wysocki
2008-03-12 13:18 ` Alan Cox
2008-03-17 12:27 ` Jeff Garzik [this message]
2008-03-18 8:47 ` [PATCH #upstream-fixes 1/2] libata: implement ata_qc_raw_nbytes() Tejun Heo
2008-03-18 8:56 ` [PATCH #upstream-fixes 2/2] pata_it821x: use raw nbytes in check_atapi_dma Tejun Heo
2008-03-25 2:26 ` [PATCH #upstream-fixes 1/2] libata: implement ata_qc_raw_nbytes() Jeff Garzik
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=47DE63C8.2000006@garzik.org \
--to=jeff@garzik.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=htejun@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=rjw@sisk.pl \
/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).