On Fri, 18 Jun 2004, Daniel Drake wrote: > Hi, > > Matthew Dharm wrote: > > This patch is required to fix up the jumpshot driver, and to supress > > the 'unneeded entry' message for another device which uses the same > > VID/PID/rev for multiple different versions of the device. > > > ===== 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); > > Could you please elaborate on this part of the patch? I'm working on a > usb-storage driver which I'll submit to you when its done - the code so far is > basically a hybrid of jumpshot and shuttle_usbat. > > One of my testers has run into problems when plugging in the device - namely, > the SCSI layer requests a READ_10 on the very last sector of the disk (or, if > our sector count is off-by-one, perhaps its asking for a read on a > non-existant sector?). It fails, retries, fails, ..., and eventually gives up > and goes on to create sda1 (the driver works fine except for the delay on > plugin...). > > Does the above patch fix the same issue on the jumpshot?
Essentially, yes. The problem is that info->sectors contains the total number of sectors on the device, but the READ CAPACITY command is supposed to return the sector number of the last sector -- which is one less than the total number of sectors. So without the patch the sd driver thinks the device has one more sector than it really does. 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
