From: Pete Zaitcev <zaitcev@redhat.com>
To: Andries.Brouwer@cwi.nl
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sd.c
Date: Sat, 11 Jan 2003 22:45:26 -0500 [thread overview]
Message-ID: <200301120345.h0C3jQl12220@devserv.devel.redhat.com> (raw)
In-Reply-To: <mailman.1042337402.13365.linux-kernel2news@redhat.com>
> @@ -809,9 +809,22 @@
> if (media_not_present(sdkp, SRpnt))
> return;
>
> - /* Look for devices that return NOT_READY.
> - * Issue command to spin up drive for these cases. */
> - if (the_result && SRpnt->sr_sense_buffer[2] == NOT_READY) {
> + if (the_result == 0)
> + break; /* all is well now */
> +
> + /*
> + * If manual intervention is required, or this is an
> + * absent USB storage device, a spinup is meaningless.
> + */
> + if (SRpnt->sr_sense_buffer[2] == NOT_READY &&
> + SRpnt->sr_sense_buffer[12] == 4 /* not ready */ &&
> + SRpnt->sr_sense_buffer[13] == 3)
Why is this not inside media_not_present?
> +/*
> + * sd_read_cache_type - called only from sd_init_onedisk()
Was it necessary to move and change sd_read_cache_type
simultaneously? Makes a joke of the diff.
> + /* without media there is no reason to ask;
> + moreover, some devices react badly if we do */
> + if (sdkp->media_present)
> + sd_read_cache_type(sdkp, disk->disk_name, SRpnt, buffer);
Hmm... cautiously ok.
-- Pete
next parent reply other threads:[~2003-01-12 3:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1042337402.13365.linux-kernel2news@redhat.com>
2003-01-12 3:45 ` Pete Zaitcev [this message]
2003-01-12 11:20 Andries.Brouwer
-- strict thread matches above, loose matches on Subject: below --
2003-01-12 2:07 Andries.Brouwer
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=200301120345.h0C3jQl12220@devserv.devel.redhat.com \
--to=zaitcev@redhat.com \
--cc=Andries.Brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome