Hi, >>> > It looks like the data is wrong, but I have no way of knowing what the >>> > data actually should be. Only you know that. >>> > >>> >> f31a9740 4037054141 S Bo:2:071:1 -115 31 = 55534243 0c000000 00100000 >>> >> 80000a28 00000000 00000008 00000000 000000 >>> >> f31a9740 4037054176 C Bo:2:071:1 0 31 > >>> >> f4a555c0 4037054184 S Bi:2:071:1 -115 4096 < >>> >> f4a555c0 4037108430 C Bi:2:071:1 0 4096 = eb58904d 53444f53 352e3000 >>> >> 02402e11 02000000 00f80000 3f00ff00 00200000 >>> > >>> > Is this different from what you have in the first 32 bytes of your >>> > backing file? If it is then your UDC driver is not sending the correct >>> > buffer data to the host. >>> >>> The first 32 bytes data is correct. It is the first 32 bytes content >>> of the FAT boot record. I observed further, when first SCSI_READ_10 >>> command is sent with LBA of zero, and the file_offset_tmp of >>> vfs_read() in do_read() is passed in as 0. It reaches SD driver with >>> argument of 0x2002, . Somehow, the address got passed wrongly in the >>> processing of it. In this case, 0x2000 is the FAT boot sector. >>> Shouldn't gadget driver read from MBR (master boot record) as LBA of >>> zero corresponds to MBR? >> >> The gadget driver reads from whatever you tell it to read. When you >> load g-file-storage, what parameters do you put in the modprobe >> command? >> >> Alan Stern >> > > the parameter is file=/dev/mmcblk0p1 I see a problem here. The first 32 bytes of the boot sector is correct. The rest of the bytes are 00000000, which is wrong. See the usbmon trace below. f59e13c0 2704842730 S Bo:2:007:1 -115 31 = 55534243 21000000 00800000 80000a28 00000020 00000040 00000000 000000 f59e13c0 2704842836 C Bo:2:007:1 0 31 > f319db40 2704842846 S Bi:2:007:1 -115 4096 < f59e16c0 2704842848 S Bi:2:007:1 -115 4096 < f59e14c0 2704842850 S Bi:2:007:1 -115 4096 < f59e1240 2704842851 S Bi:2:007:1 -115 4096 < f59e15c0 2704842852 S Bi:2:007:1 -115 4096 < f59e1340 2704842853 S Bi:2:007:1 -115 4096 < f59e12c0 2704842854 S Bi:2:007:1 -115 4096 < f59e1540 2704842855 S Bi:2:007:1 -115 4096 < f319db40 2705432226 C Bi:2:007:1 0 4096 = e52d424f 4f542020 42494e20 1886fc80 7c417c41 0000838a 7b410300 94b80200 f59e16c0 2705432230 C Bi:2:007:1 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 f59e14c0 2705432231 C Bi:2:007:1 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 f59e1240 2705432231 C Bi:2:007:1 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 f59e15c0 2705432232 C Bi:2:007:1 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 f59e1340 2705432233 C Bi:2:007:1 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 f59e12c0 2705432234 C Bi:2:007:1 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 f59e1540 2705432234 C Bi:2:007:1 0 4096 = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 f59e13c0 2705432244 S Bi:2:007:1 -115 13 < f59e13c0 2705438346 C Bi:2:007:1 0 13 = 55534253 21000000 00000000 00 Thanks, victor -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html