linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Luben Tuikov <luben_tuikov@adaptec.com>,
	James Bottomley <James.Bottomley@SteelEye.com>
Cc: Jens Axboe <axboe@suse.de>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: device suspend/resume
Date: Tue, 24 May 2005 13:29:27 -0400	[thread overview]
Message-ID: <42936477.6020307@pobox.com> (raw)
In-Reply-To: <429330A4.6080005@adaptec.com>

Luben Tuikov wrote:
> On 05/24/05 02:53, Jeff Garzik wrote:
> 
>>You are right about issuing the standby command after flush.  I don't 
>>think an LLD hook is the proper way to accomplish it, however.
>>
>>The SCSI layer needs to issue the START STOP UNIT command in response to 
>>a suspend event, and libata-scsi will (per SAT spec) translate that into 
>>the ATA standby command.  Merely following the relevant SCSI+SAT+ATA 
>>standards gets us there.
> 
> 
> An SSU command may not be viable as the device may be shared
> on the domain (i.e. accessed by another initiator).

Yes.  Don't worry, both James and I are quite aware of this.


>>* Bus PM.  This is best handled by the transport class driver (need to 
>>write for SATA and SAS).
> 
> 
> This is tricky.  Kudos to Doug's answer.  One thing to remember is that
> this is intricately entangled with host PM.  That is, if a device
> is unplugged from the domain -- would one want to computer to come
> out of its current power saving mode?  Probably not.

In general, in a class-based system, one can easily see a situation 
where a host driver would provide "adaptec_sas_transport" class, which 
does a few host-specific things, then falls back to a generic 
"sas_transport" class.

That is how to do host-specific stuff, with transport classes.

However, with regards to your specific example:  to come out of 
power-saving mode based on a certain event, the motherboard needs 
special circuitry.  Example of this is wake-on-LAN or wake-on-serial.


>>* Host PM.  This is handled in the obvious manner, using existing PM 
>>driver hooks.  PCI D0/D3, etc.
> 
> 
> Then D3->D0 would be equivalent to reinintialization of the PCI device,

yes


> doing domain discovery as usual, etc.

Eventually, yes.  At the moment, suspend is rather dumb, and things 
mostly assume that the devices present at suspend will be present at resume.


>>I can describe how this will look when libata is divorced from SCSI, if 
>>you would like, too...
> 
> 
> Please Jeff.
> 
> A concern is SATA devices behind SAS HAs (host adapters).  A straightforward
> translation provided by libata would be a goal.

No need for translation.  The LLD driver would either use the high level 
libata interface (for SATA devices), or use the high level SCSI 
interface (for SAS devices).

Even though libata doesn't have an explicit notion of transport classes 
(it _is_ a transport class, really), this is doable today.

	Jeff



  reply	other threads:[~2005-05-24 17:29 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-23 20:15 [PATCH] libata: device suspend/resume Jeff Garzik
2005-05-23 20:41 ` James Bottomley
2005-05-23 20:45   ` Jeff Garzik
2005-05-23 22:10     ` James Bottomley
2005-05-24  6:21       ` Jens Axboe
2005-05-24  6:53         ` Jeff Garzik
2005-05-24  7:06           ` Hannes Reinecke
2005-05-24  7:08             ` Jens Axboe
2005-05-24  7:16             ` Jeff Garzik
2005-05-24  7:07           ` Jens Axboe
2005-05-24  7:10             ` Jeff Garzik
2005-05-24  7:13               ` Jens Axboe
2005-05-27  2:49                 ` libata, SCSI and storage drivers Jeff Garzik
2005-05-27  6:45                   ` Douglas Gilbert
2005-05-27 14:41                     ` Luben Tuikov
2005-05-24  7:14               ` [PATCH] libata: device suspend/resume Hannes Reinecke
2005-05-24  7:15                 ` Jens Axboe
2005-05-24  7:18                 ` Jeff Garzik
2005-05-24 10:17                   ` Douglas Gilbert
2005-05-24 17:10                     ` Jeff Garzik
2005-05-24  7:59           ` Jens Axboe
2005-05-24  8:21             ` Jeff Garzik
2005-05-24  8:51               ` Jens Axboe
2005-05-24 16:37                 ` Jeff Garzik
2005-05-25  9:29                   ` Jens Axboe
2005-05-25 23:40                     ` Guennadi Liakhovetski
2005-05-26  1:05                     ` Jeff Garzik
2005-05-26  5:57                       ` Jens Axboe
2005-05-26 22:56                     ` Bartlomiej Zolnierkiewicz
2005-05-27  6:54                       ` Jens Axboe
2005-05-27  2:01                     ` Benjamin Herrenschmidt
2005-05-27  6:55                       ` Jens Axboe
2005-05-24 13:48           ` Luben Tuikov
2005-05-24 17:29             ` Jeff Garzik [this message]
2005-05-24 13:05         ` Luben Tuikov
2005-05-27  2:54       ` Jeff Garzik
2005-05-24 16:27   ` Mark Lord
2005-05-24 16:33     ` Mark Lord
2005-05-24 16:04 ` Mark Lord

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=42936477.6020307@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=axboe@suse.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luben_tuikov@adaptec.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;
as well as URLs for NNTP newsgroup(s).