public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Anderson <andmike@us.ibm.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
	Srihari Vijayaraghavan <harisri@internode.on.net>,
	Greg KH <greg@kroah.com>,
	USB development list <linux-usb-devel@lists.sourceforge.net>,
	SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: Fw: [BUG] USB Storage OOPS and a D state process in 2.6.10
Date: Mon, 10 Jan 2005 12:14:30 -0800	[thread overview]
Message-ID: <20050110201430.GB11967@us.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0501101212160.1334-100000@ida.rowland.org>


Alan Stern [stern@rowland.harvard.edu] wrote:
> Jan 10 20:49:08 desktop kernel: scsi113 : SCSI emulation for USB Mass Storage devices
> Jan 10 20:49:08 desktop kernel: usb-storage: device found at 113
> Jan 10 20:49:08 desktop kernel: usb-storage: waiting for device to settle before scanning
> Jan 10 20:49:12 desktop kernel: In bus_reset, srb: 0000010037d71640
> Jan 10 20:49:12 desktop kernel:   device: 0000010038e3d000
> Jan 10 20:49:12 desktop kernel:   host: 000001002b500c00
> Jan 10 20:49:12 desktop kernel:   hostdata: 000001002b549c00
> 
> This is the first indication of something funny.  I can't think how a bus
> reset would get initiated by the kernel -- that only happens after a
> timeout.  Maybe it came from a user program?

Well it can get initiated in the scsi error handler. This can be verified
by setting the logging_level (sysctl -w dev.scsi.logging_level=0x4).

You probably do not need to do this as I assume what is happening is that
with all the plug and unplug that is being initiated that a IO is in
flight when the scsi_remove_host functions is called. It looks like we
still have to decide on the removal cleanup. Currently scsi_host_cancel
being called from scsi_remove_host appears to not do anything as
scsi_forget_host removes the devices from the list it iterates over. Also
as previously mentioned by you there are races with scsi_mid canceling IOs
that might be completing.  Both of these issue where mentioned in an old
thread (link provided below), but not completely resolved.

http://marc.theaimsgroup.com/?t=109630920600005&r=1&w=2

What is needed is for the LLDD to ensure all IO sent through the LLDD's
queuecommand functions gets a scsi_done call (even a fail call). The scsi
mid applies choke points to stop IO being set to the LLDDs queuecommand,
but there can be races during a host removal (you previously mentioned
this). This would also imply that scsi mid should not be making the call
to scsi_host_cancel (which appears to not do anything anyway).


-andmike
--
Michael Anderson
andmike@us.ibm.com



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

  parent reply	other threads:[~2005-01-10 20:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-05  8:14 Fw: [BUG] USB Storage OOPS and a D state process in 2.6.10 Andrew Morton
2005-01-05 14:17 ` James Bottomley
2005-01-05 15:50 ` Alan Stern
2005-01-06 10:38   ` [linux-usb-devel] " Srihari Vijayaraghavan
2005-01-08  0:43   ` Srihari Vijayaraghavan
2005-01-08  2:11     ` Srihari Vijayaraghavan
2005-01-08  3:51       ` Alan Stern
2005-01-09  4:26         ` Srihari Vijayaraghavan
2005-01-09 17:32           ` Alan Stern
2005-01-10 10:14             ` Srihari Vijayaraghavan
2005-01-10 17:33               ` Alan Stern
2005-01-10 17:39                 ` Greg KH
2005-01-10 20:14                 ` Mike Anderson [this message]
2005-01-10 22:29                   ` [linux-usb-devel] " Alan Stern
2005-01-08  4:03     ` 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=20050110201430.GB11967@us.ibm.com \
    --to=andmike@us.ibm.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=greg@kroah.com \
    --cc=harisri@internode.on.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --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