LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Luciano Rocha <luciano@eurotux.com>,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: "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, 27 Oct 2008 10:24:14 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.0810271007030.4059-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <20081027112803.GA4398@bit.office.eurotux.com>

On Mon, 27 Oct 2008, Luciano Rocha wrote:

> On Sat, Oct 25, 2008 at 03:50:07PM -0400, Alan Stern wrote:
> > On Sat, 25 Oct 2008, Rafael J. Wysocki wrote:
> > 
> > > [Adding CCs]
> > > 
> > > On Wednesday, 22 of October 2008, Luciano Rocha wrote:
> > > > 
> > > > Hello,
> > > > 
> > > > An external HDD, usb-encased, works fine under 2.6.26.5, but under
> > > > 2.6.27.2 I get hundreds of errors per second, of 'No Sense [current]'.
> > 
> > You can use usbmon to capture the details of what happens when you plug
> > in the drive.  Instructions are in the kernel source file
> > Documentation/usb/usbmon.txt.
> > 
> 
> Now in 2.6.27.4, same problem. The usb traffic is:

This looks exactly like the "infinite retry" problem I warned about 
earlier.  Here are the important parts of the log.  For people who 
don't know how to interpret these messages, the CDB starts in the 16th 
byte of the 31-byte messages.  For example, the first command here 
starts with 0x25 and so it is READ CAPACITY:

> f21e7cc0 3570408174 S Bo:1:008:1 -115 31 = 55534243 06000000 08000000 80000a25 00000000 00000000 00000000 000000
> f21e7cc0 3570408264 C Bo:1:008:1 0 31 >
> f21e72c0 3570408280 S Bi:1:008:2 -115 8 <
> f21e72c0 3570408389 C Bi:1:008:2 0 8 = 2e9390b0 00000200
> f21e7cc0 3570408400 S Bi:1:008:2 -115 13 <
> f21e7cc0 3570408513 C Bi:1:008:2 0 13 = 55534253 06000000 00000000 00

The response is 0x2e9390b0.  In typical broken fashion, that is 
undoubtedly the total number of sectors rather than the highest sector 
number.

Later on the system tries to read the contents of what it thinks is the 
last sector:

> f21e7cc0 3570515635 S Bo:1:008:1 -115 31 = 55534243 0c000000 00020000 80000a28 002e9390 b0000001 00000000 000000
> f21e7cc0 3570515762 C Bo:1:008:1 0 31 >
> f21e76c0 3570515776 S Bi:1:008:2 -115 512 <
> f21e76c0 3570516261 C Bi:1:008:2 -32 0
> f21e7cc0 3570516281 S Co:1:008:0 s 02 01 0000 0082 0000 0
> f21e7cc0 3570516387 C Co:1:008:0 0 0
> f21e7cc0 3570516399 S Bi:1:008:2 -115 13 <
> f21e7cc0 3570516511 C Bi:1:008:2 0 13 = 55534253 0c000000 00020000 01

There's no data in the response, and the 01 on the line above 
indicates Check Condition status.

> f21e7cc0 3570516524 S Bo:1:008:1 -115 31 = 55534243 0d000000 12000000 80000603 00000012 00000000 00000000 000000
> f21e7cc0 3570516636 C Bo:1:008:1 0 31 >
> f21e76c0 3570516649 S Bi:1:008:2 -115 18 <
> f21e76c0 3570516762 C Bi:1:008:2 0 18 = 70000000 0000000a 00000000 00000000 0000
> f21e7cc0 3570516779 S Bi:1:008:2 -115 13 <
> f21e7cc0 3570516886 C Bi:1:008:2 0 13 = 55534253 0d000000 00000000 00

The automatically-generated REQUEST SENSE gets the 18-byte response you 
see above.  It is entirely empty (No Sense).

The remainder of the trace shows the same command being repeated over 
and over again, with the same result each time.

> f21e7cc0 3570516936 S Bo:1:008:1 -115 31 = 55534243 0e000000 00020000 80000a28 002e9390 b0000001 00000000 000000
> f21e7cc0 3570517012 C Bo:1:008:1 0 31 >
> f21e76c0 3570517031 S Bi:1:008:2 -115 512 <
> f21e76c0 3570517511 C Bi:1:008:2 -32 0
> f21e7cc0 3570517533 S Co:1:008:0 s 02 01 0000 0082 0000 0
> f21e7cc0 3570517637 C Co:1:008:0 0 0
> f21e7cc0 3570517648 S Bi:1:008:2 -115 13 <
> f21e7cc0 3570517762 C Bi:1:008:2 0 13 = 55534253 0e000000 00020000 01
> f21e7cc0 3570517775 S Bo:1:008:1 -115 31 = 55534243 0f000000 12000000 80000603 00000012 00000000 00000000 000000
> f21e7cc0 3570517886 C Bo:1:008:1 0 31 >
> f21e76c0 3570517897 S Bi:1:008:2 -115 18 <
> f21e76c0 3570518011 C Bi:1:008:2 0 18 = 70000000 0000000a 00000000 00000000 0000
> f21e7cc0 3570518027 S Bi:1:008:2 -115 13 <
> f21e7cc0 3570518136 C Bi:1:008:2 0 13 = 55534253 0f000000 00000000 00
etc...

There's a patch which might help resolve this problem:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8bfa24727087d7252f9ecfb5fea2dfc92d797fbd

It is already present in 2.6.28-rc1, so it's worth a try.  If it does
fix things, let me know so I can submit it for a future 2.6.27.stable
release.

Alan Stern


  reply	other threads:[~2008-10-27 14:24 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 [this message]
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
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.0810271007030.4059-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).