Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ce8ca44 authored by Dov Levenglick's avatar Dov Levenglick
Browse files

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: default avatarDov Levenglick <dovl@codeaurora.org>
parent 7e33f155
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 *
 * This code is based on drivers/scsi/ufs/ufshcd.c
 * Copyright (C) 2011-2013 Samsung India Software Operations
 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 *
 * Authors:
 *	Santosh Yaraganavi <santosh.sy@samsung.com>
@@ -3975,8 +3975,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,