]> asedeno.scripts.mit.edu Git - linux.git/commit
scsi: ufs: don't suspend clock scaling during clock gating
authorsubhashj@codeaurora.org <subhashj@codeaurora.org>
Sat, 4 Feb 2017 00:57:39 +0000 (16:57 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 7 Feb 2017 23:04:12 +0000 (18:04 -0500)
commit401f1e4490ee9d6e74d7514903dd01dae61488bf
tree50c71ba650c46f4d06745b84df28ae534031026d
parent6ba65588381d59ee412b7cb83752d582df731d5c
scsi: ufs: don't suspend clock scaling during clock gating

Currently we are suspending clock scaling during clock gating which doesn't
allow us to have clock gating timeout lower than clock scaling polling
window. If clock gating timeout is smaller than the clock scaling polling
window then we will mostly suspend the clock scaling before clock scaling
polling window expires and we might get stuck in same state (scaled down
or scaled up) for quite a long time. And for this reason, we have clock
gating timeout (150ms) greater than clock scaling polling window (100ms).

We would like to have aggressive clock gating timeout even lower than the
clock scaling polling window hence this change is decoupling the clock
scaling suspend/resume from clock gate/ungate. We will not suspend the
clock scaling as part of clock gating instead clock scaling context will
schedule scaling suspend work if there are no more pending transfer
requests.

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