Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2963299pxb; Tue, 12 Jan 2021 03:02:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4noSlkor4kL1AZNj8/EU9G0d+YcfUSQExkfE2SEKcfe4kdGP8e24m1cpHYQgnreKJjjBw X-Received: by 2002:a17:907:7255:: with SMTP id ds21mr2791060ejc.258.1610449330806; Tue, 12 Jan 2021 03:02:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610449330; cv=none; d=google.com; s=arc-20160816; b=EjjjJ2bzYariEukYvjBr+psotLlZaD4xxUeFzbPWJfhAN9R2YUgQuVg5phcqmMxWFy LSJkZCK3GWWXVvltQ0G9VP7qI8B03l2tAVJbWspiq9ck1tE+N8FqGcA5iE3mE+jc8t0s mtPngU7S3Zi9dmoYaUv4yh8G5EZY9cPV8+dPWSGsn/GZs2WF9Cvf/lUWiSSB1awzGKLs zq1isVm0YuV4eIMDeGQs5Bh5IhGy/HSNFxDJ/YfXoedxiMPumKHwzvZ+06il9zu+ARRO fhKD60765Si+uXLZ1XNZ1z/nfaLD0baSDehWUzI5ZV8sIUf3gJ/tgiwmBogAgG5Rp0Ey f6GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=3p2+6wsG9iz5ZXn1N130KHbIAE3hdjxki9gABxI1hW8=; b=dK0e6cHRQf7/5EMGMdysnglqabc4gcooWN9sRWd0sOwCS6MBK4fZZcgpUtolqc5/4N nxmlv3sW4kmgqowtOdbNuHwZlvF0ZDPExvFTM+sLfy3jOBYr68Px0XZIXG7ncDgn1o9H 6hLSAHaXMDqCmyYwLe7fGzmSMW6UbmdU1myaQuSgOFiHknhJ/Yh21cOx8c8/IOxmtq2O GCx3+PEvmsCcieIdKLgtRS4vVcYhPFVxbW4zLC/+D5qGOTRLA6NIqbWo0SC/IwdTuIEK o6CJdzseGOanW8ASfHOPBWJ5oCU6MKmVH1NaVMhS5v89Y5c34zjbPSVOVkmKOi35A1W5 2Oyg== 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 lo18si937622ejb.108.2021.01.12.03.01.46; Tue, 12 Jan 2021 03:02:10 -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 S1729887AbhALBul (ORCPT + 99 others); Mon, 11 Jan 2021 20:50:41 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:10704 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728381AbhALBuk (ORCPT ); Mon, 11 Jan 2021 20:50:40 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DFD4p2B94zl3rc; Tue, 12 Jan 2021 09:48:42 +0800 (CST) Received: from [10.67.102.118] (10.67.102.118) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Tue, 12 Jan 2021 09:49:49 +0800 Subject: Re: [PATCH v2] USB:ehci:fix an interrupt calltrace error To: Alan Stern CC: , , , , References: <1610364577-11617-1-git-send-email-liulongfang@huawei.com> <20210111170703.GD1196682@rowland.harvard.edu> From: liulongfang Message-ID: Date: Tue, 12 Jan 2021 09:49:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20210111170703.GD1196682@rowland.harvard.edu> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.118] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/1/12 1:07, Alan Stern Wrote: > On Mon, Jan 11, 2021 at 07:29:37PM +0800, Longfang Liu wrote: >> The system that use Synopsys USB host controllers goes to suspend >> when using USB audio player. This causes the USB host controller >> 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 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 > > Acked-by: Alan Stern > OK, I will add it on the next patch Thanks, Longfang >> --- >> >> Changes in v2: >> - updated cleared registers >> >> drivers/usb/host/ehci-hub.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c >> index ce0eaf7..a99c1ac 100644 >> --- a/drivers/usb/host/ehci-hub.c >> +++ b/drivers/usb/host/ehci-hub.c >> @@ -346,8 +346,12 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) >> >> unlink_empty_async_suspended(ehci); >> >> + /* Some Synopsys controllers mistakenly leave IAA turned on */ >> + ehci_writel(ehci, STS_IAA, &ehci->regs->status); >> + >> /* Any IAA cycle that started before the suspend is now invalid */ >> end_iaa_cycle(ehci); >> + >> ehci_handle_start_intr_unlinks(ehci); >> ehci_handle_intr_unlinks(ehci); >> end_free_itds(ehci); >> -- >> 2.8.1 >> > . >