Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15060151rwd; Sun, 25 Jun 2023 09:19:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7wZpwqM81B7WFA3cItn6DzFcI9Z4hpPHJQnaVgw5qibkE/74PjPzidi94id1nhG3PINizX X-Received: by 2002:a05:6a20:3d88:b0:10e:96b5:45fa with SMTP id s8-20020a056a203d8800b0010e96b545famr20604147pzi.43.1687709946188; Sun, 25 Jun 2023 09:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687709946; cv=none; d=google.com; s=arc-20160816; b=nFOJZpHILz/2ehduJnQKOC2RjyjaAFLJPYGNhhm/fTSIpUZ5jAlGMPPEY9opECHGTc Sg8/6lhe1FC//IVBJKU+8iHXjDJmDd00EcHDHsX0i0CsNcWmbQPq6ZfilhiEffbswvGf 8ByUKkS9UfRY+8uTrANEMOAN0voGQSkm5AJE5+izkwVZJE2OyqFA13shALzNWGiWqbDM 796sTn38MpE7UkpElnCHky/+kaXWL23W2PImWRM3kqvAUfO5Nz59+NurcLguZlZbWk1U 1ToTOA/RfudS+ikyGkMI39gMt+gWtjSaBraZKdIVWJP7tv8B3H08cSA9SeBqJxT9/xyM jt3A== 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=D0lDnChJx3uU6azmWebeFvx41PSoyDt49evO4AFiEPA=; fh=p6hXDfLnkh3p+6nwo8wjuwOLirv8n+0ACS+RN0p3UbU=; b=APGmyJOQsCAxqknb4ZUzVsHePI02ikrCgthvtKFAxhdzh+lgHdrQ2O/bbRqsQPs8UM 4jRu5CfInb2+kxFaZnOyXHR8eOsA/dXUXrGr3hMLFm6tG5euPXB1s2ixHmuOeqA4Fyas tngz4jF4lx/OCGGW8ddfNSqwjmhxZpxEN6g1bUmj939s7309r99AqjRkSGC7oMh4Ohf8 FZFgvEDIxXjhNokny58QmlcQYs86k7lFpj2SQLLASnOUDvhN7rQUwLXZnY49BJoKsSEs TxvQB70l9jkWkKMd5LiGcIoM3fv8MVnK8t556OJCEliJ4KyiwplfURIMAn9Vd2wYHWHQ X9Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=K2X3Y0Cg; 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 w4-20020a656944000000b0053fb89f1e10si3322274pgq.501.2023.06.25.09.18.54; Sun, 25 Jun 2023 09:19:06 -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=K2X3Y0Cg; 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 S230516AbjFYQQO (ORCPT + 99 others); Sun, 25 Jun 2023 12:16:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230482AbjFYQQN (ORCPT ); Sun, 25 Jun 2023 12:16:13 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 505D918E; Sun, 25 Jun 2023 09:16:11 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-66872d4a141so945316b3a.1; Sun, 25 Jun 2023 09:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687709771; x=1690301771; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=D0lDnChJx3uU6azmWebeFvx41PSoyDt49evO4AFiEPA=; b=K2X3Y0Cg4GQfrBLsBV6d6vgTckaV/4LGU2izcIcoWNarMLF3GUmw3I7fv7Xbmwb6U6 2M7AcMU7WIQWTw0j9DOZJK7QklX8eCSDZC/bvbDUIYuWw8jyfFrXm6Ua/qOWPxAUL3yv ev0ys45Dzt4dMuR9waRg+Mp/wW2E5xLL+UJY8qgPnjZVy6x1EAz+opbgqE02rtx8TLkn CN3D1F5KResE4VeeHZq1AnAgGwl5hxTW5whwy9eZWncijMm6Ai9/ZkMUy7lm7YExHh12 tsrQX9p8DqF9O7TAgQZwcIK+fRoMFLqEE6P327ouojy0Jdq2/oW5tOKXgor03AWZeLxl cIYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687709771; x=1690301771; 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=D0lDnChJx3uU6azmWebeFvx41PSoyDt49evO4AFiEPA=; b=guk0NSx9UeSeu29RPVSKdIsRHZDZXzkUJe8s7B/aZuV0PCXw79zBnQjPekqwMYaOsQ RL+lZJFhB5sJ8twmp7jHS8Lmi+qU81sMLdl/UWgk/R1MW9DMhewA9rz5MtNyH1Fg8LOu hnl0x8DrfZQvdJTag4HoDdoJ+fxqL5VU9+IkFvEop1AJQfMtzAjqpGO+bQit6m/antSm AGBBugTPfcq5plIVsXtxB/UJu4I/wMRzXpithZkHnsv42bLpFd9QBPbe9I5bNCnOMwpQ X+w//OYUrlwW8rb2zdQpat3FEhj65FnS4dIcLV8TQJ/10wrjua9XPt1cxj14J7KkPjxU YPMA== X-Gm-Message-State: AC+VfDwp585VgbIOqD8kWCA+3TsbILUiMZFFO8fqHS2RQMeDccdaS/Ze 3TV17vDPFWB3ioAnPGY8UfE= X-Received: by 2002:a05:6a00:2282:b0:66a:3eb5:92bf with SMTP id f2-20020a056a00228200b0066a3eb592bfmr11483551pfe.16.1687709770632; Sun, 25 Jun 2023 09:16:10 -0700 (PDT) Received: from localhost.localdomain ([240e:3b4:d0:6750:b853:cf8f:2208:c89a]) by smtp.gmail.com with ESMTPSA id g6-20020aa78746000000b006749c22d079sm948312pfo.167.2023.06.25.09.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jun 2023 09:16:10 -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 v2] usb: ohci-at91: Fix the unhandle interrupt when resume Date: Mon, 26 Jun 2023 00:15:53 +0800 Message-Id: <20230625161553.11073-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. Signed-off-by: Guiting Shen --- drivers/usb/host/ohci-at91.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index b9ce8d80f20b..1a0356d9ea15 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -672,7 +672,12 @@ ohci_hcd_at91_drv_resume(struct device *dev) else at91_start_clock(ohci_at91); - ohci_resume(hcd, false); + /* + * need to reset according to the comment of suspend routine, + * otherwise the ohci_irq would skip the interrupt if ohci_state + * was OHCI_RH_HALTED. + */ + ohci_resume(hcd, !ohci_at91->wakeup); return 0; } -- 2.25.1