From: Tino Keitel <tino.keitel@tikei.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Tejun Heo <tj@kernel.org>,
Stefan Richter <stefanr@s5r6.in-berlin.de>,
linux1394-user@lists.sourceforge.net, linux-scsi@vger.kernel.org
Subject: Re: disk restart failure after suspend
Date: Mon, 19 Oct 2009 20:05:09 +0200 [thread overview]
Message-ID: <20091019180509.GA24410@mac.home> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0910181642390.18952-100000@netrider.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 81 bytes --]
Hi,
for reference, I attach the patch I used to workaround this.
Regards,
Tino
[-- Attachment #2: retry_restart_disk.diff --]
[-- Type: text/x-diff, Size: 789 bytes --]
--- sd.c 2009-10-19 14:19:20.199156476 +0200
+++ linux-2.6.31/drivers/scsi/sd.c 2009-10-14 22:38:27.922974268 +0200
@@ -2183,6 +2185,7 @@
struct scsi_sense_hdr sshdr;
struct scsi_device *sdp = sdkp->device;
int res;
+ int i = 0;
if (start)
cmd[4] |= 1; /* START */
@@ -2193,8 +2196,13 @@
if (!scsi_device_online(sdp))
return -ENODEV;
- res = scsi_execute_req(sdp, cmd, DMA_NONE, NULL, 0, &sshdr,
- SD_TIMEOUT, SD_MAX_RETRIES, NULL);
+ while (res = scsi_execute_req(sdp, cmd, DMA_NONE, NULL, 0, &sshdr,
+ SD_TIMEOUT, SD_MAX_RETRIES, NULL) && i < 10) {
+ i++;
+ sd_printk(KERN_WARNING, sdkp, "START_STOP FAILED, retrying.\n");
+ msleep(2000);
+ }
+
if (res) {
sd_printk(KERN_WARNING, sdkp, "START_STOP FAILED\n");
sd_print_result(sdkp, res);
[-- Attachment #3: Type: text/plain, Size: 399 bytes --]
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
[-- Attachment #4: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2009-10-19 18:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091006073926.GA5636@mac.home>
[not found] ` <4ACB2B69.20008@s5r6.in-berlin.de>
[not found] ` <20091006115121.GA15517@mac.home>
[not found] ` <4ACB6940.5010905@s5r6.in-berlin.de>
[not found] ` <4ACB6BF2.5090409@s5r6.in-berlin.de>
[not found] ` <20091007051614.GA7527@mac.home>
[not found] ` <4ACC2ADC.4050307@s5r6.in-berlin.de>
[not found] ` <20091011202902.GA29604@x61.home>
[not found] ` <4AD25437.90609@s5r6.in-berlin.de>
[not found] ` <20091016060320.GB30389@mac.home>
2009-10-18 14:42 ` disk restart failure after suspend Stefan Richter
2009-10-19 13:42 ` Alan Stern
2009-10-19 18:05 ` Tino Keitel [this message]
2009-10-19 20:24 ` Stefan Richter
2009-10-19 20:28 ` Tino Keitel
2009-10-19 21:50 ` Stefan Richter
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=20091019180509.GA24410@mac.home \
--to=tino.keitel@tikei.de \
--cc=linux-scsi@vger.kernel.org \
--cc=linux1394-user@lists.sourceforge.net \
--cc=stefanr@s5r6.in-berlin.de \
--cc=stern@rowland.harvard.edu \
--cc=tj@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