From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E41C817AAD for ; Wed, 9 Aug 2023 11:37:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6357BC433C7; Wed, 9 Aug 2023 11:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1691581024; bh=BzAO1hbA+DDXbj1cRfz/AK+sFJ/y+3foj8deBLOtmzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l6sELjmeixZuHiRhMMorymzuM6HkZaQ4Q4yZW8lVYA11DcHyp1wZoAnGQj84ydloD bPHinFHpfrcKn8TW+GvefuVDCnbhGs+kiD8JiebWQYg8j/7SRyHQEtmADCkAoFnAgj pzLZ25XU8QtKVxoa2nUc5TDsAQ56PzvNDc1uoazU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guiting Shen , stable , Alan Stern Subject: [PATCH 5.10 078/201] usb: ohci-at91: Fix the unhandle interrupt when resume Date: Wed, 9 Aug 2023 12:41:20 +0200 Message-ID: <20230809103646.413041311@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809103643.799166053@linuxfoundation.org> References: <20230809103643.799166053@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Guiting Shen commit c55afcbeaa7a6f4fffdbc999a9bf3f0b29a5186f upstream. 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. According to the comment in ohci_hcd_at91_drv_suspend(), it need to reset when resume from suspend(MEM) to fix by setting "hibernated" argument of ohci_resume(). Signed-off-by: Guiting Shen Cc: stable Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20230626152713.18950-1-aarongt.shen@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-at91.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -647,7 +647,13 @@ ohci_hcd_at91_drv_resume(struct device * else at91_start_clock(ohci_at91); - ohci_resume(hcd, false); + /* + * According to the comment in ohci_hcd_at91_drv_suspend() + * we need to do a reset if the 48Mhz clock was stopped, + * that is, if ohci_at91->wakeup is clear. Tell ohci_resume() + * to reset in this case by setting its "hibernated" flag. + */ + ohci_resume(hcd, !ohci_at91->wakeup); return 0; }