Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16385738rwd; Mon, 26 Jun 2023 09:16:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ50ZJ1gszVZm2PAqI11Qfl4HeDnYENsWmhD25+UlhnjaVfbdpKqNW200aq0guEbQAwC4QtK X-Received: by 2002:a17:907:78c4:b0:991:fdfc:e16f with SMTP id kv4-20020a17090778c400b00991fdfce16fmr464645ejc.24.1687796205175; Mon, 26 Jun 2023 09:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687796205; cv=none; d=google.com; s=arc-20160816; b=RKSKWdLFwABCemayT0CpZsbDpHFl20vcXSLLCbo/2UXyFTl2XwZuFNNDfuoqfSUovK S2Zox578H/CznVdNE9svtjU2vPpC0PbLRk2rGVfcNXJvlpd4nMxwxFJApD79zU98YDsy z5YM46zm98nNs6kfDuUlgnUGeLgjyAPxqR/dvD8yvVXn6GCYLY0QRoNN76F8t/z1NqZA 8Y0OWk9voXF9FQre1SDCTDoBpyalbgvpGb18M8YGFSVqqnyUcZFePUpHrocWiYlwfq5m 5wa0xzAyuP2/FKn4SPolQXamB1X9R1OUrwBpVFWFfq+uXlETf7WV9uQs5kpQm5QCGz5u B+2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=miOqVeYXKwKBoDh5Q5IoTF/ra27EMaV81fpUsKLX/P8=; fh=YbSK8HHyO/Stm/2hnktMekoLLI8c6cewIW6GSrZwdP0=; b=UMcnY6vetSsOVS+vHCxs72zMqQ5rIFTXjGppY16laDajpHygfuX+jZ62rL4UwvGRLy cRj5z/KE+E83QJYEto4xyuJsgpB5KZKErs1mlONcGzAMUa8B2YQeza8AqqKYdYjxZORV 5sJ4XiGc5aunPgnq1nuZxQYjs3MkTmRAFAmF25KRSLKozs77Np/5QtNyA9/nLA0g8rYf 43d7RQOgEzlltARanDQELY0ZvszLtfweL1vNoKXZrqSqb0C6na8yzpMBjWMfX+L1UIrQ u19mdSjHjR/xIbaldbtEfiMO69LXMVDdzGJ5BAPhdWUWqQjGk9uT1cZaGu4TkJtcH2de 3LYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mc27-20020a170906eb5b00b00991d19c47e2si980128ejb.520.2023.06.26.09.16.17; Mon, 26 Jun 2023 09:16:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231705AbjFZQJA (ORCPT + 99 others); Mon, 26 Jun 2023 12:09:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231666AbjFZQIx (ORCPT ); Mon, 26 Jun 2023 12:08:53 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 70DCE10F4 for ; Mon, 26 Jun 2023 09:08:47 -0700 (PDT) Received: (qmail 838352 invoked by uid 1000); 26 Jun 2023 12:08:46 -0400 Date: Mon, 26 Jun 2023 12:08:46 -0400 From: Alan Stern To: Guiting Shen Cc: gregkh@linuxfoundation.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@microchip.com, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] usb: ohci-at91: Fix the unhandle interrupt when resume Message-ID: <8908b612-0a87-428b-9d78-38fbc04354bf@rowland.harvard.edu> References: <20230626152713.18950-1-aarongt.shen@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230626152713.18950-1-aarongt.shen@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 26, 2023 at 11:27:13PM +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. > > 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 > --- Reviewed-by: Alan Stern > drivers/usb/host/ohci-at91.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c > index 533537ef3c21..360680769494 100644 > --- a/drivers/usb/host/ohci-at91.c > +++ b/drivers/usb/host/ohci-at91.c > @@ -673,7 +673,13 @@ ohci_hcd_at91_drv_resume(struct device *dev) > 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; > } > -- > 2.25.1 >