linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luben Tuikov <luben_tuikov@adaptec.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "Moore, Eric Dean" <Eric.Moore@lsil.com>,
	jejb@steeleye.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/4] sas: add flag for locally attached PHYs
Date: Thu, 20 Oct 2005 11:29:09 -0400	[thread overview]
Message-ID: <4357B7C5.9000709@adaptec.com> (raw)
In-Reply-To: <20051020141123.GA7119@lst.de>

On 10/20/05 10:11, Christoph Hellwig wrote:
> On Wed, Oct 19, 2005 at 05:00:03PM -0400, Luben Tuikov wrote:
> 
>>On 10/19/05 16:08, Moore, Eric Dean wrote:
>>
>>>Luben:  He is adding support for linkerrors and link/phy reset;
>>>these for for CSMI/SDI API.
>>>
>>>Can you in your driver retreive link errors for the links on the expanders?
>>
>>Yes. (offloaded to user space)
>>
>>You use the user space program called "expander_conf.c" to
>>send SMP requests and receive SMP responses.
> 
> 
> Yes, exactly.  On the other hand we don't have standard
> hardware-indepent ways of doing that for the PHYs of the HBA because
> the programming interfaces are to different and need to abstract it away
> in the kernel.

The _protocol_ way is SMP.  And LSI does implement SMP passthrough.

You have two scenarios: local phys and SMP.

Note that your task as wanted by HP/LSI/etc (all who use Fusion MPT)
is to implement SDI/CSMI, see http://www.t10.org/drafts.htm#sdi- .

If you implement this, as say, drivers/scsi/sdi.c, then I'd
be more than happy to register with it so as to export
SDI/CSMI functionality.

E.g. if you look at SDI_GET_PHY_INFO you will notice
that this is only for phys of the Host Adapter, NOT all
phys on the domain (which is a _crazy_ concept).

Most of the code has been written right in the SDI spec
sdi-r00.pdf.  You can start from there.  And most of the concepts
have been implemented in say LSI's FW and in my code, the SAS
Transport Layer.

E.g. you can see how "port identifier is u8" which is exactly
what, I'm sure, LSI's fw uses (or can fit in), and as you can see
in my code that I use (I actually use "int").

Now, _registration_ of SDI by different entities would be common,
say, sdi_register_provider(struct ...); Also the _mechanism_
to access that facility would be common*.  But _dispatching_
would be implementation dependent as you can see LSI would
do it differently and Adaptec would do it differently and
XYZ would do it differently, etc.

* I say common because you can use sg, in which case the
IOCTLs described in the spec are directly translated into
"headers" to be issued down sg.

Your task is clearly defined by a spec (sdi-r00.pdf).
Most of the functions defined therein are direct SAS concepts
and, as you can see, translate to an SMP function, or to a TMF,
since this is where they were taken from to begin with.

There is no need for translation layers upon translation
layers.  The task is clearly defined: LSI wants SDI/CSMI.
You have a CSMI spec.  Implement it.  This would make
everyone's job so much easier without destroying already
existing _good_ code.

>  That's why I need the local_attached flag as an internal
> helper - it's not actually exposed to userland so the implementation

1) LSI does have SMP pass through.
2) You absolutely do not need to represent all phys on the domain,
which is, as I said, a completely _crazy_ idea.  Look, even SDI doesn't
want you to do that.  What SDI wants you to do is issue SMP out.
LSI does have SMP pass through in FW so use that.
3) All you care about is SDI, and SDI has a _spec_.  Your job is
twofold:
	- implement drivers/scsi/sdi.c so we can all use it,
	- implement the implementation/hw dependent way to
	access SDI functionality for Fusion as described above
	where I mention that this would be implementation dependent
	(dispatching to).

	Luben
-- 
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/

  reply	other threads:[~2005-10-20 15:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-19 20:08 [PATCH 1/4] sas: add flag for locally attached PHYs Moore, Eric Dean
2005-10-19 21:00 ` Luben Tuikov
2005-10-20 14:11   ` Christoph Hellwig
2005-10-20 15:29     ` Luben Tuikov [this message]
2005-10-20 15:49       ` Christoph Hellwig
2005-10-20 16:08         ` Luben Tuikov
  -- strict thread matches above, loose matches on Subject: below --
2005-10-20 15:45 Moore, Eric Dean
2005-10-20 16:16 ` Luben Tuikov
2005-10-20 15:25 Moore, Eric Dean
2005-10-20 15:55 ` Luben Tuikov
2005-10-20 16:01 ` Christoph Hellwig
2005-10-20 16:51   ` Luben Tuikov
2005-10-20 17:03     ` Christoph Hellwig
2005-10-20 17:22       ` Arjan van de Ven
2005-10-20 20:10         ` Luben Tuikov
2005-10-21  8:16           ` Arjan van de Ven
2005-10-20 20:02       ` Luben Tuikov
2005-10-21  0:01         ` Andrew Patterson
2005-10-21  9:06           ` Arjan van de Ven
2005-10-21 17:05             ` Andrew Patterson
2005-10-21 17:18               ` Arjan van de Ven
2005-10-21 18:57               ` Luben Tuikov
2005-10-21 17:32           ` Luben Tuikov
2005-10-21  1:50 ` Douglas Gilbert
2005-10-21  2:16   ` Jeff Garzik
2005-10-21  3:25     ` Douglas Gilbert
2005-10-21 18:04   ` Luben Tuikov
2005-10-19 18:01 Christoph Hellwig
2005-10-19 19:24 ` Luben Tuikov
2005-10-19 19:37   ` Luben Tuikov

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=4357B7C5.9000709@adaptec.com \
    --to=luben_tuikov@adaptec.com \
    --cc=Eric.Moore@lsil.com \
    --cc=hch@lst.de \
    --cc=jejb@steeleye.com \
    --cc=linux-scsi@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).