From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>,
"tj@kernel.org" <tj@kernel.org>,
"dn3108@gmail.com" <dn3108@gmail.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] scsi/libata: Support variable-length cdb of ata pass-thru(32).
Date: Fri, 23 Jun 2017 17:02:50 +0000 [thread overview]
Message-ID: <1498237368.2735.6.camel@wdc.com> (raw)
In-Reply-To: <CAKv8XUU-k0dFjHAu9G2rM+is4AZw9BKfsFDh1zG0zwq=GzSVkg@mail.gmail.com>
On Sat, 2017-06-24 at 01:50 +0900, Minwoo Im wrote:
> On Thu, Jun 22, 2017 at 3:52 AM, Bart Van Assche <Bart.VanAssche@wdc.com> wrote:
> > > @@ -4385,7 +4463,12 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
> > > shost->max_id = 16;
> > > shost->max_lun = 1;
> > > shost->max_channel = 1;
> > > - shost->max_cmd_len = 16;
> > > + /*
> > > + * SPC-3, SPC-4: Definition of CDB
> > > + * A CDB may have a fixed length of up to 16 bytes or
> > > + * variable length of between 12 and 260 bytes.
> > > + */
> > > + shost->max_cmd_len = 260;
> >
> > Does ATA pass-through really support 260-byte CDBs or is the maximum CDB length
> > that is supported by ATA_32 perhaps 32 bytes?
>
> Here's my opinion about your question.
> In perspective of SCSI host, I guess the max cmd len should be 260 bytes.
> Because SPC says that, in case of variable-length command, it could be
> from 12 to 260 bytes.
> That's why I have applied 260 value to max_cmd_len of scsi host.
> Please feel free to give any opinions about it.
Hello Minwoo,
Table 172 in document sat4r06.pdf shows that the CDB of the ATA PASS-THROUGH (32)
command is exactly 32 bytes long. My conclusion from analyzing __ata_scsi_queuecmd()
is that the current version of that function does not support CDBs of more than
16 bytes. Since your patch adds support for a single command with 32-byte CDB I
am convinced that max_cmd_len should be set to 32 in ata_scsi_add_hosts().
Bart.
next prev parent reply other threads:[~2017-06-23 17:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-17 11:00 [PATCH] scsi/libata: Support variable-length cdb of ata pass-thru(32) Minwoo Im
2017-06-19 13:22 ` [PATCH] scsi/libata: Support variable-length cdb of ata pass-thru(32)-bug fixed Minwoo Im
2017-06-21 18:52 ` [PATCH] scsi/libata: Support variable-length cdb of ata pass-thru(32) Bart Van Assche
2017-06-23 16:50 ` Minwoo Im
2017-06-23 17:02 ` Bart Van Assche [this message]
2017-06-23 17:15 ` Bart Van Assche
2017-06-23 17:59 ` Minwoo Im
2017-06-23 18:13 ` Bart Van Assche
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=1498237368.2735.6.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=dn3108@gmail.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tj@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).