From: Paolo Ornati <ornati@fastwebnet.it>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb-devel@lists.sourceforge.net,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: spontaneous disconnect with "usb-storage: implement autosuspend"
Date: Tue, 14 Aug 2007 13:15:57 +0200 [thread overview]
Message-ID: <20070814131557.5653d991@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 3848 bytes --]
Hi,
with "CONFIG_USB_SUSPEND=y", since commit:
8dfe4b14869fd185ca25ee88b02ada58a3005eaf
usb-storage: implement autosuspend
This patch (as930) implements autosuspend for usb-storage. It is
adapted from a patch by Oliver Neukum. Autosuspend is allowed except
during LUN scanning, resets, and command execution.
my USB photo-camera gets automagically disconnected before I can do
anything with it ;)
Relevant dmesg (what I get by just attaching it):
[ 70.722898] scsi 8:0:0:0: Direct-Access HP PHOTOSMART E317 A001 PQ: 0 ANSI: 0 CCS
[ 70.727880] sd 8:0:0:0: [sdb] 488448 512-byte hardware sectors (250 MB)
[ 70.730876] sd 8:0:0:0: [sdb] Write Protect is off
[ 70.730879] sd 8:0:0:0: [sdb] Mode Sense: 00 46 00 00
[ 70.730882] sd 8:0:0:0: [sdb] Assuming drive cache: write through
[ 70.742874] sd 8:0:0:0: [sdb] 488448 512-byte hardware sectors (250 MB)
[ 70.745873] sd 8:0:0:0: [sdb] Write Protect is off
[ 70.745876] sd 8:0:0:0: [sdb] Mode Sense: 00 46 00 00
[ 70.745878] sd 8:0:0:0: [sdb] Assuming drive cache: write through
[ 70.745882] sdb: sdb1
[ 70.755192] sd 8:0:0:0: [sdb] Attached SCSI removable disk
[ 70.755446] sd 8:0:0:0: Attached scsi generic sg3 type 0
[ 70.755657] usb-storage: device scan complete
[ 73.071490] usb 6-2: usb auto-suspend
[ 73.321445] hub 6-0:1.0: state 7 ports 2 chg 0000 evt 0004
[ 73.321453] uhci_hcd 0000:00:1d.1: port 2 portsc 108a,00
[ 73.321462] hub 6-0:1.0: port 2, status 0100, change 0003, 12 Mb/s
[ 73.321465] usb 6-2: USB disconnect, address 2
[ 73.321467] usb 6-2: unregistering device
The relevant differences of dmesg between pre and post "autosuspend"
patch:
@@ -1,4 +1,4 @@
- Linux version 2.6.22-gb0e2a705 ...
+ Linux version 2.6.22-g8dfe4b14 ...
@@ -606,6 +606,12 @@
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ehci_hcd 0000:00:1a.7: suspend root hub
+ hub 4-0:1.0: hub_suspend
+ usb usb4: bus auto-suspend
+ usb usb4: suspend_rh
+ hub 5-0:1.0: hub_suspend
+ usb usb5: bus auto-suspend
+ usb usb5: suspend_rh
hub 6-0:1.0: hub_suspend
usb usb6: bus auto-suspend
usb usb6: suspend_rh
@@ -618,12 +624,6 @@
hub 3-0:1.0: hub_suspend
usb usb3: bus auto-suspend
usb usb3: suspend_rh
- hub 4-0:1.0: hub_suspend
- usb usb4: bus auto-suspend
- usb usb4: suspend_rh
- hub 5-0:1.0: hub_suspend
- usb usb5: bus auto-suspend
- usb usb5: suspend_rh
usb usb3: uevent
usb 3-0:1.0: uevent
usb 3-0:1.0: uevent
@@ -686,6 +686,7 @@
usb-storage 6-2:1.0: usb_probe_interface - got id
scsi8 : SCSI emulation for USB Mass Storage devices
drivers/usb/core/inode.c: creating file '002'
+ hub 6-0:1.0: state 7 ports 2 chg 0000 evt 0004
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
hub 2-0:1.0: hub_suspend
@@ -704,3 +705,22 @@
sd 8:0:0:0: [sdb] Attached SCSI removable disk
sd 8:0:0:0: Attached scsi generic sg3 type 0
usb-storage: device scan complete
+ usb 6-2: usb auto-suspend
+ hub 6-0:1.0: state 7 ports 2 chg 0000 evt 0004
+ uhci_hcd 0000:00:1d.1: port 2 portsc 108a,00
+ hub 6-0:1.0: port 2, status 0100, change 0003, 12 Mb/s
+ usb 6-2: USB disconnect, address 2
+ usb 6-2: unregistering device
+ usb 6-2: usb_disable_device nuking all URBs
+ usb 6-2: unregistering interface 6-2:1.0
+ usb_endpoint usbdev6.2_ep82: ep_device_release called for usbdev6.2_ep82
+ usb_endpoint usbdev6.2_ep03: ep_device_release called for usbdev6.2_ep03
+ usb 6-2:1.0: uevent
+ usb 6-2:1.0: uevent
+ usb_endpoint usbdev6.2_ep00: ep_device_release called for usbdev6.2_ep00
+ usb 6-2: uevent
+ hub 6-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100
+ usb usb6: suspend_rh (auto-stop)
+ hub 6-0:1.0: hub_suspend
+ usb usb6: bus auto-suspend
+ usb usb6: suspend_rh
config for 2.6.22-gb0e2a705 attached
--
Paolo Ornati
Linux 2.6.23-rc3 on x86_64
[-- Attachment #2: config-usb.gz --]
[-- Type: application/x-gzip, Size: 8641 bytes --]
next reply other threads:[~2007-08-14 11:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-14 11:15 Paolo Ornati [this message]
2007-08-14 13:30 ` [linux-usb-devel] spontaneous disconnect with "usb-storage: implement autosuspend" Oliver Neukum
2007-08-14 13:47 ` Paolo Ornati
2007-08-14 15:46 ` Oliver Neukum
2007-08-14 16:38 ` Paolo Ornati
2007-08-14 18:33 ` Oliver Neukum
2007-08-14 19:02 ` Paolo Ornati
2007-09-12 22:14 ` Mark Lord
2007-09-12 23:40 ` Greg KH
2007-09-13 2:29 ` Mark Lord
2007-09-13 2:33 ` Mark Lord
2007-09-13 9:40 ` Greg KH
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=20070814131557.5653d991@localhost \
--to=ornati@fastwebnet.it \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.