Hi, Heyi Just I said before, it's just an experience value.
The transfer length limitation only comes from real h/w and the largest transfer length shipped by SCSI Read10/Write10 cmd. A SCSI Read10/Write10 cmd supports max 0xFFFF blocks. But according to our experience, some h/w devices don't have such big internal buffer to support read/write 0xFFFF blocks once. That's why we introduced a back-off algorithm in ScsiDiskDxe to handle such case. As for Usb cdrom/bot devices, we just directly use such a macro to specify the max transfer length. If you met real problem, please tell me the device model/serial no, then we can modify this value accordingly. Thanks Feng -----Original Message----- From: edk2-devel [mailto:[email protected]] On Behalf Of Heyi Guo Sent: Wednesday, January 18, 2017 2:41 PM To: Tian, Feng <[email protected]>; [email protected] Cc: Zeng, Star <[email protected]> Subject: Re: [edk2] Why is USB_BOOT_IO_BLOCKS set to 128? Hi Feng, Digging in the code history, I found the original value of USB_BOOT_IO_BLOCKS was 64, but it was changed to be 128 by the commit 41e8ff2. So could you help to explain my questions as below? 1. What was the exact reason to change this value? 2. And for the comment in the code, it says "Max carried size is 512B * 128 = 64KB", but we see that some USB CDROM has block size of 2KB. So do we mean something for 64KB max size? 3. From USB specification perspective, is there any limit for transfer length, or the device should be able to transfer arbitrary length? commit 41e8ff2781f3ca14f73ef5f39e781ccba8cb373d Author: yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> Date: Mon Oct 8 06:14:13 2007 +0000 Fixed unexpected timeout in Usb MassStorage Driver. Fixed unexpected timeout in Uhci/Ehci driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4038 6f19259b-4bc3-4df7-8a09-765794883524 Thanks and regards, Heyi 在 10/19/2016 10:10 AM, Tian, Feng 写道: > It's just an experience value and has been here about 10 years... > > Which usb brand/model name do you have problem on? > > Thanks > Feng > > -----Original Message----- > From: Heyi Guo [mailto:[email protected]] > Sent: Wednesday, October 19, 2016 9:57 AM > To: [email protected] > Cc: Tian, Feng <[email protected]>; Zeng, Star <[email protected]> > Subject: [edk2] Why is USB_BOOT_IO_BLOCKS set to 128? > > Dear experts, > > Could anyone help to explain why USB_BOOT_IO_BLOCKS in > MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h is set to 128? > > We found on some platforms this value may cause USB boot failure and > *64* blocks will make them work. Though we have not got the final root cause, > it will be really helpful if you can tell the reason of setting it to 128 and > possible root cause for such issue. > > Thanks and regards, > > Heyi > _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

