scsi: ufs: add retries to dme_peer get and set attribute
authorYaniv Gardi <ygardi@codeaurora.org>
Mon, 1 Feb 2016 13:02:43 +0000 (15:02 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
commit64238fbd15ea58fc9e33a4fa35a9ee8a96d064f4
tree6a3c71d7eb4e77fedcafc2e4cf658d25e75a1c7e
parentf05ac2e5930506c980817a59a47f903e25f91429
scsi: ufs: add retries to dme_peer get and set attribute

The dme_peer get/set attribute commands are prone to errors, therefore
we add three retries for the UIC command sending.  Error code returned
from ufshcd_send_uic_cmd() is checked, and unless it was successful or
the retries have finished, another command will be sent.

Reviewed-by: Gilad Broner <gbroner@codeaurora.org>
Reviewed-by: Dolev Raviv <draviv@codeaurora.org>
Signed-off-by: Lee Susman <lsusman@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