ahci: Add and use AHCI_PREG_SCTL_IPM_NODEVSLP definition from ahci-1.3.1.
authorImre Vadász <imre@vdsz.com>
Sat, 23 Apr 2016 11:23:14 +0000 (13:23 +0200)
committerImre Vadász <imre@vdsz.com>
Wed, 27 Apr 2016 20:11:43 +0000 (22:11 +0200)
commit9abd2bb89a2f347f9045f4032c17df69f85818ba
tree659ff94421d86524c62c66bebcab601b9d9a0523
parent2da5045cc38da3f0ce699b3dd5ad666363512e8c
ahci: Add and use AHCI_PREG_SCTL_IPM_NODEVSLP definition from ahci-1.3.1.

* The DevSleep interface power saving state was introduced with the
  ahci-1.3.1 specification. However actual DevSleep support needs to be
  recognized via the AHCI_REG_CAP2_SDS bit, since many controllers
  identifying as ahci-1.3 already support DevSleep.

* Since the correct bitmask to use in the AHCI_PREG_SCTL_IPM field
  for disabling all power-management features depends on DevSleep support,
  store that precomputed value in sc->sc_ipm_disable.

* Make some operations on the AHCI_PREG_SCTL_IPM_* bitfield a bit clearer.

* While there add AHCI_PREG_CMD_ICC_DEVSLEEP definition.
sys/dev/disk/ahci/ahci.c
sys/dev/disk/ahci/ahci.h
sys/dev/disk/ahci/ahci_attach.c
sys/dev/disk/ahci/ahci_pm.c