LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Luciano Rocha <luciano@eurotux.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Linux-Kernel <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>,
SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: usb hdd problems with 2.6.27.2
Date: Mon, 3 Nov 2008 14:46:38 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.44L0.0811031444130.2194-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <20081103155254.GA3368@bit.office.eurotux.com>
On Mon, 3 Nov 2008, Luciano Rocha wrote:
> On Tue, Oct 28, 2008 at 01:38:11PM -0400, Alan Stern wrote:
> > > Do you wish me to test anything else?
> >
> > Yes. Please post a usbmon trace for each of the last two tests. That
> > is, with the unusual_devs update only, and with the unusual_devs update
> > plus the invoke_transport update and the scsi_requeue_command update.
>
> I've updated the bugzilla entry with traces for some combinations of the
> discussed patches:
> http://bugzilla.kernel.org/show_bug.cgi?id=11843
Okay, thanks. I see the problem. This whole area is a mess, and it's
going to be different in 2.6.28. But for now...
Please rerun the A+B and A+B+C tests, but this time using the B' patch
below instead of B.
Alan Stern
Index: 2.6.27.4/drivers/scsi/scsi_lib.c
===================================================================
--- 2.6.27.4.orig/drivers/scsi/scsi_lib.c
+++ 2.6.27.4/drivers/scsi/scsi_lib.c
@@ -611,6 +611,11 @@ static void scsi_requeue_command(struct
struct request *req = cmd->request;
unsigned long flags;
+ if (--req->retries <= 0) {
+ blk_end_request(req, -EIO, blk_rq_bytes(req));
+ scsi_next_command(cmd);
+ return;
+ }
scsi_unprep_request(req);
spin_lock_irqsave(q->queue_lock, flags);
blk_requeue_request(q, req);
@@ -690,6 +695,8 @@ static struct scsi_cmnd *scsi_end_reques
* leftovers in the front of the
* queue, and goose the queue again.
*/
+ if (bytes > 0) /* Made progress */
+ ++req->retries;
scsi_requeue_command(q, cmd);
cmd = NULL;
}
next prev parent reply other threads:[~2008-11-03 19:46 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 16:22 Luciano Rocha
2008-10-25 19:25 ` Rafael J. Wysocki
2008-10-25 19:50 ` Alan Stern
2008-10-25 20:11 ` James Bottomley
2008-10-26 14:05 ` Luciano Rocha
2008-10-27 11:14 ` Luciano Rocha
2008-10-27 11:28 ` Luciano Rocha
2008-10-27 14:24 ` Alan Stern
2008-10-27 14:56 ` Douglas Gilbert
2008-10-27 15:08 ` Boaz Harrosh
2008-10-27 16:26 ` Kay Sievers
2008-10-27 15:25 ` Alan Stern
2008-10-27 15:33 ` James Bottomley
2008-10-27 15:18 ` Luciano Rocha
2008-10-27 15:38 ` Alan Stern
2008-10-27 16:53 ` Luciano Rocha
2008-10-27 20:10 ` Alan Stern
2008-10-28 16:37 ` Luciano Rocha
2008-10-28 17:38 ` Alan Stern
2008-11-03 15:52 ` Luciano Rocha
2008-11-03 19:46 ` Alan Stern [this message]
2008-11-05 10:26 ` Luciano Rocha
2008-11-05 16:51 ` Alan Stern
2008-11-13 17:10 ` Luciano Rocha
2008-10-27 20:36 ` 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=Pine.LNX.4.44L0.0811031444130.2194-100000@iolanthe.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=luciano@eurotux.com \
--cc=rjw@sisk.pl \
--subject='Re: usb hdd problems with 2.6.27.2' \
/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
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).