Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2420366pxb; Mon, 11 Jan 2021 09:10:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxxNdREXUv+dY130I/W+VaqLskF+t/EJeoy0e/P7GAVFXQCmKSgJd15f8q7I/RORGZd4xB X-Received: by 2002:a17:906:29c2:: with SMTP id y2mr327895eje.518.1610385044016; Mon, 11 Jan 2021 09:10:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610385044; cv=none; d=google.com; s=arc-20160816; b=V0uU2FZ/hK3pEzRztHa1a207rbA9c5H2u8mx3BGl4EOy2FUJuZtmTj1gPvnznuB0VD EmxPeuLcMiT2tUvi/z2ad4ZXWYEIKWBecNhXBpqDnMBY6LXhvgt3Tsc0z9xgEG5qVHMY +59PxcW07SXf3WYJPYZybSZKw68fPwGcT4yEF8/gm3nRCpfcqsuFX74qP4DDcy/uDHeB DplWPQCiUM4GIfOveK+ig0Lt0hKXnt5mwg0s2dUwDyDxCB+R7AlsqKtIT6A7kpwwTqG8 3FhwIthr2wap/1W3C0lPPlG8nMUpx+qD7PLC/SDBq0ZGqcgbO1+IbYjaeX3D8rY2r1WN c4Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=DxtOKlIzud5aWb8DhxGVo6z5zcTBSQdZHPxOH/GM5bQ=; b=EIxAy/c/P36OqJF7YqoUuLRQbHrrpzD2/a4vb5diTTVNYm8sCUyW+UtivnwPBjdrFv VdTknat4ZpOrLotgtVLQFA/5c+2Dj4dtvkGwu6y6+JVnCKEO9BThKyE2YM9IF5jxps3a xPXMf0w6ZCA6km3acs/cgIXPpY0z6UT0SqujpcewwJwjoAOGF3aDKiaAsWyKymt1D9Xo X3FRSXYllTG5zrGi2gEXZ2aeJDeK+7X2s+FuhhjAeLeY5Yb5mGsHGYk/FGiQF2nr1Xly 2CyGmAENusldmxU5R5R43cio3hVgIQa0bOX9TK3ix3KMRx/ETYVTJCdMlZwlbZcqrO1O H2Jw== 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 q23si27289ejn.17.2021.01.11.09.10.20; Mon, 11 Jan 2021 09:10:44 -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 S2389205AbhAKRHp (ORCPT + 99 others); Mon, 11 Jan 2021 12:07:45 -0500 Received: from netrider.rowland.org ([192.131.102.5]:55143 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S2388333AbhAKRHo (ORCPT ); Mon, 11 Jan 2021 12:07:44 -0500 Received: (qmail 1201009 invoked by uid 1000); 11 Jan 2021 12:07:03 -0500 Date: Mon, 11 Jan 2021 12:07:03 -0500 From: Alan Stern To: Longfang Liu Cc: gregkh@linuxfoundation.org, yisen.zhuang@huawei.com, kong.kongxinwei@hisilicon.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] USB:ehci:fix an interrupt calltrace error Message-ID: <20210111170703.GD1196682@rowland.harvard.edu> References: <1610364577-11617-1-git-send-email-liulongfang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1610364577-11617-1-git-send-email-liulongfang@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > > 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 >