Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp410740pxu; Thu, 26 Nov 2020 01:40:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1TdoeK8gqfLuWRPBT3FsHye+LN3M30TEGRanaKRNwzYm/ZMdnlz6L3I372KVv94NPLPbe X-Received: by 2002:a17:906:76c2:: with SMTP id q2mr1796400ejn.444.1606383621299; Thu, 26 Nov 2020 01:40:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606383621; cv=none; d=google.com; s=arc-20160816; b=X4bWEiwpNcAqamwn3cq7AKBwIC27Y+AcFd7/x/hYjzYUDPYwh9dyXMLP41cQlnD2GF MYa8+VdGa919zgRWvryjSgilBn7851j7Pkp+WDI2doEsC3Z1eBX6ceBIS8kE+DoKejMQ ld9G8DGzI0BS1cqAdLOR7Ew7zkpK4P0L+K/M4+LQ5PCWAx2ToHudNwuK9Cf1nckrIWRy hKyghTAatWtycJfU5Hfm81E9/M4sJYGlvoWFCR97aSdAgZLw3SrvKINDPAHuFvBhE678 uzA7M7PtuPOQvBkg13yIh7N2XJLSkKhZ6ou/R29XFXMMMeYJP555MrINSmp8toK/u55T VHFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=SrTR0xL6EgDhQ/UI34/beCoQGXr4u+ffRkrjpTOJqTw=; b=PSUtqocGC3iUQcLbhTNSzc0rQwOG8ZLzZZNVFS4AuS7WIaDD2yabkRjPZitgNJ+fO5 hYI0Lw8f2kc/cQpkIYof+l2dDXZU2qJ0hY/nGMTQBNDst9mBjwkxb/NqE2ZFn05aTokB Lj46lvFOR2rWIfT2rDSGHTZQw/ct4QFcCbiTDkYRSZJ2AzgqPm8xTcqNz7f7sLoSMn32 j8Ax01Yzq1Zh7BLqwWLxkosWDdjApokUiCB8h2FeknHG1INJXIzn+8V0BjOpb93rp9mp vlOtFVsq8oj8HZFzuUX0Fhs6/tQH+q6+n4g/5l8F254zTahiDdwFeGhVCqXInEszjOFd aFjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u11si2824226ejy.598.2020.11.26.01.39.58; Thu, 26 Nov 2020 01:40:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387475AbgKZDgR (ORCPT + 99 others); Wed, 25 Nov 2020 22:36:17 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:7688 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387468AbgKZDgR (ORCPT ); Wed, 25 Nov 2020 22:36:17 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4ChNh83Y69z15STQ; Thu, 26 Nov 2020 11:35:52 +0800 (CST) Received: from huawei.com (10.67.165.24) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Thu, 26 Nov 2020 11:36:11 +0800 From: Longfang Liu To: CC: , Subject: [PATCH] USB:ehci:fix an interrupt calltrace error Date: Thu, 26 Nov 2020 11:34:33 +0800 Message-ID: <1606361673-573-1-git-send-email-liulongfang@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The system goes to suspend when using USB audio player. This causes the USB device continuous send interrupt signal to system, When the number of interrupts exceeds 100000, the system will forcibly close the interrupts and output a calltrace error. When the system goes to suspend, the last interrupt is reported to the driver. At this time, the system has set the state to suspend. This causes the last interrupt to not be processed by the system and not clear the interrupt state flag. This uncleared interrupt flag constantly triggers new interrupt event. This causing the driver to receive more than 100,000 interrupts, which causes the system to forcibly close the interrupt report and report the calltrace error. so, when the driver goes to sleep and changes the system state to suspend, the interrupt flag needs to be cleared. Signed-off-by: Longfang Liu --- drivers/usb/host/ehci-hub.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index ce0eaf7..5b13825 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -348,6 +348,11 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) /* Any IAA cycle that started before the suspend is now invalid */ end_iaa_cycle(ehci); + + /* clear interrupt status */ + if (ehci->has_synopsys_hc_bug) + ehci_writel(ehci, INTR_MASK | STS_FLR, &ehci->regs->status); + ehci_handle_start_intr_unlinks(ehci); ehci_handle_intr_unlinks(ehci); end_free_itds(ehci); -- 2.8.1