public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Kamaljit Singh <Kamaljit.Singh@pmcs.com>
Cc: Jack Wang <xjtuwjp@gmail.com>,
	Anand Kumar Santhanam <AnandKumar.Santhanam@pmcs.com>,
	linux-scsi@vger.kernel.org, Harry Yang <Harry.Yang@pmcs.com>,
	Vishwanath Maram <Vishwanath.Maram@pmcs.com>,
	Sakthivel Saravanan Kamal Raju <sakthivel.sk@hcl.com>,
	Rich Bono <Rich.Bono@pmcs.com>,
	Sangeetha Gnanasekaran <Sangeetha.Gnanasekaran@pmcs.com>
Subject: Re: 32-byte CDB support in Libsas?
Date: Tue, 07 May 2013 13:06:47 -0700	[thread overview]
Message-ID: <1367957207.4108.7.camel@dabdike> (raw)
In-Reply-To: <405BE55790F03349A85344435F25B01C07843842@BBY1EXM10.pmc_nt.nt.pmc-sierra.bc.ca>

On Tue, 2013-05-07 at 12:46 -0700, Kamaljit Singh wrote:
> James,  Jack,
> 
> Thanks for your responses.
> 
> > I don't understand the question ... it should just work; is it
> broken?
> sas_create_task() only copies 16 bytes to the sas_ssp_task struct’s
> cdb field, which itself is a 16 byte wide array.  So it looks like
> sas_queuecommand() doesn’t support a 32-byte cdb.

Hm, it does it as a bare 16 instead of SCSI_MAX_CDB which is probably
how it got missed in the long command conversion.

> > It's easy to add that, define cdb 32 to ssp_task and modify
> sas_queuecommand, and lldd to pass it to fw
> Yes, that’s exactly what I’ve designed it as, i.e. in my lldd’s
> queuecommand function.  At the moment I only need this function for
> 32-byte cdb support.  But if there are plans to add that to libsas
> then I’d prefer to use sas_queuecommand rather than having to do
> manual merges from future libsas fixes/updates.

I wouldn't do it that way.  Since everything has to form a command IU
anyway by copying, I'd just make sas_ssp->cdb a pointer to the actual
command instead of an array of the command; if it points to the
scsi_cmnd, then it has access to cmd_len as well.  That way no copying
and no problem when anyone wants longer commands.  There should probably
also be a macro to populate the command IU since the format of CDB > 16
is different.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-05-07 20:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-06 18:41 32-byte CDB support in Libsas? Kamaljit Singh
2013-05-06 19:16 ` James Bottomley
     [not found]   ` <CAD+HZHUynKmSgebmoLfPNgfbj8OVGaTUuFhJoJhNJxfvsNUFvg@mail.gmail.com>
2013-05-07 19:46     ` Kamaljit Singh
2013-05-07 20:06       ` James Bottomley [this message]
2013-05-07 20:26         ` Kamaljit Singh
2013-05-07 22:38           ` James Bottomley

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=1367957207.4108.7.camel@dabdike \
    --to=james.bottomley@hansenpartnership.com \
    --cc=AnandKumar.Santhanam@pmcs.com \
    --cc=Harry.Yang@pmcs.com \
    --cc=Kamaljit.Singh@pmcs.com \
    --cc=Rich.Bono@pmcs.com \
    --cc=Sangeetha.Gnanasekaran@pmcs.com \
    --cc=Vishwanath.Maram@pmcs.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sakthivel.sk@hcl.com \
    --cc=xjtuwjp@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