scsi: ufs: avoid exception event handler racing with PM callbacks
authorYaniv Gardi <ygardi@codeaurora.org>
Mon, 1 Feb 2016 13:02:42 +0000 (15:02 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
commitf05ac2e5930506c980817a59a47f903e25f91429
treef78b05aa4cb1e15ae77391876c59bb1967104bca
parente5ad406cecc3a13bd1e6242d3e24aaeae32ff972
scsi: ufs: avoid exception event handler racing with PM callbacks

If device raises the exception event in the response to the commands
sent during the runtime/system PM callbacks, exception event handler
might run in parallel with PM callbacks and may see unclocked register
accesses. This change fixes this issue by not scheduling the exception
event handler while PM callbacks are running.

Reviewed-by: Gilad Broner <gbroner@codeaurora.org>
Reviewed-by: Dolev Raviv <draviv@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@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