Bug 5913 - USB enclosure doesn't work
Summary: USB enclosure doesn't work
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Greg Kroah-Hartman
Depends on:
Blocks: USB
  Show dependency tree
Reported: 2006-01-17 21:02 UTC by Andrew Simmons
Modified: 2006-02-10 16:25 UTC (History)
2 users (show)

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

kernel log file with error messages (40.70 KB, text/plain)
2006-01-17 21:03 UTC, Andrew Simmons
kernel config file (56.22 KB, text/plain)
2006-01-17 21:04 UTC, Andrew Simmons
unusual_devs blacklist entry for DATASTOR unit (671 bytes, patch)
2006-01-18 07:23 UTC, Alan Stern
Details | Diff

Description Andrew Simmons 2006-01-17 21:02:37 UTC
Most recent kernel where this bug did not occur: none, just bought the enclosure
Distribution: ArchLinux
Hardware Environment: Intel 440BX MB, Celeron 1.3GHz, USB 2.0 pci card
Software Environment: udev 079, glibc 2.3.5, gcc 4.0.3, xorg 6.8.2, xfce 4.2.3
Problem Description:
When I connected my new usb enclosure to my system, I did not get a scsi device
node in /dev.  I brought the device to a different computer running windows
2000, which recognized the disk and could read and write it.  I reattached the
enclosure to my linux computer, and watched the kernel send a bunch of usb
errors to ther kernel log file.  This error also occurs in version 2.6.13 of the
kernel.  I decided to upgrade my kernel version since I needed to compile in
some debug support for this problem.

Steps to reproduce:
Plug in a PPA Int'l Model 1998
(http://www.ppa-usa.com/product_pages/enclosures/1998.htm).  I looked at the
chip this enclosure uses; it's a usb4500 from DataStor.
Comment 1 Andrew Simmons 2006-01-17 21:03:57 UTC
Created attachment 7054 [details]
kernel log file with error messages
Comment 2 Andrew Simmons 2006-01-17 21:04:56 UTC
Created attachment 7055 [details]
kernel config file
Comment 3 Alan Stern 2006-01-18 07:22:02 UTC
Looks like you've got one of those messed-up devices that tell the system they
have one more sector than they really do and then crash when the system tries to
read the nonexistent "last" sector.  The attached patch ought to help.
Comment 4 Alan Stern 2006-01-18 07:23:10 UTC
Created attachment 7065 [details]
unusual_devs blacklist entry for DATASTOR unit
Comment 5 Alan Stern 2006-01-18 07:33:59 UTC
I forgot to mention that the patch is for 2.6.16-rc1.  If you want to apply it
to 2.6.15 you'll have to edit the file by hand.  The new entry can simply be
added to the end of the file.
Comment 6 Andrew Simmons 2006-01-18 17:01:46 UTC
I used the posted patch to make my own patch for 2.6.15, and then I recompiled
my kernel.  I got the same output as before on the kernel log.
Comment 7 Alan Stern 2006-01-18 19:42:28 UTC
Not possible if you applied the patch correctly.  In particular, the lines that
say "SCSI device sda: 120103201 512-byte hdwr sectors" should now say
"120103200".  And the command that caused the original error, a READ_10 with
command bytes "28 00 07 28 a1 20 00 00 01 00", should not occur at all.  Note
that 0x0728a120 is hex for 120103200, the so-called "last" sector which actually
doesn't exist.
Comment 8 Andrew Simmons 2006-02-02 02:24:33 UTC
I editied the patch to work for my 2.5.15 kernel, and it worked perfectly.  My
distro recently moved to using an initramfs for loading boot time kernel
modules.  Before I was only using one for my gensplash theme.  Apparently I
recompiled my kernel modules a couple times and generated new initramfs images,
but I had an old image with a different name that was loading instead.  Anyway
the drive works now.  I'd like to thank everyone for their speedy reply to my
dilemma.  I was a bit worried about having possibly purchased a big paper
weight.  And I would like to know what version of the kernel will contain this fix.
Comment 9 Alan Stern 2006-02-02 06:50:45 UTC
I'll submit the fix now.  If it's not already too late in the 2.6.16 development
process then the fix will appear in the final version of 2.6.16, otherwise it
won't appear until 2.6.17-rc1.

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