lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210111170703.GD1196682@rowland.harvard.edu>
Date:   Mon, 11 Jan 2021 12:07:03 -0500
From:   Alan Stern <stern@...land.harvard.edu>
To:     Longfang Liu <liulongfang@...wei.com>
Cc:     gregkh@...uxfoundation.org, yisen.zhuang@...wei.com,
        kong.kongxinwei@...ilicon.com, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] USB:ehci:fix an interrupt calltrace error

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 <liulongfang@...wei.com>

Acked-by: Alan Stern <stern@...land.harvard.edu>

> ---
> 
> 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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ