On Thu, 2004-06-17 at 14:03, Alan Stern wrote:
On Thu, 17 Jun 2004, Tim Becker wrote: > 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 Thanks for reporting this. It turns out that the FIX_CAPACITY flag shouldn't have to be there -- it's a bug in the jumpshot driver. Oddly enough, exactly the same bug was present and was fixed in the datafab driver, which is extremely similar to the jumpshot version. Also, it's clear that Lexar is up to the same sort of tricks as Casio. Although your devices definitely need the US_SC_SCSI override in the unusual_devs entry, I've got an old email from someone with an otherwise identical device which _doesn't_ need the override. Anyway, the patch below (which applies to a vanilla 2.6 kernel) should fix things up. Let me know if it works okay. Alan Stern ===== drivers/usb/storage/jumpshot.c 1.34 vs edited ===== --- 1.34/drivers/usb/storage/jumpshot.c Wed May 19 13:42:23 2004 +++ edited/drivers/usb/storage/jumpshot.c Thu Jun 17 15:51:10 2004 @@ -471,7 +471,7 @@ // build the reply // - ((u32 *) ptr)[0] = cpu_to_be32(info->sectors); + ((u32 *) ptr)[0] = cpu_to_be32(info->sectors - 1); ((u32 *) ptr)[1] = cpu_to_be32(info->ssize); usb_stor_set_xfer_buf(ptr, 8, srb); ===== drivers/usb/storage/unusual_devs.h 1.131 vs edited ===== --- 1.131/drivers/usb/storage/unusual_devs.h Tue Jun 1 08:46:58 2004 +++ edited/drivers/usb/storage/unusual_devs.h Thu Jun 17 15:57:07 2004 @@ -402,8 +402,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_NEED_OVERRIDE | US_FL_MODE_XLATE ), #endif /* Reported by Blake Matheny <[EMAIL PROTECTED]> */ ------------------------------------------------------- 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
-- Tim Becker Principal Consultant Six Degrees Consulting !M$ Be careful what you wish for, you just might get it. |
signature.asc
Description: This is a digitally signed message part
