Ahhh!!!!   That worked!!!!  The patch I had didn't change US_FL_MODE_XLATE to US_FL_FIX_CAPACITY.  Thank you very very much.


On Thu, 2004-06-17 at 07:01, herton wrote:
I had the same problem when using the jumpshot to read USB enabled CF cards. It
was working in kernel 2.4, but in 2.6 kernels the same -EIO error (-5) is
returned. To make it work I had to make the following patch:

=== BEGIN
--- linux-2.6.5-60300cl/drivers/usb/storage/unusual_devs.h.orig 2004-05-19 22:44:23.572074168 -0300
+++ linux-2.6.5-60300cl/drivers/usb/storage/unusual_devs.h  2004-05-19 22:44:50.067046320 -0300
@@ -376,8 +376,8 @@
 UNUSUAL_DEV(  0x05dc, 0x0001, 0x0000, 0x0001,
 		"Lexar",
 		"Jumpshot USB CF Reader",
-		US_SC_DEVICE, US_PR_JUMPSHOT, NULL,
-		US_FL_MODE_XLATE ),
+		US_SC_SCSI, US_PR_JUMPSHOT, NULL,
+		US_FL_FIX_CAPACITY ),
 #endif
 
 /* Reported by Blake Matheny <[EMAIL PROTECTED]> */
=== END

I sent a message to Greg, he said to me to post here the patch in the mailing list.

In the patch, I changed the following parameters:
*US_SC_DEVICE to US_SC_SCSI: without this usb-storage was returning the IO error
(-EIO), becase it could't determine the access mode automatically from what I
understand (US_SC_DEVICE);
*US_FL_MODE_XLATE to US_FL_FIX_CAPACITY: US_FL_MODE_XLATE isn't used anymore in
kernel 2.6 and US_FL_FIX_CAPACITY is needed otherwise READ CAPACITY errors are
returned.

Here's the output with the device attached (Conectiva Linux 10 RC2 + hotplug):

[EMAIL PROTECTED] herton]$ cat /proc/bus/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.5-61705cl uhci_hcd
S:  Product=Intel Corp. 82801AA USB
S:  SerialNumber=0000:00:1f.2
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=05dc ProdID=0001 Rev= 0.01
S:  Manufacturer=LEXAR MEDIA
S:  Product=LEXAR MEDIA
S:  SerialNumber=1.00
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 90mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=04 Driver=usb-storage
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
[EMAIL PROTECTED] herton]$ ls /mnt/usb-storage/
device-0/  device-1/
[EMAIL PROTECTED] herton]$ ls /mnt/usb-storage/device-0/
photo650/
[EMAIL PROTECTED] herton]$ touch /mnt/usb-storage/device-0/foo.txt
[EMAIL PROTECTED] herton]$ ls -l /mnt/usb-storage/device-0/
total 4
-rwxrwxr-x  1 herton root    0 2004-06-01 10:40 foo.txt*
drwxrwxr-x  2 herton root 4096 2004-06-01 10:37 photo650/
[EMAIL PROTECTED] herton]$ rm /mnt/usb-storage/device-0/foo.txt
rm: remove arquivo comum vazio `/mnt/usb-storage/device-0/foo.txt'? y
[EMAIL PROTECTED] herton]$ ls -l /mnt/usb-storage/device-0/
total 4
drwxrwxr-x  2 herton root 4096 2004-06-01 10:37 photo650/

---
Herton
@testes.conectiva

On Wed, Jun 16, 2004 at 03:20:41PM -0400, Alan Stern wrote:
> On Tue, 15 Jun 2004, Tim Becker wrote:
> 
> > I have a Lexar Jumpshot  CF reader which worked perfectly in FC1 (kernel
> > 2.4.22) but can't for the life of me get it to work in FC2 (kernel
> > 2.6.6-1.427).  Initially when I plugged in the card reader I got this in
> > the messages file:
> > 
> > Jun 11 09:59:58 barley kernel: usb 1-1: new full speed USB device using address 2
> > Jun 11 09:59:59 barley kernel: Initializing USB Mass Storage driver...
> > Jun 11 09:59:59 barley kernel: usb-storage: probe of 1-1:1.0 failed with error -5
> > Jun 11 09:59:59 barley kernel: usbcore: registered new driver usb-storage
> > Jun 11 09:59:59 barley kernel: USB Mass Storage support registered.
> 
> Can you try compiling the 2.4 kernel with USB and usb-storage debugging 
> and posting the corresponding dmesg log?  Comparison of the two logs might 
> show something useful.
> 
> Alan Stern
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
> Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
> Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
> REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to