OSDN Git Service

scsi: ufs: Avoid dead lock during error recovery
authorBao D. Nguyen <nguyenb@codeaurora.org>
Tue, 6 Jun 2017 00:31:53 +0000 (17:31 -0700)
committerBao D. Nguyen <nguyenb@codeaurora.org>
Tue, 6 Jun 2017 19:19:21 +0000 (12:19 -0700)
commit04147f52cce7768e45c2fa16e96f93c34b787168
tree626028a89cd8f66001bbe86c8d1be19abcaebdc3
parent2bfc0eda7e6d832f7b8b2c9cdbed6dd24cdb69d9
scsi: ufs: Avoid dead lock during error recovery

The UFS error handler work may be entered from the clock scaling context
which may have acquired the lock used to synchronize between clock scaling
and shutdown. Part of the error handler work is to send management
requests during which the same synchronization lock is acquired again.
This condition leads to a dead lock. To avoid this dead lock,
skip acquiring the synchronization lock when sending management
requests as part of the error handler.

Change-Id: I38179528868aaeb4a788a83ca8f9c458afea862a
Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
drivers/scsi/ufs/ufshcd.c