linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating
@ 2020-04-24 13:47 Qais Yousef
  2020-04-24 13:47 ` [PATCH 2/3] usb/xhci-plat: Set PM runtime as active on resume Qais Yousef
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Qais Yousef @ 2020-04-24 13:47 UTC (permalink / raw)
  To: Alan Stern, Rafael J . Wysocki
  Cc: Qais Yousef, Tony Prisk, Greg Kroah-Hartman, Mathias Nyman,
	Oliver Neukum, linux-arm-kernel, linux-usb, linux-kernel

The following warning was observed when attempting to suspend to disk
using a USB flash as a swap device.

[  111.779649] ------------[ cut here ]------------
[  111.788382] URB (____ptrval____) submitted while active
[  111.796646] WARNING: CPU: 3 PID: 365 at drivers/usb/core/urb.c:363 usb_submit_urb+0x3d8/0x590
[  111.805417] Modules linked in:
[  111.808584] CPU: 3 PID: 365 Comm: kworker/3:2 Not tainted 5.6.0-rc6-00002-gdfd1731f9a3e-dirty #545
[  111.817796] Hardware name: ARM Juno development board (r2) (DT)
[  111.823896] Workqueue: usb_hub_wq hub_event
[  111.828217] pstate: 60000005 (nZCv daif -PAN -UAO)
[  111.833156] pc : usb_submit_urb+0x3d8/0x590
[  111.837471] lr : usb_submit_urb+0x3d8/0x590
[  111.841783] sp : ffff800018de38b0
[  111.845205] x29: ffff800018de38b0 x28: 0000000000000003
[  111.850682] x27: ffff000970530b20 x26: ffff8000133fd000
[  111.856159] x25: ffff8000133fd000 x24: ffff800018de3b38
[  111.861635] x23: 0000000000000004 x22: 0000000000000c00
[  111.867112] x21: 0000000000000000 x20: 00000000fffffff0
[  111.872589] x19: ffff0009704e7a00 x18: ffffffffffffffff
[  111.878065] x17: 00000000a7c8f4bc x16: 000000002af33de8
[  111.883542] x15: ffff8000133fda88 x14: 0720072007200720
[  111.889019] x13: 0720072007200720 x12: 0720072007200720
[  111.894496] x11: 0000000000000000 x10: 00000000a5286134
[  111.899973] x9 : 0000000000000002 x8 : ffff000970c837a0
[  111.905449] x7 : 0000000000000000 x6 : ffff800018de3570
[  111.910926] x5 : 0000000000000001 x4 : 0000000000000003
[  111.916401] x3 : 0000000000000000 x2 : ffff800013427118
[  111.921879] x1 : 9d4e965b4b7d7c00 x0 : 0000000000000000
[  111.927356] Call trace:
[  111.929892]  usb_submit_urb+0x3d8/0x590
[  111.933852]  hub_activate+0x108/0x7f0
[  111.937633]  hub_resume+0xac/0x148
[  111.941149]  usb_resume_interface.isra.10+0x60/0x138
[  111.946265]  usb_resume_both+0xe4/0x140
[  111.950225]  usb_runtime_resume+0x24/0x30
[  111.954365]  __rpm_callback+0xdc/0x138
[  111.958236]  rpm_callback+0x34/0x98
[  111.961841]  rpm_resume+0x4a8/0x720
[  111.965445]  rpm_resume+0x50c/0x720
[  111.969049]  __pm_runtime_resume+0x4c/0xb8
[  111.973276]  usb_autopm_get_interface+0x28/0x60
[  111.977948]  hub_event+0x80/0x16d8
[  111.981466]  process_one_work+0x2a4/0x748
[  111.985604]  worker_thread+0x48/0x498
[  111.989387]  kthread+0x13c/0x140
[  111.992725]  ret_from_fork+0x10/0x18
[  111.996415] irq event stamp: 354
[  111.999756] hardirqs last  enabled at (353): [<ffff80001019ea1c>] console_unlock+0x504/0x5b8
[  112.008441] hardirqs last disabled at (354): [<ffff8000100a95d0>] do_debug_exception+0x1a8/0x258
[  112.017479] softirqs last  enabled at (350): [<ffff8000100818a4>] __do_softirq+0x4bc/0x568
[  112.025984] softirqs last disabled at (343): [<ffff8000101145a4>] irq_exit+0x144/0x150
[  112.034129] ---[ end trace dc96030b9cf6c8a3 ]---

The problem was tracked down to a missing call to
pm_runtime_set_active() on resume in ohci-platform.

Link: https://lore.kernel.org/lkml/20200323143857.db5zphxhq4hz3hmd@e107158-lin.cambridge.arm.com/
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
CC: Tony Prisk <linux@prisktech.co.nz>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Mathias Nyman <mathias.nyman@intel.com>
CC: Oliver Neukum <oneukum@suse.de>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-usb@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
 drivers/usb/host/ohci-platform.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
index 7addfc2cbadc..4a8456f12a73 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -299,6 +299,11 @@ static int ohci_platform_resume(struct device *dev)
 	}
 
 	ohci_resume(hcd, false);
+
+	pm_runtime_disable(dev);
+	pm_runtime_set_active(dev);
+	pm_runtime_enable(dev);
+
 	return 0;
 }
 #endif /* CONFIG_PM_SLEEP */
-- 
2.17.1


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

* [PATCH 2/3] usb/xhci-plat: Set PM runtime as active on resume
  2020-04-24 13:47 [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating Qais Yousef
@ 2020-04-24 13:47 ` Qais Yousef
  2020-04-24 15:03   ` Alan Stern
  2020-04-24 16:03   ` [PATCH v2 " Qais Yousef
  2020-04-24 13:48 ` [PATCH 3/3] usb/ehci-platform: " Qais Yousef
  2020-04-28 19:00 ` [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating Alan Stern
  2 siblings, 2 replies; 10+ messages in thread
From: Qais Yousef @ 2020-04-24 13:47 UTC (permalink / raw)
  To: Alan Stern, Rafael J . Wysocki
  Cc: Qais Yousef, Tony Prisk, Greg Kroah-Hartman, Mathias Nyman,
	Oliver Neukum, linux-arm-kernel, linux-usb, linux-kernel

Follow suit of ohci-platform.c and perform pm_runtime_set_active() on
resume.

ohci-platform.c had a warning reported due to the missing
pm_runtime_set_active() [1].

[1] https://lore.kernel.org/lkml/20200323143857.db5zphxhq4hz3hmd@e107158-lin.cambridge.arm.com/

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
CC: Tony Prisk <linux@prisktech.co.nz>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Mathias Nyman <mathias.nyman@intel.com>
CC: Oliver Neukum <oneukum@suse.de>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-usb@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---

xhci_resume() here could fail, I wasn't sure if we need to call
pm_runtime_set_active() unconditionally. I assumed not.

There was another function xhci_plat_resume(), I think we just care about the
PM runtime resume callback only.

Please have a closer look.

 drivers/usb/host/xhci-plat.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 1d4f6f85f0fe..7c6fd138072c 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -422,8 +422,17 @@ static int __maybe_unused xhci_plat_runtime_resume(struct device *dev)
 {
 	struct usb_hcd  *hcd = dev_get_drvdata(dev);
 	struct xhci_hcd *xhci = hcd_to_xhci(hcd);
+	int ret;
 
-	return xhci_resume(xhci, 0);
+	ret = xhci_resume(xhci, 0);
+	if (ret)
+		return ret;
+
+	pm_runtime_disable(dev);
+	pm_runtime_set_active(dev);
+	pm_runtime_enable(dev);
+
+	return 0;
 }
 
 static const struct dev_pm_ops xhci_plat_pm_ops = {
-- 
2.17.1


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

* [PATCH 3/3] usb/ehci-platform: Set PM runtime as active on resume
  2020-04-24 13:47 [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating Qais Yousef
  2020-04-24 13:47 ` [PATCH 2/3] usb/xhci-plat: Set PM runtime as active on resume Qais Yousef
@ 2020-04-24 13:48 ` Qais Yousef
  2020-04-28 19:00 ` [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating Alan Stern
  2 siblings, 0 replies; 10+ messages in thread
From: Qais Yousef @ 2020-04-24 13:48 UTC (permalink / raw)
  To: Alan Stern, Rafael J . Wysocki
  Cc: Qais Yousef, Tony Prisk, Greg Kroah-Hartman, Mathias Nyman,
	Oliver Neukum, linux-arm-kernel, linux-usb, linux-kernel

Follow suit of ohci-platform.c and perform pm_runtime_set_active() on
resume.

ohci-platform.c had a warning reported due to the missing
pm_runtime_set_active() [1].

[1] https://lore.kernel.org/lkml/20200323143857.db5zphxhq4hz3hmd@e107158-lin.cambridge.arm.com/

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
CC: Tony Prisk <linux@prisktech.co.nz>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Mathias Nyman <mathias.nyman@intel.com>
CC: Oliver Neukum <oneukum@suse.de>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-usb@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
 drivers/usb/host/ehci-platform.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index e4fc3f66d43b..e9a49007cce4 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -455,6 +455,10 @@ static int ehci_platform_resume(struct device *dev)
 
 	ehci_resume(hcd, priv->reset_on_resume);
 
+	pm_runtime_disable(dev);
+	pm_runtime_set_active(dev);
+	pm_runtime_enable(dev);
+
 	if (priv->quirk_poll)
 		quirk_poll_init(priv);
 
-- 
2.17.1


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

* Re: [PATCH 2/3] usb/xhci-plat: Set PM runtime as active on resume
  2020-04-24 13:47 ` [PATCH 2/3] usb/xhci-plat: Set PM runtime as active on resume Qais Yousef
@ 2020-04-24 15:03   ` Alan Stern
  2020-04-24 16:03   ` [PATCH v2 " Qais Yousef
  1 sibling, 0 replies; 10+ messages in thread
From: Alan Stern @ 2020-04-24 15:03 UTC (permalink / raw)
  To: Qais Yousef
  Cc: Rafael J . Wysocki, Tony Prisk, Greg Kroah-Hartman,
	Mathias Nyman, Oliver Neukum, linux-arm-kernel, linux-usb,
	linux-kernel

On Fri, 24 Apr 2020, Qais Yousef wrote:

> Follow suit of ohci-platform.c and perform pm_runtime_set_active() on
> resume.
> 
> ohci-platform.c had a warning reported due to the missing
> pm_runtime_set_active() [1].
> 
> [1] https://lore.kernel.org/lkml/20200323143857.db5zphxhq4hz3hmd@e107158-lin.cambridge.arm.com/
> 
> Signed-off-by: Qais Yousef <qais.yousef@arm.com>
> CC: Tony Prisk <linux@prisktech.co.nz>
> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> CC: Mathias Nyman <mathias.nyman@intel.com>
> CC: Oliver Neukum <oneukum@suse.de>
> CC: linux-arm-kernel@lists.infradead.org
> CC: linux-usb@vger.kernel.org
> CC: linux-kernel@vger.kernel.org
> ---
> 
> xhci_resume() here could fail, I wasn't sure if we need to call
> pm_runtime_set_active() unconditionally. I assumed not.
> 
> There was another function xhci_plat_resume(), I think we just care about the
> PM runtime resume callback only.
> 
> Please have a closer look.

No, it's the other way around.  The function you want to change is the 
one used for system resume, not runtime resume.

Alan Stern


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

* [PATCH v2 2/3] usb/xhci-plat: Set PM runtime as active on resume
  2020-04-24 13:47 ` [PATCH 2/3] usb/xhci-plat: Set PM runtime as active on resume Qais Yousef
  2020-04-24 15:03   ` Alan Stern
@ 2020-04-24 16:03   ` Qais Yousef
  1 sibling, 0 replies; 10+ messages in thread
From: Qais Yousef @ 2020-04-24 16:03 UTC (permalink / raw)
  To: Alan Stern, Rafael J . Wysocki
  Cc: Qais Yousef, Tony Prisk, Greg Kroah-Hartman, Mathias Nyman,
	Oliver Neukum, linux-arm-kernel, linux-usb, linux-kernel

Follow suit of ohci-platform.c and perform pm_runtime_set_active() on
resume.

ohci-platform.c had a warning reported due to the missing
pm_runtime_set_active() [1].

[1] https://lore.kernel.org/lkml/20200323143857.db5zphxhq4hz3hmd@e107158-lin.cambridge.arm.com/

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
CC: Tony Prisk <linux@prisktech.co.nz>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Mathias Nyman <mathias.nyman@intel.com>
CC: Oliver Neukum <oneukum@suse.de>
CC: linux-arm-kernel@lists.infradead.org
CC: linux-usb@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
 drivers/usb/host/xhci-plat.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 1d4f6f85f0fe..05cafef702a9 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -407,7 +407,15 @@ static int __maybe_unused xhci_plat_resume(struct device *dev)
 	if (ret)
 		return ret;
 
-	return xhci_resume(xhci, 0);
+	ret = xhci_resume(xhci, 0);
+	if (ret)
+		return ret;
+
+	pm_runtime_disable(dev);
+	pm_runtime_set_active(dev);
+	pm_runtime_enable(dev);
+
+	return 0;
 }
 
 static int __maybe_unused xhci_plat_runtime_suspend(struct device *dev)
-- 
2.17.1


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

* Re: [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating
  2020-04-24 13:47 [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating Qais Yousef
  2020-04-24 13:47 ` [PATCH 2/3] usb/xhci-plat: Set PM runtime as active on resume Qais Yousef
  2020-04-24 13:48 ` [PATCH 3/3] usb/ehci-platform: " Qais Yousef
@ 2020-04-28 19:00 ` Alan Stern
  2020-05-18 14:57   ` Qais Yousef
  2 siblings, 1 reply; 10+ messages in thread
From: Alan Stern @ 2020-04-28 19:00 UTC (permalink / raw)
  To: Qais Yousef
  Cc: Rafael J . Wysocki, Tony Prisk, Greg Kroah-Hartman,
	Mathias Nyman, Oliver Neukum, linux-arm-kernel, linux-usb,
	linux-kernel

On Fri, 24 Apr 2020, Qais Yousef wrote:

> The following warning was observed when attempting to suspend to disk
> using a USB flash as a swap device.
> 
> [  111.779649] ------------[ cut here ]------------
> [  111.788382] URB (____ptrval____) submitted while active
> [  111.796646] WARNING: CPU: 3 PID: 365 at drivers/usb/core/urb.c:363 usb_submit_urb+0x3d8/0x590
> [  111.805417] Modules linked in:
> [  111.808584] CPU: 3 PID: 365 Comm: kworker/3:2 Not tainted 5.6.0-rc6-00002-gdfd1731f9a3e-dirty #545
> [  111.817796] Hardware name: ARM Juno development board (r2) (DT)
> [  111.823896] Workqueue: usb_hub_wq hub_event
> [  111.828217] pstate: 60000005 (nZCv daif -PAN -UAO)
> [  111.833156] pc : usb_submit_urb+0x3d8/0x590
> [  111.837471] lr : usb_submit_urb+0x3d8/0x590
> [  111.841783] sp : ffff800018de38b0
> [  111.845205] x29: ffff800018de38b0 x28: 0000000000000003
> [  111.850682] x27: ffff000970530b20 x26: ffff8000133fd000
> [  111.856159] x25: ffff8000133fd000 x24: ffff800018de3b38
> [  111.861635] x23: 0000000000000004 x22: 0000000000000c00
> [  111.867112] x21: 0000000000000000 x20: 00000000fffffff0
> [  111.872589] x19: ffff0009704e7a00 x18: ffffffffffffffff
> [  111.878065] x17: 00000000a7c8f4bc x16: 000000002af33de8
> [  111.883542] x15: ffff8000133fda88 x14: 0720072007200720
> [  111.889019] x13: 0720072007200720 x12: 0720072007200720
> [  111.894496] x11: 0000000000000000 x10: 00000000a5286134
> [  111.899973] x9 : 0000000000000002 x8 : ffff000970c837a0
> [  111.905449] x7 : 0000000000000000 x6 : ffff800018de3570
> [  111.910926] x5 : 0000000000000001 x4 : 0000000000000003
> [  111.916401] x3 : 0000000000000000 x2 : ffff800013427118
> [  111.921879] x1 : 9d4e965b4b7d7c00 x0 : 0000000000000000
> [  111.927356] Call trace:
> [  111.929892]  usb_submit_urb+0x3d8/0x590
> [  111.933852]  hub_activate+0x108/0x7f0
> [  111.937633]  hub_resume+0xac/0x148
> [  111.941149]  usb_resume_interface.isra.10+0x60/0x138
> [  111.946265]  usb_resume_both+0xe4/0x140
> [  111.950225]  usb_runtime_resume+0x24/0x30
> [  111.954365]  __rpm_callback+0xdc/0x138
> [  111.958236]  rpm_callback+0x34/0x98
> [  111.961841]  rpm_resume+0x4a8/0x720
> [  111.965445]  rpm_resume+0x50c/0x720
> [  111.969049]  __pm_runtime_resume+0x4c/0xb8
> [  111.973276]  usb_autopm_get_interface+0x28/0x60
> [  111.977948]  hub_event+0x80/0x16d8
> [  111.981466]  process_one_work+0x2a4/0x748
> [  111.985604]  worker_thread+0x48/0x498
> [  111.989387]  kthread+0x13c/0x140
> [  111.992725]  ret_from_fork+0x10/0x18
> [  111.996415] irq event stamp: 354
> [  111.999756] hardirqs last  enabled at (353): [<ffff80001019ea1c>] console_unlock+0x504/0x5b8
> [  112.008441] hardirqs last disabled at (354): [<ffff8000100a95d0>] do_debug_exception+0x1a8/0x258
> [  112.017479] softirqs last  enabled at (350): [<ffff8000100818a4>] __do_softirq+0x4bc/0x568
> [  112.025984] softirqs last disabled at (343): [<ffff8000101145a4>] irq_exit+0x144/0x150
> [  112.034129] ---[ end trace dc96030b9cf6c8a3 ]---
> 
> The problem was tracked down to a missing call to
> pm_runtime_set_active() on resume in ohci-platform.
> 
> Link: https://lore.kernel.org/lkml/20200323143857.db5zphxhq4hz3hmd@e107158-lin.cambridge.arm.com/
> Signed-off-by: Qais Yousef <qais.yousef@arm.com>
> CC: Tony Prisk <linux@prisktech.co.nz>
> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> CC: Mathias Nyman <mathias.nyman@intel.com>
> CC: Oliver Neukum <oneukum@suse.de>
> CC: linux-arm-kernel@lists.infradead.org
> CC: linux-usb@vger.kernel.org
> CC: linux-kernel@vger.kernel.org
> ---
>  drivers/usb/host/ohci-platform.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
> index 7addfc2cbadc..4a8456f12a73 100644
> --- a/drivers/usb/host/ohci-platform.c
> +++ b/drivers/usb/host/ohci-platform.c
> @@ -299,6 +299,11 @@ static int ohci_platform_resume(struct device *dev)
>  	}
>  
>  	ohci_resume(hcd, false);
> +
> +	pm_runtime_disable(dev);
> +	pm_runtime_set_active(dev);
> +	pm_runtime_enable(dev);
> +
>  	return 0;
>  }
>  #endif /* CONFIG_PM_SLEEP */

For both this patch and the 3/3 patch (ehci-platform):

Acked-by: Alan Stern <stern@rowland.harvard.edu>

Alan Stern


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

* Re: [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating
  2020-04-28 19:00 ` [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating Alan Stern
@ 2020-05-18 14:57   ` Qais Yousef
  2020-05-18 15:19     ` Alan Stern
  0 siblings, 1 reply; 10+ messages in thread
From: Qais Yousef @ 2020-05-18 14:57 UTC (permalink / raw)
  To: Alan Stern
  Cc: Rafael J . Wysocki, Tony Prisk, Greg Kroah-Hartman,
	Mathias Nyman, Oliver Neukum, linux-arm-kernel, linux-usb,
	linux-kernel

On 04/28/20 15:00, Alan Stern wrote:
> On Fri, 24 Apr 2020, Qais Yousef wrote:
> 
> > The following warning was observed when attempting to suspend to disk
> > using a USB flash as a swap device.
> > 
> > [  111.779649] ------------[ cut here ]------------
> > [  111.788382] URB (____ptrval____) submitted while active
> > [  111.796646] WARNING: CPU: 3 PID: 365 at drivers/usb/core/urb.c:363 usb_submit_urb+0x3d8/0x590
> > [  111.805417] Modules linked in:
> > [  111.808584] CPU: 3 PID: 365 Comm: kworker/3:2 Not tainted 5.6.0-rc6-00002-gdfd1731f9a3e-dirty #545
> > [  111.817796] Hardware name: ARM Juno development board (r2) (DT)
> > [  111.823896] Workqueue: usb_hub_wq hub_event
> > [  111.828217] pstate: 60000005 (nZCv daif -PAN -UAO)
> > [  111.833156] pc : usb_submit_urb+0x3d8/0x590
> > [  111.837471] lr : usb_submit_urb+0x3d8/0x590
> > [  111.841783] sp : ffff800018de38b0
> > [  111.845205] x29: ffff800018de38b0 x28: 0000000000000003
> > [  111.850682] x27: ffff000970530b20 x26: ffff8000133fd000
> > [  111.856159] x25: ffff8000133fd000 x24: ffff800018de3b38
> > [  111.861635] x23: 0000000000000004 x22: 0000000000000c00
> > [  111.867112] x21: 0000000000000000 x20: 00000000fffffff0
> > [  111.872589] x19: ffff0009704e7a00 x18: ffffffffffffffff
> > [  111.878065] x17: 00000000a7c8f4bc x16: 000000002af33de8
> > [  111.883542] x15: ffff8000133fda88 x14: 0720072007200720
> > [  111.889019] x13: 0720072007200720 x12: 0720072007200720
> > [  111.894496] x11: 0000000000000000 x10: 00000000a5286134
> > [  111.899973] x9 : 0000000000000002 x8 : ffff000970c837a0
> > [  111.905449] x7 : 0000000000000000 x6 : ffff800018de3570
> > [  111.910926] x5 : 0000000000000001 x4 : 0000000000000003
> > [  111.916401] x3 : 0000000000000000 x2 : ffff800013427118
> > [  111.921879] x1 : 9d4e965b4b7d7c00 x0 : 0000000000000000
> > [  111.927356] Call trace:
> > [  111.929892]  usb_submit_urb+0x3d8/0x590
> > [  111.933852]  hub_activate+0x108/0x7f0
> > [  111.937633]  hub_resume+0xac/0x148
> > [  111.941149]  usb_resume_interface.isra.10+0x60/0x138
> > [  111.946265]  usb_resume_both+0xe4/0x140
> > [  111.950225]  usb_runtime_resume+0x24/0x30
> > [  111.954365]  __rpm_callback+0xdc/0x138
> > [  111.958236]  rpm_callback+0x34/0x98
> > [  111.961841]  rpm_resume+0x4a8/0x720
> > [  111.965445]  rpm_resume+0x50c/0x720
> > [  111.969049]  __pm_runtime_resume+0x4c/0xb8
> > [  111.973276]  usb_autopm_get_interface+0x28/0x60
> > [  111.977948]  hub_event+0x80/0x16d8
> > [  111.981466]  process_one_work+0x2a4/0x748
> > [  111.985604]  worker_thread+0x48/0x498
> > [  111.989387]  kthread+0x13c/0x140
> > [  111.992725]  ret_from_fork+0x10/0x18
> > [  111.996415] irq event stamp: 354
> > [  111.999756] hardirqs last  enabled at (353): [<ffff80001019ea1c>] console_unlock+0x504/0x5b8
> > [  112.008441] hardirqs last disabled at (354): [<ffff8000100a95d0>] do_debug_exception+0x1a8/0x258
> > [  112.017479] softirqs last  enabled at (350): [<ffff8000100818a4>] __do_softirq+0x4bc/0x568
> > [  112.025984] softirqs last disabled at (343): [<ffff8000101145a4>] irq_exit+0x144/0x150
> > [  112.034129] ---[ end trace dc96030b9cf6c8a3 ]---
> > 
> > The problem was tracked down to a missing call to
> > pm_runtime_set_active() on resume in ohci-platform.
> > 
> > Link: https://lore.kernel.org/lkml/20200323143857.db5zphxhq4hz3hmd@e107158-lin.cambridge.arm.com/
> > Signed-off-by: Qais Yousef <qais.yousef@arm.com>
> > CC: Tony Prisk <linux@prisktech.co.nz>
> > CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > CC: Mathias Nyman <mathias.nyman@intel.com>
> > CC: Oliver Neukum <oneukum@suse.de>
> > CC: linux-arm-kernel@lists.infradead.org
> > CC: linux-usb@vger.kernel.org
> > CC: linux-kernel@vger.kernel.org
> > ---
> >  drivers/usb/host/ohci-platform.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
> > index 7addfc2cbadc..4a8456f12a73 100644
> > --- a/drivers/usb/host/ohci-platform.c
> > +++ b/drivers/usb/host/ohci-platform.c
> > @@ -299,6 +299,11 @@ static int ohci_platform_resume(struct device *dev)
> >  	}
> >  
> >  	ohci_resume(hcd, false);
> > +
> > +	pm_runtime_disable(dev);
> > +	pm_runtime_set_active(dev);
> > +	pm_runtime_enable(dev);
> > +
> >  	return 0;
> >  }
> >  #endif /* CONFIG_PM_SLEEP */
> 
> For both this patch and the 3/3 patch (ehci-platform):
> 
> Acked-by: Alan Stern <stern@rowland.harvard.edu>

Thanks Alan. Did this make it through to any tree? I don't see it on next, nor
on Linus. But it could be queued somewhere else.

I have sent v2 to patch 2 (xhci) as a reply, so hopefully it wasn't missed.
I can resend the whole series if necessary.

Thanks

--
Qais Yousef

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

* Re: [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating
  2020-05-18 14:57   ` Qais Yousef
@ 2020-05-18 15:19     ` Alan Stern
  2020-05-18 15:33       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Stern @ 2020-05-18 15:19 UTC (permalink / raw)
  To: Qais Yousef, Greg Kroah-Hartman
  Cc: Rafael J . Wysocki, Tony Prisk, Mathias Nyman, Oliver Neukum,
	linux-arm-kernel, linux-usb, linux-kernel

On Mon, May 18, 2020 at 03:57:49PM +0100, Qais Yousef wrote:
> > For both this patch and the 3/3 patch (ehci-platform):
> > 
> > Acked-by: Alan Stern <stern@rowland.harvard.edu>
> 
> Thanks Alan. Did this make it through to any tree? I don't see it on next, nor
> on Linus. But it could be queued somewhere else.
> 
> I have sent v2 to patch 2 (xhci) as a reply, so hopefully it wasn't missed.
> I can resend the whole series if necessary.

Greg, what happened to this series?  Did it just fall through the 
cracks?

Alan Stern

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

* Re: [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating
  2020-05-18 15:19     ` Alan Stern
@ 2020-05-18 15:33       ` Greg Kroah-Hartman
  2020-05-18 15:43         ` Qais Yousef
  0 siblings, 1 reply; 10+ messages in thread
From: Greg Kroah-Hartman @ 2020-05-18 15:33 UTC (permalink / raw)
  To: Alan Stern
  Cc: Qais Yousef, Rafael J . Wysocki, Tony Prisk, Mathias Nyman,
	Oliver Neukum, linux-arm-kernel, linux-usb, linux-kernel

On Mon, May 18, 2020 at 11:19:40AM -0400, Alan Stern wrote:
> On Mon, May 18, 2020 at 03:57:49PM +0100, Qais Yousef wrote:
> > > For both this patch and the 3/3 patch (ehci-platform):
> > > 
> > > Acked-by: Alan Stern <stern@rowland.harvard.edu>
> > 
> > Thanks Alan. Did this make it through to any tree? I don't see it on next, nor
> > on Linus. But it could be queued somewhere else.
> > 
> > I have sent v2 to patch 2 (xhci) as a reply, so hopefully it wasn't missed.
> > I can resend the whole series if necessary.
> 
> Greg, what happened to this series?  Did it just fall through the 
> cracks?

No idea, it's not in my to-review queue, so maybe it got merged
somewhere?  If not, can someone resend it please?

thanks,

greg k-h

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

* Re: [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating
  2020-05-18 15:33       ` Greg Kroah-Hartman
@ 2020-05-18 15:43         ` Qais Yousef
  0 siblings, 0 replies; 10+ messages in thread
From: Qais Yousef @ 2020-05-18 15:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Alan Stern, Rafael J . Wysocki, Tony Prisk, Mathias Nyman,
	Oliver Neukum, linux-arm-kernel, linux-usb, linux-kernel

On 05/18/20 17:33, Greg Kroah-Hartman wrote:
> On Mon, May 18, 2020 at 11:19:40AM -0400, Alan Stern wrote:
> > On Mon, May 18, 2020 at 03:57:49PM +0100, Qais Yousef wrote:
> > > > For both this patch and the 3/3 patch (ehci-platform):
> > > > 
> > > > Acked-by: Alan Stern <stern@rowland.harvard.edu>
> > > 
> > > Thanks Alan. Did this make it through to any tree? I don't see it on next, nor
> > > on Linus. But it could be queued somewhere else.
> > > 
> > > I have sent v2 to patch 2 (xhci) as a reply, so hopefully it wasn't missed.
> > > I can resend the whole series if necessary.
> > 
> > Greg, what happened to this series?  Did it just fall through the 
> > cracks?
> 
> No idea, it's not in my to-review queue, so maybe it got merged
> somewhere?  If not, can someone resend it please?

Sure, I'll get it out ASAP.

Thanks

--
Qais Yousef

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

end of thread, other threads:[~2020-05-18 15:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 13:47 [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating Qais Yousef
2020-04-24 13:47 ` [PATCH 2/3] usb/xhci-plat: Set PM runtime as active on resume Qais Yousef
2020-04-24 15:03   ` Alan Stern
2020-04-24 16:03   ` [PATCH v2 " Qais Yousef
2020-04-24 13:48 ` [PATCH 3/3] usb/ehci-platform: " Qais Yousef
2020-04-28 19:00 ` [PATCH 1/3] usb/ohci-platform: Fix a warning when hibernating Alan Stern
2020-05-18 14:57   ` Qais Yousef
2020-05-18 15:19     ` Alan Stern
2020-05-18 15:33       ` Greg Kroah-Hartman
2020-05-18 15:43         ` Qais Yousef

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).