public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Suspending SCSI devices and buses
@ 2004-08-18 20:36 Alan Stern
  2004-08-18 20:42 ` Christoph Hellwig
  2004-08-18 20:49 ` Nathan Bryant
  0 siblings, 2 replies; 15+ messages in thread
From: Alan Stern @ 2004-08-18 20:36 UTC (permalink / raw)
  To: SCSI development list

How does a host driver tell the SCSI core that an adapter is being 
suspended (and hence the core needs to suspend all the devices attached to 
that adapter)?  Ditto for resume.

There doesn't appear to be any way to do it.  The scsi_bus_type and 
various driver structures don't contain a "suspend" entry.

Alan Stern


^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: Suspending SCSI devices and buses
@ 2004-08-20 20:49 Pat LaVarre
  2004-08-20 21:38 ` Nathan Bryant
  0 siblings, 1 reply; 15+ messages in thread
From: Pat LaVarre @ 2004-08-20 20:49 UTC (permalink / raw)
  To: linux-scsi; +Cc: Alan Stern

 > a hardcoded invalidate on resume is overkill.

Theoretically yes.

 > current ... Linux kernel ... not distinguish
 > power-on events from media change events.

One case for leaving Linux pessimistic that way is ...

 > I'm not sure doing so is even possible for SCSI devices.
 > (Comments on that?)

SK ASC x 6 29 UnitAttention Reset is the only notice a host gets of a 
wall-powered drive unplugged from one host and plugged into another, 
when the bus does not distinctly identify the host, as in USB, etc.  
 From the drive's point of view, that is not an SK ASC x 6 28 
UnitAttention GoneReady ... yet still from the host's point of view, 
that is a media change.

Same for drives that don't let you remove the media: those drives might 
report no unit attentions at all, again implying that plug-in or resume 
of power is always a potential media change for the host.

 > old 1Gig Jaz drive

Those drives often report x 2 04 02 (else x 2 04 00 meaning x 2 04 
00..FF which includes x 2 04 02) while auto spun down, to help the host 
avoid timing out a read that includes spin up delay.  Their auto spin 
down time is configurable with vendor-specific protocol between resets. 
  Insertion spinup, eject spindown, while spinning up and down are all 
more intricate.

 > Does "Medium May Have Changed" show up reliably
 > if somebody changes the medium in a cartridge drive,
 > Zip drive, etc while it is powered down?

Relevant device design questions include:

1) Do enough hosts consistently limit how stale cache may be?

2) Do enough hosts reliably tolerate x 6 28 GoneReady produced by a 
suspend-resume power cycle without media change?

3) Does the device itself cache part of the disc?

4) Is the disc robust enough to tolerate a auto fetch of its identity 
after each resume or power on?

5) Does swapping the disc detectably change a mechanical state in the 
drive?

6) Was the device expensive enough to include a non-volatile record of 
the identity of the disc present before each suspend or power off?

In design, me, I'd vote to have the device pessimistically queue any UA 
that might be necessary, and let the host sort out which are real, but 
I'm not sure how often people like me lose such votes.

Pat LaVarre


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-08-20 22:32 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-18 20:36 Suspending SCSI devices and buses Alan Stern
2004-08-18 20:42 ` Christoph Hellwig
2004-08-18 20:49 ` Nathan Bryant
2004-08-19 21:05   ` Alan Stern
2004-08-19 21:20     ` Nathan Bryant
2004-08-20 12:30     ` Nathan Bryant
2004-08-20 13:35       ` Luben Tuikov
2004-08-20 14:33         ` Nathan Bryant
2004-08-20 15:08       ` Alan Stern
2004-08-20 15:53         ` Nathan Bryant
2004-08-20 16:43           ` Alan Stern
  -- strict thread matches above, loose matches on Subject: below --
2004-08-20 20:49 Pat LaVarre
2004-08-20 21:38 ` Nathan Bryant
2004-08-20 22:06   ` Pat LaVarre
2004-08-20 22:32     ` Nathan Bryant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox