[U-Boot] usb_test_unit_ready called every block read - performance

Marek Vasut marex at denx.de
Tue Jul 31 00:54:12 CEST 2012


Dear Jim Shimer,

> While tuning ext2load, we found that usb_test_unit_ready was being called
> every block read.  We compared the usb block storage to the scsi block
> storage cmd_scsi.c, and found that the scsi device was only calling its
> scsi_setup_test_unit_ready() during scsi_can.  It appears that
> usb_test_unit_ready() really only needs to be called once during
> usb_stor_scan(), via usb_stor_get_info().   Is there a particular reason
> usb_test_unit_ready is called for every block read, or do you think its ok
> to only call during usb_stor_scan()?  We're finding this speeds up ext2load
> quite a bit.

Could it be because the USB is actually quite slower than SCSI and the device 
might get congested? It seems the code was there ever since (I can't seem to 
find the origin of it) and we might actually want to try if this doesn't break 
some usb 1.x things.

> Regards,
> Jim

Best regards,
Marek Vasut


More information about the U-Boot mailing list