public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Joshua Kwan <joshk@triplehelix.org>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-scsi@vger.kernel.org, axboe@suse.de, torvalds@osdl.org,
	randy_dunlap <rdunlap@xenotime.net>
Subject: SATA suspend/resume (was Re: [PATCH] updated version of Jens' SATA suspend-to-ram patch)
Date: Thu, 29 Sep 2005 01:21:28 -0400	[thread overview]
Message-ID: <433B79D8.9080305@pobox.com> (raw)
In-Reply-To: <20050923163334.GA13567@triplehelix.org>

Joshua Kwan wrote:
> Hello,
> 
> I had some time yesterday and decided to help Jens out by rediffing the
> now-infamous SATA suspend-to-ram patch [1] against current git and
> test-building it.
> 
> For posterity,
> 
> This patch adds the ata_scsi_device_resume and ata_scsi_device_suspend
> functions (along with helpers) to put to sleep and wake up Serial ATA
> controllers when entering sleep states, and hooks the functions into
> each SATA controller driver so that suspend-to-RAM is possible.
> 
> Note that this patch is a holdover patch until it is possible to
> generalize this concept for all SCSI devices, which requires more data
> on which devices need to be put to sleep and which don't.
> 
> Signed-off-by: Joshua Kwan <joshk@triplehelix.org>

Ah hah!  I found the other SCSI suspend patch:

	http://lwn.net/Articles/97453/

Anybody (Joshua?) up for reconciling and testing the two?

The main change from Jens/Joshua's patch is that we use SCSI's 
sd_shutdown() to call sync cache, eliminating the need for 
ata_flush_cache(), since the SCSI layer would now perform that.

For bonus points,

1) sd should call START STOP UNIT on suspend, which eliminates the need 
for ata_standby_drive(), and completely encompasses the suspend process 
in the SCSI layer.

2) sd should call START STOP UNIT on resume -- and as a SUPER BONUS, the 
combination of these two changes ensures that there are no queue 
synchronization issues, the likes of which would require hacks like 
Jens' while-loop patch.

None of these are huge changes requiring a lot of thinking/planning...

Finally, ideally, we should be issuing a hardware or software reset on 
suspend.

	Jeff



  parent reply	other threads:[~2005-09-29  5:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-23 16:33 [PATCH] updated version of Jens' SATA suspend-to-ram patch Joshua Kwan
2005-09-23 18:07 ` Jens Axboe
2005-09-23 20:23   ` Linus Torvalds
2005-09-23 20:47   ` Jeff Garzik
2005-09-23 21:11     ` Mark Lord
2005-09-23 21:21     ` Joshua Kwan
2005-09-24  7:07     ` Jens Axboe
2005-09-29  5:21 ` Jeff Garzik [this message]
2005-09-29  7:34   ` SATA suspend/resume (was Re: [PATCH] updated version of Jens' SATA suspend-to-ram patch) Christoph Hellwig
2005-09-29  8:11     ` Christoph Hellwig
2005-09-29 20:13   ` Randy.Dunlap
2005-09-29 21:48     ` Randy.Dunlap
2005-10-01 18:24   ` Mark Lord
2005-10-01 18:39     ` Randy.Dunlap
  -- strict thread matches above, loose matches on Subject: below --
2005-09-29 14:26 James.Smart
2005-09-29 15:56 ` Stefan Richter

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=433B79D8.9080305@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=axboe@suse.de \
    --cc=joshk@triplehelix.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=torvalds@osdl.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