]> git.dujemihanovic.xyz Git - u-boot.git/commit
usb: storage: Only clear READY flag on error
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Sat, 5 Oct 2019 17:18:38 +0000 (19:18 +0200)
committerMarek Vasut <marek.vasut+renesas@gmail.com>
Thu, 31 Oct 2019 11:13:40 +0000 (12:13 +0100)
commitda3d1c499fbb7cfe1c1dc1bc47699a2f30df4384
tree0a444d2d03b34a97440efd236450e3979da19972
parent7d6fd7f0ba71cd93d94079132f958d9630f27a89
usb: storage: Only clear READY flag on error

Clear the USB_READY flag in the storage driver only in case there
is an error, otherwise usb_stor_BBB_transport() waits 5 mS before
doing anything every single time.

This is because the USB_READY flag is only ever set in
usb_test_unit_ready(), which is called only upon storage device
probe, not between each and every request. However, the device
cannot move out of USB_READY state once it was initialized.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
common/usb_storage.c