diff mbox series

[1/1] ACPI / LPSS: Force LPSS quirks on boot

Message ID 20181122081807.13989-2-aaron.ma@canonical.com
State New
Headers show
Series Fix boot hang on ThinkPad 11e 3rd | expand

Commit Message

Aaron Ma Nov. 22, 2018, 8:18 a.m. UTC
From: Zhang Rui <rui.zhang@intel.com>

BugLink: https://bugs.launchpad.net/bugs/1804604

Commit 12864ff8545f (ACPI / LPSS: Avoid PM quirks on suspend and resume
from hibernation) bypasses lpss quirks for S3 and S4, by setting a flag
for S3/S4 in acpi_lpss_suspend(), and check that flag in
acpi_lpss_resume().

But this overlooks the boot case where acpi_lpss_resume() may get called
without a corresponding acpi_lpss_suspend() having been called.

Thus force setting the flag during boot.

Fixes: 12864ff8545f (ACPI / LPSS: Avoid PM quirks on suspend and resume from hibernation)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=200989
Reported-and-tested-by: William Lieurance <william.lieurance@namikoda.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Cc: 4.15+ <stable@vger.kernel.org> # 4.15+: 12864ff8545f (ACPI / LPSS: Avoid ...)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit f11fc4bc669b8622510c1039499f5a9d24248fec)
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
 drivers/acpi/acpi_lpss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Khalid Elmously Nov. 26, 2018, 2:33 a.m. UTC | #1
On 2018-11-22 16:18:07 , Aaron Ma wrote:
> From: Zhang Rui <rui.zhang@intel.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1804604
> 
> Commit 12864ff8545f (ACPI / LPSS: Avoid PM quirks on suspend and resume
> from hibernation) bypasses lpss quirks for S3 and S4, by setting a flag
> for S3/S4 in acpi_lpss_suspend(), and check that flag in
> acpi_lpss_resume().
> 
> But this overlooks the boot case where acpi_lpss_resume() may get called
> without a corresponding acpi_lpss_suspend() having been called.
> 
> Thus force setting the flag during boot.
> 
> Fixes: 12864ff8545f (ACPI / LPSS: Avoid PM quirks on suspend and resume from hibernation)
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=200989
> Reported-and-tested-by: William Lieurance <william.lieurance@namikoda.com>
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> Cc: 4.15+ <stable@vger.kernel.org> # 4.15+: 12864ff8545f (ACPI / LPSS: Avoid ...)
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> (cherry picked from commit f11fc4bc669b8622510c1039499f5a9d24248fec)
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
>  drivers/acpi/acpi_lpss.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index 8e37c2317e27..08b2ceb68066 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -736,7 +736,7 @@ static void acpi_lpss_dismiss(struct device *dev)
>  #define LPSS_GPIODEF0_DMA_LLP		BIT(13)
>  
>  static DEFINE_MUTEX(lpss_iosf_mutex);
> -static bool lpss_iosf_d3_entered;
> +static bool lpss_iosf_d3_entered = true;
>  
>  static void lpss_iosf_enter_d3_state(void)
>  {

Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Anthony Wong Nov. 28, 2018, 1:16 p.m. UTC | #2
On Thu, Nov 22, 2018 at 04:18:07PM +0800, Aaron Ma wrote:
> From: Zhang Rui <rui.zhang@intel.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1804604
> 
> Commit 12864ff8545f (ACPI / LPSS: Avoid PM quirks on suspend and resume
> from hibernation) bypasses lpss quirks for S3 and S4, by setting a flag
> for S3/S4 in acpi_lpss_suspend(), and check that flag in
> acpi_lpss_resume().
> 
> But this overlooks the boot case where acpi_lpss_resume() may get called
> without a corresponding acpi_lpss_suspend() having been called.
> 
> Thus force setting the flag during boot.
> 
> Fixes: 12864ff8545f (ACPI / LPSS: Avoid PM quirks on suspend and resume from hibernation)
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=200989
> Reported-and-tested-by: William Lieurance <william.lieurance@namikoda.com>
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> Cc: 4.15+ <stable@vger.kernel.org> # 4.15+: 12864ff8545f (ACPI / LPSS: Avoid ...)
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> (cherry picked from commit f11fc4bc669b8622510c1039499f5a9d24248fec)
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
>  drivers/acpi/acpi_lpss.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index 8e37c2317e27..08b2ceb68066 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -736,7 +736,7 @@ static void acpi_lpss_dismiss(struct device *dev)
>  #define LPSS_GPIODEF0_DMA_LLP		BIT(13)
>  
>  static DEFINE_MUTEX(lpss_iosf_mutex);
> -static bool lpss_iosf_d3_entered;
> +static bool lpss_iosf_d3_entered = true;
>  
>  static void lpss_iosf_enter_d3_state(void)
>  {
> -- 
> 2.17.1

Acked-by: Anthony Wong <anthony.wong@canonical.com>
Stefan Bader Feb. 1, 2019, 12:38 p.m. UTC | #3
On 22.11.18 09:18, Aaron Ma wrote:
> From: Zhang Rui <rui.zhang@intel.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1804604
> 
> Commit 12864ff8545f (ACPI / LPSS: Avoid PM quirks on suspend and resume
> from hibernation) bypasses lpss quirks for S3 and S4, by setting a flag
> for S3/S4 in acpi_lpss_suspend(), and check that flag in
> acpi_lpss_resume().
> 
> But this overlooks the boot case where acpi_lpss_resume() may get called
> without a corresponding acpi_lpss_suspend() having been called.
> 
> Thus force setting the flag during boot.
> 
> Fixes: 12864ff8545f (ACPI / LPSS: Avoid PM quirks on suspend and resume from hibernation)
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=200989
> Reported-and-tested-by: William Lieurance <william.lieurance@namikoda.com>
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> Cc: 4.15+ <stable@vger.kernel.org> # 4.15+: 12864ff8545f (ACPI / LPSS: Avoid ...)
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> (cherry picked from commit f11fc4bc669b8622510c1039499f5a9d24248fec)
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
>  drivers/acpi/acpi_lpss.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index 8e37c2317e27..08b2ceb68066 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -736,7 +736,7 @@ static void acpi_lpss_dismiss(struct device *dev)
>  #define LPSS_GPIODEF0_DMA_LLP		BIT(13)
>  
>  static DEFINE_MUTEX(lpss_iosf_mutex);
> -static bool lpss_iosf_d3_entered;
> +static bool lpss_iosf_d3_entered = true;
>  
>  static void lpss_iosf_enter_d3_state(void)
>  {
> 
Applied to bionic/master-next. Thanks.

-Stefan
diff mbox series

Patch

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 8e37c2317e27..08b2ceb68066 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -736,7 +736,7 @@  static void acpi_lpss_dismiss(struct device *dev)
 #define LPSS_GPIODEF0_DMA_LLP		BIT(13)
 
 static DEFINE_MUTEX(lpss_iosf_mutex);
-static bool lpss_iosf_d3_entered;
+static bool lpss_iosf_d3_entered = true;
 
 static void lpss_iosf_enter_d3_state(void)
 {