Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11007610rwd; Thu, 22 Jun 2023 07:38:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6sHguZrpo9/UGXtXPlfhwBWoKVydFT1OE0hBKIdWNGE/HZot8xoUf479Y1z7+mAT+HsJvF X-Received: by 2002:a05:6a20:4308:b0:10b:f980:18d3 with SMTP id h8-20020a056a20430800b0010bf98018d3mr16008245pzk.1.1687444706905; Thu, 22 Jun 2023 07:38:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687444706; cv=none; d=google.com; s=arc-20160816; b=XrQwg4SC+hw4BTNWLNJFRclgOG9uo+vv8d52HWeNZuJyP0cXjYOBNjLHvvT35sns+h 00xJhmxdOcwLN8ME7Ud9tD7p4ZJHHfBOE2hJ+IRkJfFkidwxGcLkFPFpEP85ggtiTGt9 Sow8lhJptMZoegxH9P6D1PftSbYF1MEpcYHxmZVxQXOkxD7boVcgm0owGgNt5xYOgqaW Ti/a0iEp33/G1QH0n0Nsal6tLBHmWLvsQVOZ65u0FrQ+zimUwYxal1NqPqHixN9lx0oE shYCFE5c8D1xdS4HP/C2jL39/LOlIMYZwT9KxFas348+4ndn90/R6pg8r6BB50xPSRAq 1oLw== 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=dEddQvny79Fh+b+l5z0mG29VGZh4qU/6c1gVOqskIq4=; b=K04tjYjdw+l4giFdOkdos/263nZq7y+X6nyRQVVcWoY046ib2XScyNu3M3T4GuM5nb w68W/cDZ2qWft4IdVowtErrflIORFRJbXfJ291my7rZP2oIfNetn0m/+4cNwA3i/oXAa o+qLskCjXb71IbpRK6AMzz8A9g4XfuUflrZXC1ZaMMD/T7aV3fqOtW4fem96c7i5F8QZ YGdMR5nn+SZ6ZIhyb1lmKl6Dpc1cogmmrAK8NxyV6pz5mmnt9SDaP8WrKqxV7aFdjet9 yKre1NIT/dvXqbOXsmQtvTXajU+uAcJjfinuVqV3ymuO7DYWZYYQ1au8inYWxUcuwwKK b+Ng== 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 e13-20020a056a0000cd00b006689097053csi4977702pfj.48.2023.06.22.07.38.12; Thu, 22 Jun 2023 07:38:26 -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 S230395AbjFVOaf (ORCPT + 99 others); Thu, 22 Jun 2023 10:30:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbjFVOad (ORCPT ); Thu, 22 Jun 2023 10:30:33 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id D1C421FFE for ; Thu, 22 Jun 2023 07:29:51 -0700 (PDT) Received: (qmail 717012 invoked by uid 1000); 22 Jun 2023 10:29:43 -0400 Date: Thu, 22 Jun 2023 10:29:43 -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] usb: ohci-at91: Fix the unhandle interrupt when resume Message-ID: <4cf867a9-3c78-403a-aaeb-91f6cf099a3d@rowland.harvard.edu> References: <20230622025739.13934-1-aarongt.shen@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230622025739.13934-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 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 > --- > 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