Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752465AbcDZOFU (ORCPT ); Tue, 26 Apr 2016 10:05:20 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:36283 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752437AbcDZOFQ (ORCPT ); Tue, 26 Apr 2016 10:05:16 -0400 Subject: Re: [PATCH] musb_host: fix lockup on rxcsr_h_error To: Max Uvarov , linux-kernel@vger.kernel.org References: <1461653144-9450-1-git-send-email-muvarov@gmail.com> Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, balbi@ti.com From: Sergei Shtylyov Message-ID: <0f5ea48a-fadd-1739-28d0-ef62d6abd65c@cogentembedded.com> Date: Tue, 26 Apr 2016 17:05:08 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1461653144-9450-1-git-send-email-muvarov@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1155 Lines: 34 Hello. On 4/26/2016 9:45 AM, Max Uvarov wrote: > Fix soft lockup when resetting remote device attached > to usb host. Configuration: > pppd -> musb hub -> usb-serial -> gms modem > When gsm modem resets, musb rolls in incoming rx interrupts > which does not give any time to other application as result > it totally lock ups. Solution is to keep original logic for RXCSR_H_ERROR > and merge RXCSR_DATAERROR and RXCSR_H_ERROR branches to call same code > for setting rx stall with MUSB_RXCSR_H_WZC_BITS. > > Signed-off-by: Max Uvarov > --- > drivers/usb/musb/musb_host.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c > index c3d5fc9..f82d0ae 100644 > --- a/drivers/usb/musb/musb_host.c > +++ b/drivers/usb/musb/musb_host.c > @@ -1592,14 +1592,13 @@ void musb_host_rx(struct musb *musb, u8 epnum) > > /* stall; record URB status */ > status = -EPIPE; > + } else if (rx_csr & MUSB_RXCSR_DATAERROR || > + rx_csr & MUSB_RXCSR_H_ERROR) { } else if (rx_csr & (MUSB_RXCSR_DATAERROR | MUSB_RXCSR_H_ERROR)) { [...] MBR, Sergei