From: R.E.Wolff@BitWizard.nl (Rogier Wolff)
To: torvalds@transmeta.com, alan@redhat.com
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: SD: infinite loop.
Date: Thu, 25 Jan 2001 16:28:58 +0100 (MET) [thread overview]
Message-ID: <200101251528.QAA11270@cave.bitwizard.nl> (raw)
Hi Linus, Alan,
There is a small problem in sd.c: If a disk doesn't become ready, the
loop to try and spin it up doesn't terminate. This can be fixed by
moving one statement up a few lines. Patch below
(the "start of the loop time" variable (spintime_value) is set INSIDE
the loop, which means that the timeout is 100 seconds from 'now' and
stays that way. By moving it up into the "if" above, the value is only
set on the first iteration around the loop. )
Roger.
--- linux-2.4.0.clean/drivers/scsi/sd.c Fri Oct 27 08:35:48 2000
+++ linux-2.4.0.jungo/drivers/scsi/sd.c Thu Jan 25 16:18:41 2001
@@ -798,9 +798,9 @@
SRpnt->sr_data_direction = SCSI_DATA_READ;
scsi_wait_req(SRpnt, (void *) cmd, (void *) buffer,
0/*512*/, SD_TIMEOUT, MAX_RETRIES);
+ spintime_value = jiffies;
}
spintime = 1;
- spintime_value = jiffies;
time1 = HZ;
/* Wait 1 second for next try */
do {
--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots.
* There are also old, bald pilots.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
reply other threads:[~2001-01-25 15:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200101251528.QAA11270@cave.bitwizard.nl \
--to=r.e.wolff@bitwizard.nl \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).