[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4cf867a9-3c78-403a-aaeb-91f6cf099a3d@rowland.harvard.edu>
Date: Thu, 22 Jun 2023 10:29:43 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: Guiting Shen <aarongt.shen@...il.com>
Cc: gregkh@...uxfoundation.org, nicolas.ferre@...rochip.com,
alexandre.belloni@...tlin.com, claudiu.beznea@...rochip.com,
linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: ohci-at91: Fix the unhandle interrupt when resume
On Thu, Jun 22, 2023 at 10:57:39AM +0800, Guiting Shen wrote:
> The ohci_hcd_at91_drv_suspend() sets ohci->rh_state to OHCI_RH_HALTED when
> suspend which will let the ohci_irq() skip the interrupt after resume. And
> nobody to handle this interrupt.
>
> Set the ohci->rh_state to OHCI_RH_SUSPEND instead of OHCI_RH_HALTED when
> suspend to fix it.
>
> Signed-off-by: Guiting Shen <aarongt.shen@...il.com>
> ---
> drivers/usb/host/ohci-at91.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
> index b9ce8d80f20b..7a970e573668 100644
> --- a/drivers/usb/host/ohci-at91.c
> +++ b/drivers/usb/host/ohci-at91.c
> @@ -645,7 +645,7 @@ ohci_hcd_at91_drv_suspend(struct device *dev)
> * REVISIT: some boards will be able to turn VBUS off...
> */
> if (!ohci_at91->wakeup) {
> - ohci->rh_state = OHCI_RH_HALTED;
> + ohci->rh_state = OHCI_RH_SUSPENDED;
It looks like this change ignores the comment immediately above it
(just before the start of this hunk).
If you want to find a way to handle IRQs better after the controller
resumes, maybe you should change the resume routine instead of the
suspend routine.
Alan Stern
Powered by blists - more mailing lists