lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200808131825.27303.oneukum@suse.de>
Date:	Wed, 13 Aug 2008 18:25:26 +0200
From:	Oliver Neukum <oneukum@...e.de>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
Cc:	Alan Stern <stern@...land.harvard.edu>,
	Pavel Machek <pavel@...e.cz>,
	kernel list <linux-kernel@...r.kernel.org>,
	"Linux-pm mailing list" <linux-pm@...ts.osdl.org>,
	James.Bottomley@...senpartnership.com, teheo@...ell.com
Subject: Re: Power management for SCSI

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ