From: Oliver Neukum <oneukum@suse.de>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Pavel Machek <pavel@suse.cz>,
kernel list <linux-kernel@vger.kernel.org>,
Linux-pm mailing list <linux-pm@lists.osdl.org>,
James.Bottomley@hansenpartnership.com, teheo@novell.com
Subject: Re: Power management for SCSI
Date: Wed, 13 Aug 2008 18:25:26 +0200 [thread overview]
Message-ID: <200808131825.27303.oneukum@suse.de> (raw)
In-Reply-To: <48A30140.9040704@s5r6.in-berlin.de>
Am Mittwoch 13 August 2008 17:44:00 schrieb Stefan Richter:
> Oliver Neukum wrote:
> > Am Mittwoch 13 August 2008 16:59:23 schrieb Alan Stern:
> [Quoting Oliver: true SCSI busses can be shared. So are we using the
> correct approach?]
> >> This is a good question. Most USB mass-storage devices do not act as a
> >> true SCSI bus, but I believe there are a few non-standard ones that do
> >> -- the USB device really contains a SCSI host and arbitrary SCSI
> >
> > OK, but does it make sense to have SCSI autosuspend? Or should autosuspend
> > operate on the bus the _host_ is connected to (usb, pci, ...)?
>
> In Alan's patch, SCSI calls scsi_host_template methods (if the LLD
> provides ones) to suspend and resume a Scsi_Host. The LLD can use them
> to work with the underlying infrastructure to determine what can be done
> at that time. I.e. are there other protocols or other initiator-like
> nodes sharing the link? If yes or if "maybe yes", the infrastructure
> keeps the link up. If not, it can move it into a low-power state.
That is a parculiar way of viewing it. Alan's patch introduce runtime
pm attributes to the devices. Quoting:
+/**
+ * scsi_suspend_sdev - suspend a SCSI device
+ * @sdev: the scsi_device to suspend
+ * @msg: Power Management message describing this state transition
+ *
+ * SCSI devices can't actually be suspended in a literal sense,
+ * because SCSI doesn't have any notion of power management. Instead
+ * this routine drains the request queue and calls the ULD's suspend
+ * method to flush caches, spin-down drives, and so on.
+ *
+ * If the suspend succeeds, we call scsi_autosuspend_host to decrement
+ * the host's count of unsuspended devices and invoke the LLD's suspend
+ * method.
So you cannot operate on the link independent from the devices.
Regards
Oliver
next prev parent reply other threads:[~2008-08-13 16:25 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 9:50 Power management for SCSI Pavel Machek
2008-08-13 14:31 ` Alan Stern
2008-08-13 14:31 ` Alan Stern
2008-08-13 14:47 ` Oliver Neukum
2008-08-13 14:59 ` Alan Stern
2008-08-13 14:59 ` Alan Stern
2008-08-13 15:21 ` Oliver Neukum
2008-08-13 15:44 ` Alan Stern
2008-08-13 15:44 ` Alan Stern
2008-08-13 16:14 ` Stefan Richter
2008-08-13 16:23 ` Alan Stern
2008-08-13 16:23 ` Alan Stern
2008-08-13 16:21 ` [linux-pm] " Oliver Neukum
2008-08-13 19:34 ` Alan Stern
2008-08-13 19:34 ` Alan Stern
2008-08-14 6:08 ` Oliver Neukum
2008-08-14 15:40 ` Alan Stern
2008-08-14 15:40 ` Alan Stern
2008-08-14 13:50 ` Pavel Machek
2008-08-14 14:08 ` Oliver Neukum
2008-08-14 15:47 ` Alan Stern
2008-08-14 15:47 ` Alan Stern
2008-08-14 21:43 ` Oliver Neukum
2008-08-14 22:25 ` Alan Stern
2008-08-14 22:25 ` Alan Stern
2008-08-15 7:16 ` Oliver Neukum
2008-08-15 15:25 ` Alan Stern
2008-08-15 15:25 ` Alan Stern
2008-08-15 15:56 ` Oliver Neukum
2008-08-16 5:24 ` Greg KH
2008-08-19 13:33 ` [linux-pm] " Oliver Neukum
2008-08-19 15:28 ` Alan Stern
2008-08-19 15:28 ` Alan Stern
2008-08-19 23:22 ` Stefan Richter
2008-08-22 10:52 ` Pavel Machek
2008-08-22 22:14 ` Alan Stern
2008-08-22 22:14 ` Alan Stern
2008-08-25 12:50 ` Oliver Neukum
2008-08-25 14:45 ` Alan Stern
2008-08-25 14:45 ` Alan Stern
2008-08-25 15:05 ` Oliver Neukum
2008-08-25 16:18 ` Alan Stern
2008-08-25 16:18 ` Alan Stern
2008-08-25 17:34 ` Oliver Neukum
2008-08-25 18:39 ` Alan Stern
2008-08-25 18:39 ` Alan Stern
2008-08-13 15:24 ` Oliver Neukum
2008-08-13 15:44 ` Stefan Richter
2008-08-13 16:25 ` Oliver Neukum [this message]
2008-08-13 19:37 ` Alan Stern
2008-08-13 19:37 ` Alan Stern
2008-08-13 19:42 ` James Bottomley
2008-08-13 20:16 ` Alan Stern
2008-08-13 20:16 ` Alan Stern
2008-08-13 20:03 ` Leisner, Martin
2008-08-13 20:03 ` [linux-pm] " Leisner, Martin
2008-08-13 20:38 ` Alan Stern
2008-08-13 20:38 ` Alan Stern
2008-08-19 21:08 ` Leisner, Martin
2008-08-19 21:08 ` Leisner, Martin
2008-08-13 15:46 ` Alan Stern
2008-08-13 15:46 ` Alan Stern
2008-08-14 13:08 ` Pavel Machek
2008-08-14 15:56 ` Pavel Machek
2008-08-14 22:11 ` Stefan Richter
2008-08-19 7:38 ` Pavel Machek
2008-08-19 7:50 ` [linux-pm] " Oliver Neukum
2008-08-19 14:32 ` Alan Stern
2008-08-19 14:32 ` Alan Stern
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=200808131825.27303.oneukum@suse.de \
--to=oneukum@suse.de \
--cc=James.Bottomley@hansenpartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.osdl.org \
--cc=pavel@suse.cz \
--cc=stefanr@s5r6.in-berlin.de \
--cc=stern@rowland.harvard.edu \
--cc=teheo@novell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.