All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Bryant <nbryant@optonline.net>
To: Pat LaVarre <p.lavarre@ieee.org>
Cc: linux-scsi@vger.kernel.org, Alan Stern <stern@rowland.harvard.edu>
Subject: Re: Suspending SCSI devices and buses
Date: Fri, 20 Aug 2004 17:38:57 -0400	[thread overview]
Message-ID: <41266F71.9060207@optonline.net> (raw)
In-Reply-To: <7C828B3E-F2EA-11D8-B9BF-00039398BB5E@ieee.org>

Pat LaVarre wrote:

> > 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.

We only see this sense when the device is unplugged from the wall in the 
process, right?

> 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.

OK, that translates as NOT_READY,     "LOGICAL UNIT NOT READY, 
INITIALIZING CMD. REQUIRED" Which means they require START UNIT, right?

>
> > 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?

According to recent SBC/SPC, drives are not supposed to produce x6 28 
for low-power conditions defined by the SCSI standard. There is a 
separate sense code for that: ILLEGAL REQUEST, ASC=LOW POWER CONDITION ON.

However, for SCSI devices hooked up to an ACPI capable desktop power 
supply, S3 suspend looks just like power-off to them. So in that case 
they're likely to report x6 29 and maybe also x6 28.

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

With my patch, I'm sending SYNCHRONIZE CACHE on suspend.

> 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.

Kill 'em all, and let Ghod sort 'em out. :)

  reply	other threads:[~2004-08-20 21:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-20 20:49 Suspending SCSI devices and buses Pat LaVarre
2004-08-20 21:38 ` Nathan Bryant [this message]
2004-08-20 22:06   ` Pat LaVarre
2004-08-20 22:32     ` Nathan Bryant
  -- strict thread matches above, loose matches on Subject: below --
2004-08-18 20:36 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

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=41266F71.9060207@optonline.net \
    --to=nbryant@optonline.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=p.lavarre@ieee.org \
    --cc=stern@rowland.harvard.edu \
    /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.