scsi: ufs: issue link starup 2 times if device isn't active
authorsubhashj@codeaurora.org <subhashj@codeaurora.org>
Thu, 24 Nov 2016 00:32:20 +0000 (16:32 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 29 Nov 2016 17:06:56 +0000 (12:06 -0500)
commit7caf489b99a42a9017ef3d733912aea8794677e7
tree1a5faa35ad433143f5115b4471f09dd89d336026
parentc6a6db439868c7ba5cc90d4c461d9697ec731fa1
scsi: ufs: issue link starup 2 times if device isn't active

If we issue the link startup to the device while its UniPro state is
LinkDown (and device state is sleep/power-down) then link startup
will not move the device state to Active. Device will only move to
active state if the link starup is issued when its UniPro state is
LinkUp. So in this case, we would have to issue the link startup 2
times to make sure that device moves to active state.

Reviewed-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c