scsi: ufs: verify hba controller hce reg value
authorYaniv Gardi <ygardi@codeaurora.org>
Thu, 10 Mar 2016 15:37:08 +0000 (17:37 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 15 Mar 2016 01:04:45 +0000 (21:04 -0400)
commit596585a285a41993f26efab686e1ef20fc16a04a
tree1c0d55d8dcdf89279b3ed260eb5f921bad2a3cfd
parentf550c65b543b4d3fa55201084b1a16432b748365
scsi: ufs: verify hba controller hce reg value

Sometimes due to hw issues it takes some time to the
host controller register to update. In order to verify the register
has updated, a polling is done until its value is set.

In addition the functions ufshcd_hba_stop() and
ufshcd_wait_for_register() was updated with an additional input
parameter, indicating the timeout between reads will
be done by sleeping or spinning the cpu.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Raviv Shvili <rshvili@codeaurora.org>
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h