[PATCH] scsi: ufs: check link active or not after switch to HS mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some device can successfully link and switch to HS mode. But failed
to do more. ufshcd_verify_dev_init can help to find this earlier.

Signed-off-by: Zang Leigang <zangleigang@xxxxxxxxxxxxx>

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index ffe8d8608818..eb03388fc4bd 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6373,6 +6373,14 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
 					__func__, ret);
 			goto out;
 		}
+
+		/*
+		 * Some device lost link after switch to HS mode. Check if
+		 * connect is established here.
+		 */
+		ret = ufshcd_verify_dev_init(hba);
+		if (ret)
+			goto out;
 	}
 
 	/* set the state as operational after switching to desired gear */
-- 
2.13.0




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux