Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16373150rwd; Mon, 26 Jun 2023 09:08:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tBvgduC27QLz6Fp13NXi1RfDBDa3bGuC4sQncCF4RDQRm1csauTsDb/kCF08Yu5ineM5J X-Received: by 2002:a05:6a20:6a28:b0:10c:c5df:8bb7 with SMTP id p40-20020a056a206a2800b0010cc5df8bb7mr23769226pzk.30.1687795699075; Mon, 26 Jun 2023 09:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687795699; cv=none; d=google.com; s=arc-20160816; b=w48a4+lQhZ7IP5td18YtaxLnZbAdzKmGCBLq2FNhkFT+jTheRYAr8DG2wBu/yfF8bE OsPfriDsNfN1u/XD/xtUqGj7TSfShVsHxpMOn3qQcE7Q8mRA9Qu66u9r48vgPLEa4VjJ IOYevW4jDysUwJmwd2yEjwMiCDfa5WBlkQkKScL9bm9HUWmi9NyFm+lXseyfYPwCti1k ommSkLI9N+Xm9zUirvztNUkPjITLYr4R03QNJwgggniYKBj6slkEKtGZ+E+sQz6p8CJF KJmmloiPZ+ZHGsGLfr7OdEZMddd3pt+nJi6DNDuqcJhCv7NHt83qGLd+YDJf216EytiD tEdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DtF7Bv5SvW35SPc+Oj+N7Ltt+S4wZnjN/u3LXzV4SC0=; fh=p6hXDfLnkh3p+6nwo8wjuwOLirv8n+0ACS+RN0p3UbU=; b=xXL6uhC9iiJhSkj9/k8oMtJcYR15EhCOgg/yPGX00SwnfQA9Xk4UYHYr45g1cWBUUP usFyAM0rA3ZD90itnB7084vBku9JXofW8HODRaqBKPL6lMkfgPEJO0a8OGzvM50wTsoM Nmihi8L4gcXKSqMspBmcmw9e2ZbdJhv/MSA14T0dQyW+avh0pbCS1CKKJqpV4QlU81wd bq40/6IsHKHyky9dDkvgLJPIk3BY2ldqQD00Q696CLZahmWjLBcY2Cb+rO1cUY1NJmzl xxykVBpDUl2HS/3qt6YMlNHVeiyo77TKl+atE8quuFI/7crWIfpDE3NqsjH7zxZg6Tmf p7Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pIhMjoXI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd12-20020a056a00420c00b00625559a78a2si4999200pfb.107.2023.06.26.09.07.58; Mon, 26 Jun 2023 09:08:19 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pIhMjoXI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbjFZP1h (ORCPT + 99 others); Mon, 26 Jun 2023 11:27:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjFZP1g (ORCPT ); Mon, 26 Jun 2023 11:27:36 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 984DBC7; Mon, 26 Jun 2023 08:27:35 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1b7ffab7ff1so6900885ad.2; Mon, 26 Jun 2023 08:27:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687793255; x=1690385255; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DtF7Bv5SvW35SPc+Oj+N7Ltt+S4wZnjN/u3LXzV4SC0=; b=pIhMjoXIxis/rCCSFQxeFzMYPXL5eVCVKvB0keoDspMGy9J9aRDZhqckNe5MTqhnRp GgQiCHHZ9wq0B7dCJ9vqzSuk61K4vBy8wMKf1hFdBZ2Mz1ZoZcw97UQ5sUG+dLGm6k7y qKLoiEVMLAzDo64siF3ZD1546ng8FY9QODIqq2J4cHJnjZtxed4QAT1texovd9KW/Pw7 /95u2W3GZLxLNKe3qvpiyVW+kjDsrcrAMepzt919i0R8GPxt0TrLwRmtWKqJ9aBlvtJp bQdnLAvaSTvTBabOQXFMhRwXeO397n3nrYTaHxyJ0z759Zol0cHmZjiIvBW1a1C0roeQ wrng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687793255; x=1690385255; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DtF7Bv5SvW35SPc+Oj+N7Ltt+S4wZnjN/u3LXzV4SC0=; b=h3z9iuCJA299OumKKM6oBN29B7bg2Glmw00DlGtn0NsGzwlkqqwi+NNwZstzN5vSuK iHNbOqU1ggyO2sROtSZ18BUfQyF6AIJf7WOq5BJ2Y0ruaJ/awzDAg9fqgt+MLNETEYcm LEFL1jlHrTrAV8x9VG2VwKKjowszCWS91z+SBlfY80uY9mafld1Eu35ey41NsHVHWLoK ceSIOQbo5jzfkZmQy+dAbTyCrly8ZsA0x9SXMiwC/2Y3fMdfvDQ+B96OHOPUFq1PhQ2t KUk7LbfE47UY0hClZlr2mnlhNJW4EqKhVfa9jE9FashIBfm5jDd19m7Ria092alYaoOQ jXRA== X-Gm-Message-State: AC+VfDx15NZxVqG0CQsGvWvqxbsBRlKe8AL++Jy7soZVeObjVohdXIl1 feVZJ5Yw/DJBCa24mne8Tz8= X-Received: by 2002:a17:902:ce01:b0:1b6:9b29:bb1a with SMTP id k1-20020a170902ce0100b001b69b29bb1amr4243063plg.9.1687793254920; Mon, 26 Jun 2023 08:27:34 -0700 (PDT) Received: from localhost.localdomain ([113.103.4.28]) by smtp.gmail.com with ESMTPSA id q2-20020a170902dac200b001a9bcedd598sm4368345plx.11.2023.06.26.08.27.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 08:27:34 -0700 (PDT) From: Guiting Shen To: stern@rowland.harvard.edu, gregkh@linuxfoundation.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@microchip.com Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Guiting Shen Subject: [PATCH v3] usb: ohci-at91: Fix the unhandle interrupt when resume Date: Mon, 26 Jun 2023 23:27:13 +0800 Message-Id: <20230626152713.18950-1-aarongt.shen@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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 --- 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