From: Tejun Heo <tj@kernel.org>
To: Jeff Garzik <jeff@garzik.org>
Cc: Robert Hancock <hancockrwd@gmail.com>,
ide <linux-ide@vger.kernel.org>, Mark Lord <liml@rtr.ca>
Subject: Re: [PATCH #upstream] sata_sil24: always set protocol override for non-ATAPI data commands
Date: Fri, 31 Jul 2009 10:20:39 +0900 [thread overview]
Message-ID: <4A7246E7.90907@kernel.org> (raw)
In-Reply-To: <4A72084E.1030508@garzik.org>
Jeff Garzik wrote:
>> diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
>> index 77aa8d7..e6946fc 100644
>> --- a/drivers/ata/sata_sil24.c
>> +++ b/drivers/ata/sata_sil24.c
>> @@ -846,6 +846,17 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc)
>> if (!ata_is_atapi(qc->tf.protocol)) {
>> prb = &cb->ata.prb;
>> sge = cb->ata.sge;
>> + if (ata_is_data(qc->tf.protocol)) {
>> + u16 prot = 0;
>> + ctrl = PRB_CTRL_PROTOCOL;
>> + if (ata_is_ncq(qc->tf.protocol))
>> + prot |= PRB_PROT_NCQ;
>> + if (qc->tf.flags & ATA_TFLAG_WRITE)
>> + prot |= PRB_PROT_WRITE;
>> + else
>> + prot |= PRB_PROT_READ;
>> + prb->prot = cpu_to_le16(prot);
>> + }
>
> I'm trying to remember why we did not do this originally -- Tejun,
> do you recall?
Because that was how the example driver from SIMG worked. :-)
> I do not see any prohibition in the docs, so I am inclined to apply
> this.
Eh... My original thought was to set the protocol only for new cmds
for the sake of least surprise but it does make sense to set the
protocol always. Going through the doc... Yeap, it should just be
fine.
Thanks.
--
tejun
next prev parent reply other threads:[~2009-07-31 1:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 20:11 [PATCH #upstream] sata_sil24: always set protocol override for non-ATAPI data commands Robert Hancock
2009-07-30 20:18 ` Mark Lord
2009-07-30 20:53 ` Jeff Garzik
2009-07-31 1:20 ` Tejun Heo [this message]
2009-08-22 5:57 ` Robert Hancock
2009-08-22 14:03 ` Mark Lord
2009-08-22 14:11 ` Jeff Garzik
2009-08-22 15:25 ` Mark Lord
2009-08-22 15:28 ` Mark Lord
2009-08-22 16:10 ` Jeff Garzik
2009-08-22 16:27 ` Robert Hancock
2009-08-22 16:02 ` Jeff Garzik
2009-08-22 16:30 ` Robert Hancock
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=4A7246E7.90907@kernel.org \
--to=tj@kernel.org \
--cc=hancockrwd@gmail.com \
--cc=jeff@garzik.org \
--cc=liml@rtr.ca \
--cc=linux-ide@vger.kernel.org \
/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).