OSDN Git Service

scsi: ufs: fix unclocked register access
authorSubhash Jadavani <subhashj@codeaurora.org>
Tue, 16 May 2017 01:17:57 +0000 (18:17 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 7 Jun 2017 17:55:31 +0000 (10:55 -0700)
commited58ffc218c6da02122ac9e081c8169316774587
treeba6a115d0f3ce47be8d74d9051e756297c0eded9
parenteb28d0da158f7bfe2f94b3d1cb003fb7abda0c15
scsi: ufs: fix unclocked register access

When we try to update UFS driver's sysfs attribute hibern8_on_idle_delay_ms
(echo <val> > /sys/bus/platform/devices/*.ufshc/hibern8_on_idle_delay_ms)
and if auto-hibern8 is enabled, we try to update the new timeout value into
auto-hibern8 timer register without making sure the controller clocks are
enabled, this may cause the unclocked register access. So we are now
making sure that clocks are enabled and we are also making sure that
there are no transfers active on controller when we modify the auto
hibern8 timeout.

Change-Id: I603b3f405d3a69c594edd45037a2ca4535ebd1ca
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
drivers/scsi/ufs/ufshcd.c