ata: libahci: Allow reconfigure of DEVSLP register
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 2 Jul 2018 19:01:54 +0000 (12:01 -0700)
committerTejun Heo <tj@kernel.org>
Mon, 30 Jul 2018 17:33:18 +0000 (10:33 -0700)
commit11c291461b6ea8d1195a96d6bba6673a94aacebc
tree1688bf2e1a1cf0617b92e5d4966e0cdd28e7a03f
parent2dbb3ec29a6c069035857a2fc4c24e80e5dfe3cc
ata: libahci: Allow reconfigure of DEVSLP register

There are two modes in which DEVSLP can be entered. The OS initiated or
hardware autonomous.

In hardware autonomous mode, BIOS configures the AHCI controller and the
device to enable DEVSLP. But they may not be ideal for all cases. So in
this case, OS should be able to reconfigure DEVSLP register.

Currently if the DEVSLP is already enabled, we can't set again as it will
simply return. There are some systems where the firmware is setting high
DITO by default, in this case we can't modify here to correct settings.
With the default in several seconds, we are not able to transition to
DEVSLP.

This change will allow reconfiguration of devslp register if DITO is
different.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libahci.c