[linux-yocto] [PATCH 9/9] ahci: Add runtime PM support for the host controller

2016-03-31 Thread key . seong . lim
From: Mika Westerberg This patch adds runtime PM support for the AHCI host controller driver so that the host controller is powered down when all SATA ports are runtime suspended. Powering down the AHCI host controller can reduce power consumption and possibly allow the CPU to enter lower power i

[linux-yocto] [PATCH 3/9] block: Add blk_set_runtime_active()

2016-03-31 Thread key . seong . lim
From: Mika Westerberg If block device is left runtime suspended during system suspend, resume hook of the driver typically corrects runtime PM status of the device back to "active" after it is resumed. However, this is not enough as queue's runtime PM status is still "suspended". As long as it is

[linux-yocto] [PATCH 0/9] ahci: backport AHCI runtime PM support to linux-yocto-4.1

2016-03-31 Thread key . seong . lim
From: Lim Key Seong Hi Bruce, These patches are backport for enabling AHCI runtime PM support that upstreamed to the mainline Linux Kernel by Mika Westerberg. These patches are targeted for linux-yocto-4.1, standard/base branch. Thanks Best regards KS LIM Mika Westerberg (7): block: Add

[linux-yocto] [PATCH 7/9] ahci: Convert driver to use modern PM hooks

2016-03-31 Thread key . seong . lim
From: Mika Westerberg In order to add support for runtime PM to the ahci driver we first need to convert the driver to use modern non-legacy system suspend hooks. There should be no functional changes. tj: Updated .driver.pm init for older compilers as suggested by Andy and Chrsitoph. Signe

[linux-yocto] [PATCH 5/9] scsi: Drop runtime PM usage count after host is added

2016-03-31 Thread key . seong . lim
From: Mika Westerberg Runtime PM of the SCSI host is already handled by calls to scsi_autopm_get_host() and scsi_autopm_put_host() from appropriate places whenever the host needs to be powered on. This works fine when there is device connected to the host as once it runtime suspends the host will

[linux-yocto] [PATCH 8/9] ahci: Add functions to manage runtime PM of AHCI ports

2016-03-31 Thread key . seong . lim
From: Mika Westerberg Add new functions ahci_rpm_get_port()/ahci_rpm_put_port() that change runtime PM status of AHCI ports. Depending if the AHCI host has runtime PM enabled or disabled calling these may trigger runtime suspend/resume of the host controller. We also call these functions in appr

[linux-yocto] [PATCH 4/9] scsi: Set request queue runtime PM status back to active on resume

2016-03-31 Thread key . seong . lim
From: Mika Westerberg We treat system suspend of SCSI devices pretty much the same as runtime suspend. If the device is already runtime suspended we leave it to that state during system suspend. On resume from system sleep we then resume the device and correct the runtime PM status back to "activ

[linux-yocto] [PATCH 6/9] ahci: Cache host controller version

2016-03-31 Thread key . seong . lim
From: Mika Westerberg This allows sysfs nodes to read the cached value directly instead of powering up possibly runtime suspended controller. Signed-off-by: Mika Westerberg Signed-off-by: Tejun Heo (cherry picked from commit 8ea909cb35bc2c3226610f8631c73e355020a26e) Signed-off-by: Lim Key Seon

[linux-yocto] [PATCH 2/9] ahci: Store irq number in struct ahci_host_priv

2016-03-31 Thread key . seong . lim
From: Robert Richter Currently, ahci supports only msi and intx. To also support msix the handling of the irq number need to be changed. The irq number for msix devices is taken from msi_list instead of pci_dev. Thus, the irq number of a device needs to be stored in struct ahci_host_priv now. Thi

[linux-yocto] [PATCH 1/9] ahci: Move interrupt enablement code to a separate function

2016-03-31 Thread key . seong . lim
From: Robert Richter This patch refactors ahci_init_interrupts() and moves msi code to a separate function. Need the split since we add msix initialization in a later patch. The initialization for msix will be done after msi but before intx. Signed-off-by: Robert Richter Signed-off-by: Tejun He