On Sun, 27 May 2007, Vincent Bernat wrote: > Hi ! > > READ CAPACITY command seems to return fuzzy value when I plug my Sony > Ericsson V630i (rebranded K610i by Vodaphone). Here is an excerpt of > dmesg : > > May 27 13:18:57 neo kernel: [236303.330175] SCSI device sdb: 466907 512-byte > hdwr sectors (239 MB)
> Here is the output of fdisk -l -u > > > Disk /dev/sdb: 239 MB, 239056384 bytes > 16 heads, 32 sectors/track, 911 cylinders, total 466907 sectors > Units = sectors of 1 * 512 = 512 bytes > > Device Boot Start End Blocks Id System > /dev/sdb1 * 37 466943 233453+ 6 FAT16 > > I have noticed that 466907 + 37 = 466944 which should be the correct > value. Therefore, I have added a flag US_FL_REPORT_P1_CAPACITY that just > adds 37 to capacity in sd.c. Well, that does not work either and I don't > know why. dmesg says : > > May 27 17:55:20 neo kernel: [ 96.382982] SCSI device sdb: 466944 512-byte > hdwr sectors (239 MB) > May 27 17:55:20 neo kernel: [ 96.505954] end_request: I/O error, dev sdb, > sector 466941 > May 27 17:55:20 neo kernel: [ 96.512064] Buffer I/O error on device sdb1, > logical block 466904 > May 27 17:55:20 neo kernel: [ 96.524950] end_request: I/O error, dev sdb, > sector 466942 > > And after that, I think that my phone is not able to cope any request. > To check that the size reported by READ CAPACITY is the first partition > size, I have started with a clean 2.6.21 kernel. I have plugged my phone > and here is the partition I have created : > > Disk /dev/sdb: 239 MB, 239056384 bytes > 16 heads, 32 sectors/track, 911 cylinders, total 466907 sectors > Units = sectors of 1 * 512 = 512 bytes > > Device Boot Start End Blocks Id System > /dev/sdb1 32 465919 232944 83 Linux > > Now, I unplug and replug the phone. And here is what I get : > > May 27 18:19:05 neo kernel: [ 1109.211680] SCSI device sdb: 465888 512-byte > hdwr sectors (239 MB) > Disk /dev/sdb: 238 MB, 238534656 bytes > 16 heads, 32 sectors/track, 909 cylinders, total 465888 sectors > Units = sectors of 1 * 512 = 512 bytes > > Device Boot Start End Blocks Id System > /dev/sdb1 32 465919 232944 83 Linux > > So it seems that the phone really returns the 465919 - 32 for READ > CAPACITY. Therefore, I don't understand why my change does not work. Any > idea ? It looks like the phone's firmware is broken. Does it work with other non-Linux computer systems? Can you get a firmware update from the manufacturer? > How could I debug this ? You already have. > Maybe the phone builds an erronous > partition table ? No, it didn't modify the partition table you created. But it does seem to change its READ CAPACITY result based on the information in the partition table. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel