On Fri, 3 Oct 2003, Matthias Urlichs wrote:

> OK, here's the debug output when I remove the keychain:
> 
> Oct  3 17:41:32 linux kernel: hub 1-1:1.0: port 1, status 100, change 1, 12 Mb/s
> Oct  3 17:41:32 linux kernel: usb 1-1.1: USB disconnect, address 4
> Oct  3 17:41:32 linux kernel: usb 1-1.1: usb_disable_device nuking all URBs
> Oct  3 17:41:32 linux kernel: usb 1-1.1: unregistering interface 1-1.1:1.0
> Oct  3 17:41:32 linux kernel: bus usb: remove device 1-1.1:1.0
> Oct  3 17:41:32 linux kernel: usb-storage: storage_disconnect() called
> Oct  3 17:41:32 linux kernel: usb-storage: usb_stor_stop_transport called
> Oct  3 17:41:32 linux kernel: usb-storage: -- dissociate_dev
> Oct  3 17:41:32 linux kernel: usb-storage: -- sending exit command to thread
> Oct  3 17:41:32 linux kernel: usb-storage: *** thread awakened.
> Oct  3 17:41:32 linux kernel: usb-storage: -- exit command received
> Oct  3 17:41:32 linux kernel: usb-storage: -- usb_stor_release_resources finished
> Oct  3 17:41:32 linux kernel: drivers/usb/core/usb.c: usb_hotplug
> Oct  3 17:41:32 linux kernel: usb 1-1.1: unregistering device
> Oct  3 17:41:32 linux kernel: bus usb: remove device 1-1.1
> Oct  3 17:41:32 linux kernel: drivers/usb/core/usb.c: usb_hotplug

Hmm...  I get a lot more debugging information.  It turns out that's 
because I'm using a development tree and it has some extra debugging 
options turned on.  You can try doing the same by putting

#define DEBUG 1

in place of

#undef DEBUG

in the following files:

        lib/kobject.c, drivers/base/bus.c, drivers/base/class.c,
        drivers/base/core.c, drivers/base/driver.c.

The important part of the control flow is where storage_disconnect() in
drivers/usb/storage/usb.c calls scsi_remove_host() in
drivers/scsi/hosts.c.  That call occurs between the "dissociate_dev" and
the "sending exit command" log entries above, so we can be pretty sure
that it is getting made.

In turn, scsi_remove_host() calls class_device_unregister() and 
device_del(), and those calls should appear in the debugging log once you 
make the changes listed above.  Somewhere in there is where the problem 
lies, and it may take a little work to track it down exactly.

Alan Stern



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to