Bug 7533

Summary: resetting usb bus when use external usb hdd on usb 2.0
Product: Drivers Reporter: Mihail Keepa (msnkipa)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Status: REJECTED INSUFFICIENT_DATA    
Severity: high CC: akpm, bunk, stern
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.18 and later Subsystem:
Regression: --- Bisected commit-id:

Description Mihail Keepa 2006-11-15 13:40:01 UTC
Most recent kernel where this bug occur: 2.6.18.2; 2.6.19-rc5; 2.6.19-rc5-mm1
Distribution: Debian GNU/Linux "etch" (4.0)
Hardware Environment: Asus A3L laptop. P-M 2.0 GHz, 1Gb RAM, Intel 852GME 
chipset, 100 Gb HDD, DVD-CDRW
Software Environment: GCC 4.1
Problem Description: when I connect my exterlan 40Gb usb drive in canyon box I 
get:

usb 4-1: new high speed USB device using ehci_hcd and address 3
usb 4-1: configuration #1 chosen from 1 choice
SCSI subsystem initialized
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
  Vendor: IC25N040  Model: ATMR04-0          Rev: MO2O
  Type:   Direct-Access                      ANSI SCSI revision: 00
usb-storage: device scan complete
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda: Write Protect is off
sda: Mode Sense: 00 14 00 00
sda: assuming drive cache: write through
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda: Write Protect is off
sda: Mode Sense: 00 14 00 00
sda: assuming drive cache: write through
 sda: sda1 < sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13<6>usb 4-1: reset 
high speed USB device using ehci_hcd and address 3
 sda14 sda15 >
sd 0:0:0:0: Attached scsi disk sda
usb 4-1: reset high speed USB device using ehci_hcd and address 3
usb 4-1: reset high speed USB device using ehci_hcd and address 3
usb 4-1: reset high speed USB device using ehci_hcd and address 3

this "reset" block different programs to work with disk! Between two messages
past 15 - 30 sec.

Steps to reproduce: Just attach externel usb drive. If ehci_hcd is off in 
kernel configuretion all work correctly... but i haven~t got usb 2.0!
Comment 1 Andrew Morton 2006-11-15 14:01:32 UTC
On Wed, 15 Nov 2006 13:41:19 -0800
bugme-daemon@bugzilla.kernel.org wrote:

> Most recent kernel where this bug occur: 2.6.18.2; 2.6.19-rc5; 2.6.19-rc5-mm1

no....  What kernel did *not* have this bug?

Comment 2 Alan Stern 2006-11-16 07:07:23 UTC
Turn on CONFIG_USB_DEBUG and CONFIG_USB_STORAGE_DEBUG and rebuild the USB
drivers.  Then attach the dmesg log showing what happens when you turn on the
drive and those resets occur.
Comment 3 Adrian Bunk 2007-02-06 20:26:38 UTC
Please reopen this bug if:
- it is still present with kernel 2.6.20 and
- you can provide the requested information.
Comment 4 Antonio Luigi Bonfitto Junior 2007-09-11 03:56:18 UTC
Hi... i'm using Debian on a HP Pavilion ZE4900 notebook... i've just done a dist-upgrade and a upgrade... there's nothing more to upgrade here... literally... 

ahnn... just for logging, i didn't got time to compile a kernel here... but i'll do it today.... and as soon as i get the new data log i'll put it here....


and, yes, that bug started on the kernel 2.6.18.... before that version, any functions on a usb storage device was ok....




===================================================================


kundalini:/home/tony# uname -a
Linux kundalini 2.6.21-2-686 #1 SMP Wed Jul 11 03:53:02 UTC 2007 i686 GNU/Linux





kundalini:/home/tony# tail -100 /var/log/messages

Sep 11 07:24:01 kundalini kernel: usb 1-1.2: new full speed USB device using uhci_hcd and address 7
Sep 11 07:24:01 kundalini kernel: usb 1-1.2: configuration #1 chosen from 1 choice
Sep 11 07:24:01 kundalini kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Sep 11 07:24:06 kundalini kernel: scsi 2:0:0:0: Direct-Access     Motorola Phone                 PQ: 0 ANSI: 4
Sep 11 07:24:06 kundalini kernel: SCSI device sda: 1961984 512-byte hdwr sectors (1005 MB)
Sep 11 07:24:06 kundalini kernel: sda: Write Protect is off
Sep 11 07:24:06 kundalini kernel: SCSI device sda: 1961984 512-byte hdwr sectors (1005 MB)
Sep 11 07:24:06 kundalini kernel: sda: Write Protect is off
Sep 11 07:24:06 kundalini kernel:  sda: sda1
Sep 11 07:24:06 kundalini kernel: sd 2:0:0:0: Attached scsi disk sda
Sep 11 07:24:06 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:06 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:06 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:06 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:06 kundalini kernel: printk: 8 messages suppressed.
Sep 11 07:24:06 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:06 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:06 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:06 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:06 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:06 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:06 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:06 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:06 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:06 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:06 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:06 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:06 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:06 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:06 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:06 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:07 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:07 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:07 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:07 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:07 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:07 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:07 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:07 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:07 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:07 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:07 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:07 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:07 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:07 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:07 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:07 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:07 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:07 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:07 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:07 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:07 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:07 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:07 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:07 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:08 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:08 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:08 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:08 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:08 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:08 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:08 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:08 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:08 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:08 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:08 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:08 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:08 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:08 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:08 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:08 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:08 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:08 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:08 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:08 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:08 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:08 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:08 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:08 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
Sep 11 07:24:08 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x08000002
Sep 11 07:24:08 kundalini kernel: sda: Current: sense key: Medium Error
Sep 11 07:24:08 kundalini kernel:     Additional sense: No additional sense information
Sep 11 07:24:08 kundalini kernel: end_request: I/O error, dev sda, sector 1961976
-----------------------------> UNTIL HERE MY USB STORAGE WAS JUST PLUGGED AND FOUND...


-----------------------------> FROM HERE UNTIL THE END IT'S A FSCK....
Sep 11 07:25:14 kundalini kernel: usb 1-1.2: reset full speed USB device using uhci_hcd and address 7
Sep 11 07:25:44 kundalini kernel: usb 1-1.2: reset full speed USB device using uhci_hcd and address 7
Sep 11 07:26:45 kundalini last message repeated 2 times
Sep 11 07:27:45 kundalini last message repeated 2 times
Sep 11 07:27:45 kundalini kernel: sd 2:0:0:0: SCSI error: return code = 0x00050000
Sep 11 07:27:45 kundalini kernel: end_request: I/O error, dev sda, sector 78
Sep 11 07:27:45 kundalini kernel: printk: 8 messages suppressed.
Comment 5 Alan Stern 2007-09-11 08:33:36 UTC
On Tue, 11 Sep 2007 bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=7533
> 
> 
> 
> 
> 
> ------- Comment #4 from tony.ctc@gmail.com  2007-09-11 03:56 -------
> Hi... i'm using Debian on a HP Pavilion ZE4900 notebook... i've just done a
> dist-upgrade and a upgrade... there's nothing more to upgrade here...
> literally... 
> 
> ahnn... just for logging, i didn't got time to compile a kernel here... but
> i'll do it today.... and as soon as i get the new data log i'll put it
> here....
> 
> 
> and, yes, that bug started on the kernel 2.6.18.... before that version, any
> functions on a usb storage device was ok....

If you want to report a bug, please open a new bug report of your own.  
Don't just add comments to somebody else's report, especially if that 
report has already been closed.

Alan Stern