Bug 4590 - usb external enclosure box failure
usb external enclosure box failure
Status: RESOLVED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: USB
i386 Linux
: P2 normal
Assigned To: Greg Kroah-Hartman
:
Depends on:
Blocks: USB
  Show dependency treegraph
 
Reported: 2005-05-06 14:30 UTC by Imre Péntek
Modified: 2006-02-14 16:44 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.9
Tree: Mainline
Regression: ---


Attachments
unusual_devs entry (627 bytes, patch)
2005-05-17 11:50 UTC, Alan Stern
Details | Diff

Description Imre Péntek 2005-05-06 14:30:12 UTC
Distribution: UHU-Linux 1.2 http://www.uhulinux.hu/
Hardware Environment: Albacomp laptop, athlon 64 3000+, usb 2.0
Software Environment: Linux 2.6.9, hotplug, X don't affect
Problem Description: I have a box identified by lsusb as ID 04cf:8818 Myson
Century, Inc. I put a winchester into it, switch it on. The device switches on
correctly (actally it works fine under Windows XP on the same hardware), but
when I plug it in it only wastes processor cycles (top 98% wa), I recopiled my
kernel with usb and usb mass storage verbose logging enabled, dmesg says:

usb 1-1: new high speed USB device using address 2
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: Maxtor 6  Model: Y060L0            Rev: YAR4
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 120103200 512-byte hdwr sectors (61493 MB)
sda: assuming drive cache: write through
 sda: sda1 sda2
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
USB Mass Storage device found at 2
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
SCSI error : <0 0 0 0> return code = 0x70000
end_request: I/O error, dev sda, sector 71
Buffer I/O error on device sda1, logical block 4
SCSI error : <0 0 0 0> return code = 0x70000
end_request: I/O error, dev sda, sector 73
Buffer I/O error on device sda1, logical block 5
SCSI error : <0 0 0 0> return code = 0x70000
end_request: I/O error, dev sda, sector 75
Buffer I/O error on device sda1, logical block 6
usb 1-1: USB disconnect, address 2
SCSI error : <0 0 0 0> return code = 0x70000
end_request: I/O error, dev sda, sector 77
Buffer I/O error on device sda1, logical block 7
scsi0 (0:0): rejecting I/O to dead device
Buffer I/O error on device sda1, logical block 4
Buffer I/O error on device sda1, logical block 5
Buffer I/O error on device sda1, logical block 6
Buffer I/O error on device sda1, logical block 7
scsi0 (0:0): rejecting I/O to dead device
Buffer I/O error on device sda1, logical block 0
Buffer I/O error on device sda1, logical block 1
Buffer I/O error on device sda1, logical block 2
Buffer I/O error on device sda1, logical block 3


Steps to reproduce:
written above. reproducible. On my machine this bug is always reproducible.
Comment 1 Imre Péntek 2005-05-08 10:07:48 UTC
I replaced my previous kernel with 2.6.11.8, and tried the same using perfectly
the same hardware... The result is very similar.
Comment 2 Imre Péntek 2005-05-10 16:46:44 UTC
the error is similar using Ubuntu Linux 5.04 too.
Comment 3 Imre Péntek 2005-05-10 16:52:28 UTC
just one remark for my note at 2005-05-08 10:07
At this time I used this unpatched kernel source:
http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.8.tar.bz2
Comment 4 Alan Stern 2005-05-11 18:37:08 UTC
Your dmesg output does not include the USB Mass Storage verbose debugging
output.  Maybe you didn't install the version with debugging enabled.  Can you
do this again and capture all the debugging information?
Comment 5 Imre Péntek 2005-05-13 08:20:58 UTC
okay, I'll do it next week.
Comment 6 Imre Péntek 2005-05-16 15:11:28 UTC
I used this script to initialize a minimal Linux (now 2.6.11.9) (init=/bin/bash,
without initrd):
#!/bin/bash

export PATH=/bin:/sbin:/usr/bin:/usr/sbin
mount / -o remount,rw
mount -t proc proc /proc
mount -t sysfs sysfs /sys
modprobe scsi_mod
modprobe scsi_debug
modprobe usbcore
modprobe usb-storage
loadkeys hu

udev
udevd
udevinit
udevstart
syslogd
klogd
dbus-daemon-1 --system
hald
##########
But maybe I was wrong, and it can't notice if this usb device is attached.
Comment 7 Alan Stern 2005-05-17 06:49:40 UTC
Where's your USB Mass Storage debugging output?
Comment 8 Imre Péntek 2005-05-17 07:28:53 UTC
In this configuration there aren't any usb messages, seems like kernel can't
notice if I plug this device. Maybe I shouldn't use modules?
Comment 9 Imre Péntek 2005-05-17 08:01:52 UTC
Now I recompiled the kernel, I used somewhere <Y> instead of <M> and worked
properly. Here is the full dmesg output, this was after I unplugged the usb device:
http://people.inf.elte.hu/pentek_i/dmesg/dmesg_2.6.11.9.txt
I don't have any (other) scsi devices, but somehow this usb device was sdb (not
a big bug, but be aware)
I hope this one will be helpful.
Comment 10 Alan Stern 2005-05-17 11:50:47 UTC
Created attachment 5066 [details]
unusual_devs entry

This patch may help.  It's meant for 2.6.12-rc4; it won't work with 2.6.11.

If you don't feel like upgrading just now, you could instead try doing

    rmmod ehci-hcd

and running at full speed instead of high speed.  Probably your drive will work
okay at the lower speed.
Comment 11 Imre Péntek 2005-05-17 12:14:13 UTC
My device works well when ehci_hcd unloaded. thanks for your kind help.
But anyways I want to try this patch just for fun :)
As I suppose I will need this:
http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.12-rc4.bz2
And the patch posted by you. But what kernel source to use?
Comment 12 Alan Stern 2005-05-17 13:40:34 UTC
That's right.  The patch-2.6.12-rc4 file applies to the 2.6.11 kernel source.
Comment 13 Heitzso 2005-05-30 09:38:17 UTC
Is this bug related to the USB2 storage bug
flagged in kernel bug report 4057
http://bugme.osdl.org/show_bug.cgi?id=4057

And, if so, does .12-rc5 include the patch
flagged on this page?  I've got to get my
3 USB2 300G drives working (ubuntu) to
backup 10G and 12G DV files and am getting
beaten to a pulp by filesystem corruption
problems due to USB2 problems when moving
these big files back and forth.  

(3 expensive silverriver usb2 enclosures, 
3 brand new WD 300G caviar drives).    

Thanks.
Comment 14 Alan Stern 2005-05-31 06:59:35 UTC
Entry 4057 actually contains about 5 different bug reports, and for all I know
they are all caused by different bugs.  There's no way to tell if any of them is
the same as this one.

The patch on this page is _not_ included in 2.6.12-rc5 because it has never been
tested.  Even if it was tested and did work correctly, it won't help fix any of
the problems listed for that other bug report.
Comment 15 Greg Kroah-Hartman 2006-02-14 16:44:35 UTC
As it looks like this is completed, I'm closing this bug.

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