From 6861881de8da6942a267917555214b37c1063b5e Mon Sep 17 00:00:00 2001
From: Rui Miguel Silva <rui.silva@linaro.org>
Date: Fri, 4 Mar 2022 15:56:09 +0000
Subject: [PATCH] arm: corstone1000: Fix unrecognized filesystem type

Add a delay before checking USB sticks status

Some USB sticks are not recognized by the USB bus, just add a
delay before checking status.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Upstream-Status: Pending [Not submitted to upstream yet]
---
 common/usb_storage.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/usb_storage.c b/common/usb_storage.c
index ac331f1c1b0..17f8a56e971 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -782,6 +782,9 @@ static int usb_stor_BBB_transport(struct scsi_cmd *srb, struct us_data *us)
 st:
 	retry = 0;
 again:
+	if (srb->cmd[0] == SCSI_TST_U_RDY)
+		mdelay(100);
+
 	debug("STATUS phase\n");
 	result = usb_bulk_msg(us->pusb_dev, pipein, csw, UMASS_BBB_CSW_SIZE,
 				&actlen, USB_CNTL_TIMEOUT*5);
