Bug 5532 - USB mulltiple copying problem
Summary: USB mulltiple copying problem
Status: REJECTED INVALID
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Alan Stern
URL:
Keywords:
Depends on:
Blocks: USB
  Show dependency tree
 
Reported: 2005-11-01 13:53 UTC by Pavel Kysilka
Modified: 2005-11-17 10:32 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.14
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
lsmod, lsusb,kernel.log,lspci,kernel_config (50.00 KB, application/octet-stream)
2005-11-01 13:58 UTC, Pavel Kysilka
Details
ehci diagnostic patch (471 bytes, patch)
2005-11-06 08:16 UTC, David Brownell
Details | Diff
dd after ehci diagnostic patch (99.86 KB, application/octet-stream)
2005-11-06 14:50 UTC, Pavel Kysilka
Details
dd after patch - debug - right dd command (23.56 KB, application/octet-stream)
2005-11-06 16:17 UTC, Pavel Kysilka
Details
random test log (630.00 KB, application/octet-stream)
2005-11-15 09:50 UTC, Pavel Kysilka
Details

Description Pavel Kysilka 2005-11-01 13:53:23 UTC
Most recent kernel where this bug did not occur:
Distribution: Debian testing
Hardware Environment: Intel ICH5 USB, Toshiba 128MB Memory Flash, Plextor CDRW
PX-S88TU
Software Environment:
Problem Description:
I found problem with mulltiple copying over usb. Mulltiple copying from usb
devices crashed after reseting usb speed.

Nov  1 22:37:17 prog3 kernel: usb-storage: usb_reset_device returns 0
Nov  1 22:37:17 prog3 kernel: usb-storage: scsi command aborted
Nov  1 22:37:17 prog3 kernel: usb-storage: *** thread sleeping.
Nov  1 22:37:17 prog3 kernel: scsi: Device offlined - not ready after error
recovery: host 0 channel 0 id 0 lun 0
Nov  1 22:37:17 prog3 kernel: sr 0:0:0:0: SCSI error: return code = 0x50000
Nov  1 22:37:17 prog3 kernel: end_request: I/O error, dev sr0, sector 27584
Nov  1 22:37:17 prog3 kernel: Buffer I/O error on device sr0, logical block 6896
Nov  1 22:37:17 prog3 kernel: scsi0 (0:0): rejecting I/O to offline device
Nov  1 22:37:17 prog3 kernel: Buffer I/O error on device sr0, logical block 6897
Nov  1 22:37:17 prog3 kernel: Buffer I/O error on device sr0, logical block 6898
Nov  1 22:37:17 prog3 kernel: Buffer I/O error on device sr0, logical block 6899
Nov  1 22:37:17 prog3 kernel: Buffer I/O error on device sr0, logical block 6900
Nov  1 22:37:17 prog3 kernel: Buffer I/O error on device sr0, logical block 6901
Nov  1 22:37:17 prog3 kernel: Buffer I/O error on device sr0, logical block 6902
Nov  1 22:37:17 prog3 kernel: Buffer I/O error on device sr0, logical block 6903
Nov  1 22:37:17 prog3 kernel: Buffer I/O error on device sr0, logical block 6904
Nov  1 22:37:17 prog3 kernel: Buffer I/O error on device sr0, logical block 6905
Nov  1 22:37:17 prog3 kernel: scsi0 (0:0): rejecting I/O to offline device
Nov  1 22:37:17 prog3 last message repeated 2 times
Nov  1 22:37:17 prog3 kernel: sr 0:0:0:0: SCSI error: return code = 0x10000
Nov  1 22:37:17 prog3 kernel: end_request: I/O error, dev sr0, sector 27824
Nov  1 22:37:17 prog3 kernel: scsi0 (0:0): rejecting I/O to offline device
Nov  1 22:37:17 prog3 kernel: scsi0 (0:0): rejecting I/O to offline device

Cannot copy parael from flash medium and usb-cdrom. Copying from cdrom crashed.
Cannot possible mount again the cdrom.
Copying only from cdrom or only from flash is working.


Steps to reproduce:
0) mount cdrom and flash medium
1) tty1: dd if=/dev/sr0 of=/dev/zero
2) tty2: dd if=/dev/sda1 of=/dev/zero

Cdrom copying crashed.

Another information in attachment.
Comment 1 Pavel Kysilka 2005-11-01 13:58:16 UTC
Created attachment 6442 [details]
lsmod, lsusb,kernel.log,lspci,kernel_config

system information and kernel.log (3MB - usb-debug )
Comment 2 Alan Stern 2005-11-05 19:01:15 UTC
The errors in your logfile for the flash memory device are typical of a bad USB connection: a cable or 
connector not capable of handling high-speed USB signals.  The CD drive seemed to be okay all the 
until the end of the log -- I can't tell what happened then.

Sometimes these problems are caused by vendors who use substandard cables to attach the USB ports 
on the motherboard with the USB connectors in the computer case.  Maybe in your system the 
connectors don't provide enough protection against crosstalk between adjacent ports.

What happens if you do "rmmod ehci-hcd" before running your test?  That will force everything to go at 
full speed instead of high speed, which should make the USB bus more resistant to noise.
Comment 3 David Brownell 2005-11-06 08:16:37 UTC
Created attachment 6484 [details]
ehci diagnostic patch

Can you try the attached patch and tell me if it fires when this
bad stuff is happening?
Comment 4 Pavel Kysilka 2005-11-06 13:17:37 UTC
I retest mulltiple copying with "rmmod ehci-hcd" ==> no errors. Mulltiple
copying OK.

I make next test:

goldenfish@prog3:~/kernel_patch/usb_2.6.14_err$ lsmod | grep hci
ehci_hcd               51208  0 
uhci_hcd               34188  0 

prog3:/home/goldenfish/kernel_patch/usb_2.6.14_err# dd if=/dev/sr0 of=/dev/zero
;dd if=/dev/sda1 of=/dev/zero;
1323264+0 records in
1323264+0 records out
677511168 bytes transferred in 251.586729 seconds (2692953 bytes/sec)
246256+0 records in
246256+0 records out
126083072 bytes transferred in 18.874895 seconds (6679935 bytes/sec)
prog3:/home/goldenfish/kernel_patch/usb_2.6.14_err#

connection schema for all testing:
Intel 865GBF motherboard
|_ flash memory
|_ cable
     |_ USB CDRW
Booth device are USB2 cappable.

I retest patch in next hours.
Comment 5 Pavel Kysilka 2005-11-06 14:48:32 UTC
I was tested ehci diagnostic patch.

cdrom copying with dd - OK. no errors.
flash memoty copying with dd - KO. process is cycled.
this eat 100% CPU. no errors in console.
I killed this process.

prog3:/home/goldenfish/kernel_patch/usb_2.6.14_err# date
Sun Nov  6 23:15:20 CET 2005
prog3:/home/goldenfish/kernel_patch/usb_2.6.14_err# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2             11535376  10729948    219460  98% /
tmpfs                   517248         4    517244   1% /dev/shm
/dev/scd0               661632    661632         0 100% /cdrom
/dev/sda1               122870    101320     21550  83% /floppy
prog3:/home/goldenfish/kernel_patch/usb_2.6.14_err# dd if=/dev/sda1 if=/dev/zero
50545495+0 records in
50545494+0 records out
25879292928 bytes transferred in 1253.973368 seconds (20637833 bytes/sec)

prog3:/home/goldenfish/kernel_patch/usb_2.6.14_err# date
Sun Nov  6 23:37:32 CET 2005
prog3:/home/goldenfish/kernel_patch/usb_2.6.14_err#

kernel log in attachment(17MB of log bzipped).
Comment 6 Pavel Kysilka 2005-11-06 14:50:52 UTC
Created attachment 6485 [details]
dd after ehci diagnostic patch

100kB bzip2. 17MB of data.
Comment 7 Pavel Kysilka 2005-11-06 15:53:26 UTC
Ooops. My fault.

dd if=/dev/sda1 if=/dev/zero
              ^^^^^^^^^^^^^^^^

I retest your patch once time.
Comment 8 Pavel Kysilka 2005-11-06 16:17:49 UTC
Created attachment 6486 [details]
dd after patch - debug - right dd command

there is kernel log from testing dd. error persist.
i was used right dd command. sorry for previous error.
Comment 9 Alan Stern 2005-11-07 09:01:47 UTC
Whatever went wrong in the last test affected both devices at the same time. 
The flash device was able to recover and continue its transfer; the CD drive
never recovered.  The diagnostic patch did not get triggered.
Comment 10 Greg Kroah-Hartman 2005-11-14 21:30:52 UTC
Reassigning to alan, as he seems to have it under control, thanks alan :)
Comment 11 Alan Stern 2005-11-15 07:19:14 UTC
Can you try plugging the flash memory device into different USB ports?  Maybe
some ports work better than others.
Comment 12 Pavel Kysilka 2005-11-15 09:50:51 UTC
Created attachment 6592 [details]
random test log

Hi,
i was tested today random pluging of usb devices and mulltiple copy.
Error is independent on the usb device(cdrom of flash). I got also any error
with flash memory.
Any copying without error. Any copying with error.
See the log. 
Files: - today_kernel.log - today kernel.log - 99MB 
Another file - test copying with lsusb. - small files
bzip2 attachment has 630 kB size.
Tested with 2.6.15-rc1 kernel/2.6.14 .
Comment 13 Alan Stern 2005-11-15 11:48:06 UTC
I think your EHCI controller is faulty.  You can try buying an add-on PCI USB
controller card.
Comment 14 Pavel Kysilka 2005-11-17 10:28:09 UTC
OK. Close this bug, please. I retest cable connection and this bug in next days.
I will be send in next days notice to Intel company about this bug, if needed.

link with info about my motherboard:

http://www.intel.com/products/motherboard/d865gbf/index.htm

thanks for help.
Comment 15 Greg Kroah-Hartman 2005-11-17 10:32:01 UTC
Ok, closed.

Note You need to log in before you can comment on or make changes to this bug.