From a422990e68840887e2835dbfeb3a665411d478e5 Mon Sep 17 00:00:00 2001 From: Dov Levenglick Date: Thu, 1 Jan 2015 16:17:57 +0200 Subject: scsi: ufs: wait for a longer time for fDeviceInit to clear On some device, in some cases, the initialization time is uncharacteristically long. This is within the standard which states in section 13.4.6.1.2 (Dynamic Capacity Procedural Flow): "The device initialization may take a time longer than normal initialization..." Therefore, making the loop pending on fDeviceInit to clear longer. CRs-Fixed: 776748 Change-Id: Ida491467da63ac9630d3ecc9b8f5c3e9ac5187c2 Signed-off-by: Dov Levenglick --- drivers/scsi/ufs/ufshcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 7d1e575fc8d7..35b3d7d70142 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -3987,8 +3987,8 @@ static int ufshcd_complete_dev_init(struct ufs_hba *hba) goto out; } - /* poll for max. 100 iterations for fDeviceInit flag to clear */ - for (i = 0; i < 100 && !err && flag_res; i++) { + /* poll for max. 1000 iterations for fDeviceInit flag to clear */ + for (i = 0; i < 1000 && !err && flag_res; i++) { for (retries = QUERY_REQ_RETRIES; retries > 0; retries--) { err = ufshcd_query_flag(hba, UPIU_QUERY_OPCODE_READ_FLAG, -- cgit v1.2.3