All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: i801: Exclude device from suspend direct complete optimization
@ 2020-09-10  9:57 Jean Delvare
  2020-09-21  9:30 ` Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2020-09-10  9:57 UTC (permalink / raw)
  To: Linux I2C; +Cc: Volker Rümelin, Bjorn Helgaas, Vaibhav Gupta, Wolfram Sang

By default, PCI drivers with runtime PM enabled will skip the calls
to suspend and resume on system PM. For this driver, we don't want
that, as we need to perform additional steps for system PM to work
properly on all systems. So instruct the PM core to not skip these
calls.

Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM")
Reported-by: Volker Rümelin <volker.ruemelin@googlemail.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: stable@vger.kernel.org
---
 drivers/i2c/busses/i2c-i801.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-5.8.orig/drivers/i2c/busses/i2c-i801.c	2020-09-09 18:41:55.118961045 +0200
+++ linux-5.8/drivers/i2c/busses/i2c-i801.c	2020-09-10 11:36:40.352858458 +0200
@@ -1917,6 +1917,7 @@ static int i801_probe(struct pci_dev *de
 
 	pci_set_drvdata(dev, priv);
 
+	dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
 	pm_runtime_set_autosuspend_delay(&dev->dev, 1000);
 	pm_runtime_use_autosuspend(&dev->dev);
 	pm_runtime_put_autosuspend(&dev->dev);


-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: i801: Exclude device from suspend direct complete optimization
  2020-09-10  9:57 [PATCH] i2c: i801: Exclude device from suspend direct complete optimization Jean Delvare
@ 2020-09-21  9:30 ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2020-09-21  9:30 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Linux I2C, Volker Rümelin, Bjorn Helgaas, Vaibhav Gupta

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

On Thu, Sep 10, 2020 at 11:57:08AM +0200, Jean Delvare wrote:
> By default, PCI drivers with runtime PM enabled will skip the calls
> to suspend and resume on system PM. For this driver, we don't want
> that, as we need to perform additional steps for system PM to work
> properly on all systems. So instruct the PM core to not skip these
> calls.
> 
> Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM")
> Reported-by: Volker Rümelin <volker.ruemelin@googlemail.com>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: stable@vger.kernel.org

Applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: i801: Exclude device from suspend direct complete optimization
  2020-10-05 15:39 Jean Delvare
@ 2020-10-09 14:08 ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2020-10-09 14:08 UTC (permalink / raw)
  To: Jean Delvare; +Cc: stable, volker.ruemelin, wsa

On Mon, Oct 05, 2020 at 05:39:31PM +0200, Jean Delvare wrote:
> commit 845b89127bc5458d0152a4d63f165c62a22fcb70 upstream.
> 
> By default, PCI drivers with runtime PM enabled will skip the calls
> to suspend and resume on system PM. For this driver, we don't want
> that, as we need to perform additional steps for system PM to work
> properly on all systems. So instruct the PM core to not skip these
> calls.
> 
> Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM")
> Reported-by: Volker Rümelin <volker.ruemelin@googlemail.com>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: stable@vger.kernel.org
> Signed-off-by: Wolfram Sang <wsa@kernel.org>
> ---
> This is the backported version for kernel trees 5.4 and 4.19. The
> difference with the upstream commit is that DPM_FLAG_NEVER_SKIP is used
> instead of DPM_FLAG_NO_DIRECT_COMPLETE, which did not exist back then.

Thanks, now queue dup.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] i2c: i801: Exclude device from suspend direct complete optimization
@ 2020-10-05 15:39 Jean Delvare
  2020-10-09 14:08 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2020-10-05 15:39 UTC (permalink / raw)
  To: stable; +Cc: Greg KH, volker.ruemelin, wsa

commit 845b89127bc5458d0152a4d63f165c62a22fcb70 upstream.

By default, PCI drivers with runtime PM enabled will skip the calls
to suspend and resume on system PM. For this driver, we don't want
that, as we need to perform additional steps for system PM to work
properly on all systems. So instruct the PM core to not skip these
calls.

Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM")
Reported-by: Volker Rümelin <volker.ruemelin@googlemail.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang <wsa@kernel.org>
---
This is the backported version for kernel trees 5.4 and 4.19. The
difference with the upstream commit is that DPM_FLAG_NEVER_SKIP is used
instead of DPM_FLAG_NO_DIRECT_COMPLETE, which did not exist back then.

 drivers/i2c/busses/i2c-i801.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-5.4.orig/drivers/i2c/busses/i2c-i801.c	2020-10-05 14:59:14.454238658 +0200
+++ linux-5.4/drivers/i2c/busses/i2c-i801.c	2020-10-05 15:54:31.399988586 +0200
@@ -1891,6 +1891,7 @@ static int i801_probe(struct pci_dev *de
 
 	pci_set_drvdata(dev, priv);
 
+	dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_NEVER_SKIP);
 	pm_runtime_set_autosuspend_delay(&dev->dev, 1000);
 	pm_runtime_use_autosuspend(&dev->dev);
 	pm_runtime_put_autosuspend(&dev->dev);


-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-09 14:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10  9:57 [PATCH] i2c: i801: Exclude device from suspend direct complete optimization Jean Delvare
2020-09-21  9:30 ` Wolfram Sang
2020-10-05 15:39 Jean Delvare
2020-10-09 14:08 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.