public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: "Rogério Brito" <rbrito@ime.usp.br>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	bugzilla-daemon@bugzilla.kernel.org
Subject: Re: [Bugme-new] [Bug 14020] New: Stack trace when running smartctl on an USB disk
Date: Sun, 23 Aug 2009 14:22:34 -0400	[thread overview]
Message-ID: <4A9188EA.2080903@interlog.com> (raw)
In-Reply-To: <31690E3D-43A0-484D-9D65-C0003E033D1E@ime.usp.br>

Rogério Brito wrote:
> Hi again, Alan.
> 
> (Sorry if this message seems messed up, but I am not using my regular 
> mailer right now, unfortunately).
> 
> On 2009-08-22, at 21:17, Alan Stern wrote:
> 
>> On Sat, 22 Aug 2009, Rogério Brito wrote:
>>
>>> The requested trace is attached to this message. Please let me know if
>>> you need more information.
>>
>> The trace shows that something (presumably smartctl) sends a command
>> the drive doesn't understand.  The drive then violates the USB
>> mass-storage protocol, sending an invalid response.
> 
> Right.
> 
>> The kernel waits
>> for a proper response but nothing more happens, so after 30 seconds the
>> command times out and is aborted and the drive is reset.
> 
> I'm not with the kernel sources here (so, I can't check the code), but 
> is there any option to be able to log such invalid responses when the 
> kernel gets one? Perhaps the verbose USB logging does that?
> 
>> The command
>> then gets retried, and the same thing happens again.  The retries take
>> so long that the kernel complains about smartctl being blocked for more
>> than 120 seconds -- that's the reason for the stack dump.
> 
> Right.
> 
> Geeez, Alan, is there any vendor out there that gets the USB 
> implementation according to the specs?

The fact that you invoked:
   smartctl -d usbcypress -a /dev/sda

means that the cypress chip does not comply with SAT.
To find out what commands are being sent (via the SG_IO
ioctl I presume) by smartctl please try adding:
   '-r ioctl,3'
to the above invocation.


Doug Gilbert

  parent reply	other threads:[~2009-08-23 18:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090820220740.GA767@ime.usp.br>
     [not found] ` <Pine.LNX.4.44L0.0908211003090.2912-100000@iolanthe.rowland.org>
     [not found]   ` <20090822191420.GA5572@ime.usp.br>
2009-08-22 20:33     ` [PATCH] usb: fix paths in usbmon documentation Rogério Brito
2009-08-22 21:14   ` [Bugme-new] [Bug 14020] New: Stack trace when running smartctl on an USB disk Rogério Brito
2009-08-23  0:17     ` Alan Stern
2009-08-23 15:11       ` Rogério Brito
2009-08-23 16:24         ` Alan Stern
2009-08-23 18:22         ` Douglas Gilbert [this message]
     [not found]       ` <Pine.LNX.4.44L0.0909010942590.2816-100000@iolanthe.rowland.org>
2009-09-02  7:27         ` Rogério Brito

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=4A9188EA.2080903@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=akpm@linux-foundation.org \
    --cc=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rbrito@ime.usp.br \
    --cc=stern@rowland.harvard.edu \
    /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