linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Gwendal Grignou <gwendal@google.com>
Cc: Tejun Heo <tj@kernel.org>, Jens Axboe <jens.axboe@oracle.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	jeff@garzik.org, linux-ide@vger.kernel.org,
	Mark Lord <mlord@pobox.com>, Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: libata bridge limits
Date: Tue, 26 Aug 2008 15:55:04 -0500	[thread overview]
Message-ID: <1219784104.6197.29.camel@localhost.localdomain> (raw)
In-Reply-To: <e7510f760808261225x6164e1cciaf67ca08b26ef2bf@mail.gmail.com>

On Tue, 2008-08-26 at 12:25 -0700, Gwendal Grignou wrote:
> On Tue, Aug 26, 2008 at 10:45 AM, James Bottomley
> <James.Bottomley@hansenpartnership.com> wrote:
> > On Tue, 2008-08-26 at 10:25 -0700, Gwendal Grignou wrote:
> >> The current patch  to implement libata-sysfs floating in the mailing
> >> list is read-only.
> >> For write we must currently go through SCSI midlayer ioctls and use
> >> sat. To send commands directly within libata[-sysfs] - for instance
> >> writing SControl register of a SATA PM - I need to either implement a
> >> queue mechanism over ata_exec_internal() or schedule eh and piggy back
> >> on it.
> >
> > That's not how the other transport classes work, why does the libata one
> > need to go through the mid-layer (well, except for the necessary command
> > issue stuff, of course).  The design of the transport classes was
> > specifically to take all transport knowledge out of the mid layer and
> > connect the requisite controls in sysfs directly to the transport
> > actions.
> I agree. I don't want to use the mid-layer either. I just mentioned
> that if I want to send a raw taskfile to a ATA device today, the only
> way I found is using ata_task_ioctl() which relies on the mid-layer to
> schedule the request; the direct way - through ata_exec_internal() -
> assumes only one outstanding command at a time.  I need to implement
> something else for the accessing ATA devices in libata-sysfs similar
> to smp_execute_task() in libsas.

Actually, no ... if you're sending a SATA task, then you're right, you
need to use the mid-layer inputs.  scsi_execute() is the way transport
classes use this (see scsi_transport_spi ... it does exactly this for
domain validation).  ata_task_ioctl() does it exactly this way.

You don't want something like smp_execute_task because that's an
internal libsas API for doing out of band management tasks ... ATA has
no concept of anything like this.  Even our publicly exposed frame
in/frame out interfaces for performing SMP tasks go via a special API
stream in the transport class framework so they can be issued on all SAS
hosts.  Mechanistically, they're different from normal SCSI commands
because they don't count against the queuing quota or have ordinary
tags.  If your commands come out again as standard ATA commands, I 
suspect they have to go through the standard ATA quota machinery.

SAS is very different from SATA in that we have tons of addressable
ports sitting off the devices, each addressable by predefined protocols,
so what smp_execute_task is doing is addressing the SMP port ... this is
completely out of band as far as the normal SSP/STP protocols see
things.  With port multipliers, you're more or less stuck with an
in-band type of packet.

James



  reply	other threads:[~2008-08-26 20:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26  7:28 libata bridge limits Jens Axboe
2008-08-26  9:42 ` Alan Cox
2008-08-26 10:17   ` Jens Axboe
2008-08-26 10:43     ` Tejun Heo
2008-08-26 10:38       ` Alan Cox
2008-08-26 11:23         ` Tejun Heo
2008-08-26 12:25           ` Alan Cox
2008-08-26 12:45             ` Tejun Heo
2008-08-26 17:25       ` Gwendal Grignou
2008-08-26 17:45         ` James Bottomley
2008-08-26 19:25           ` Gwendal Grignou
2008-08-26 20:55             ` James Bottomley [this message]
2008-08-26 12:32     ` Brad Campbell
2008-08-26 12:48       ` Jens Axboe
2008-08-26 12:55         ` Tejun Heo
2008-08-26 13:06           ` Jens Axboe
2008-08-26 13:58             ` Jens Axboe
2008-08-26 14:20               ` Tejun Heo
2008-08-26 14:26                 ` Jens Axboe
2008-08-26 14:25               ` Jens Axboe
2008-08-26 19:36               ` Jeff Garzik
2008-08-26 22:37                 ` Mark Lord
2008-08-27 13:23                 ` Jens Axboe
2008-10-31  5:45                   ` 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=1219784104.6197.29.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gwendal@google.com \
    --cc=jeff@garzik.org \
    --cc=jens.axboe@oracle.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=mlord@pobox.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).