Received: by 10.223.176.46 with SMTP id f43csp2293227wra; Thu, 25 Jan 2018 07:45:58 -0800 (PST) X-Google-Smtp-Source: AH8x226Yy6kKGieYGrP9FTOP9bV5LS6nmfvQg9t4uXsGc1b/S6DbzWGfni7BdxPIaNHEH75LUtDe X-Received: by 10.101.80.69 with SMTP id k5mr2617063pgo.431.1516895158876; Thu, 25 Jan 2018 07:45:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516895158; cv=none; d=google.com; s=arc-20160816; b=rjww+twAdE/0jdjRiufGNH54r2SCK/phY6eRxNvZ5rweH3j24AIECHaOrHz+izwhdr oZ7WLDCz9nqhLLgrkqvupuOLEJnNGCACj7ctWyyG14HPqqesWPwU190JNTCPEVuJmfD2 3G1sm5/RGcRaJI1uf1PI7lhb/gBFO78p7hCFZGTzv/nQKmsnbiWeKWvUyMEdjefwYfOy RqxstSWK3xZ4OzT8HEvXt3Ti+lCY1E8cpi7LmxxwBMMKJS4SgNSnnIk3LO0RMowoCovW IAGODtj5imv4Bz/jpUPhy0dCiZDls/Og8FBfcL6xFn4oMkTTC+ZQpJG2pvwxFBihowfF W4oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=OnkhnexLuCCqrqoINeQBuPAPDDGcnmVq+VKZHYiAEpM=; b=ZmYODdNQwU68eYK/OIaJP+dI5ucijkH66WPUQhsyOqFLExxQ0ddeKQxl4CSwjhtQSs CjmnahWy8a6DzdJiQVJXbfdEwXHnwE5E3fa6xGFhtaRCJojCejQoWX/tblK2/C7pU+VB KryxNxCTpYMcaYNNRltGLtzPBWd5XDKQT1R+uN+1cTI/yViuEUKCitc8/Ri7rKKb8p1N 2aBhzoDV2lEu/+wAHSVWaDoN51u5mWiq0OJzYmTQHHb2sWcIPZWQj26NbUQeXbLzNtOE iL23H69xBynFyfYc1hh3DprjluXwc3pHf9MgGzZC532dWSfDbrH9k5VK4ML+oqO8y8EI 8+cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZmMdxMtA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h192si1691546pgc.123.2018.01.25.07.45.44; Thu, 25 Jan 2018 07:45:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZmMdxMtA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751181AbeAYPpS (ORCPT + 99 others); Thu, 25 Jan 2018 10:45:18 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:22882 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750783AbeAYPpR (ORCPT ); Thu, 25 Jan 2018 10:45:17 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w0PFj9bx027355; Thu, 25 Jan 2018 09:45:09 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1516895109; bh=HbNVxcKRTvps3hxrLr/WTyMnEEV1RDsRow5OtEroJiE=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=ZmMdxMtAnYQhd48bAbab+hxSI6U+uL7fjKotf4nrZ2pZn/tI2Yyt9R3Lu9Z+NDBhp bMsISP/K2JPRb28JIEGAAjGzCNxZs9g9Kar3D38VOOHcPyQSg9VNCiM/7nAHIC+Lzh CXLptEw0jHNeyxNBwzbx+rykHi2HXWnuHk54Tfw0= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w0PFj9vV010240; Thu, 25 Jan 2018 09:45:09 -0600 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 25 Jan 2018 09:45:08 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 25 Jan 2018 09:45:08 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w0PFj850028618; Thu, 25 Jan 2018 09:45:08 -0600 Date: Thu, 25 Jan 2018 09:45:08 -0600 From: Bin Liu To: Yegor Yefremov CC: Maxim Uvarov , kernel list , linux-usb , Greg KH , , Tomas Paukrt Subject: Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Message-ID: <20180125154508.GB6590@uda0271908> Mail-Followup-To: Bin Liu , Yegor Yefremov , Maxim Uvarov , kernel list , linux-usb , Greg KH , sergei.shtylyov@cogentembedded.com, Tomas Paukrt References: <1461739918-9583-1-git-send-email-muvarov@gmail.com> <20160427154620.GB5604@uda0271908> <20160427191356.GA16821@uda0271908> <20160427212823.GA14645@uda0271908> <20160428143714.GA7222@uda0271908> <20160503134813.GA690@uda0271908> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yegor and Max, On Tue, May 03, 2016 at 04:25:58PM +0200, Yegor Yefremov wrote: > On Tue, May 3, 2016 at 3:48 PM, Bin Liu wrote: > > Hi, > > > > On Tue, May 03, 2016 at 12:03:52PM +0200, Yegor Yefremov wrote: > >> On Thu, Apr 28, 2016 at 4:37 PM, Bin Liu wrote: > >> > Hi, > >> > > >> > On Thu, Apr 28, 2016 at 09:51:37AM +0300, Maxim Uvarov wrote: > >> > > >> > [snip] > >> > > >> >> Hello Bin, > >> >> > >> >> yes, it also works with that reset and go to finish: > >> >> > >> >> diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c > >> >> index c3d5fc9..8cd98e7 100644 > >> >> --- a/drivers/usb/musb/musb_host.c > >> >> +++ b/drivers/usb/musb/musb_host.c > >> >> @@ -1599,6 +1599,10 @@ void musb_host_rx(struct musb *musb, u8 epnum) > >> >> status = -EPROTO; > >> >> musb_writeb(epio, MUSB_RXINTERVAL, 0); > >> >> > >> >> + rx_csr &= ~MUSB_RXCSR_H_ERROR; > >> >> + musb_writew(epio, MUSB_RXCSR, rx_csr); > >> >> + > >> >> + goto finish; > >> >> } else if (rx_csr & MUSB_RXCSR_DATAERROR) { > >> >> > >> >> if (USB_ENDPOINT_XFER_ISOC != qh->type) { > >> >> > >> > > >> > Thanks for testing it. > >> > >> Have tested your patch and now both FT4232 and Huawei don't freeze on removal. > >> > >> Bin, Max thanks for fixing this issue. > >> > >> Tested-by: Yegor Yefremov > > > > Thanks for testing. > > > > Can you please test the patch [1] instead? I'd like to use it as the > > fix. > > > > [1] http://marc.info/?l=linux-usb&m=146222355213935&w=2 > > The patch behaves the same as the previous one. Sorry for bringing up this old thread, but it seems to be too aggressive to stop scheduling further urbs on errors [1]. So is it possible for you to re-test your usecase by reverting commit dbac5d07d13e ("usb: musb: host: don't start next rx urb if current one failed") to see if only commit b5801212229f ("usb: musb: host: clear rxcsr error bit if set") itself solves your issue? I know you have tested the patch in [2], which is similar to commit b5801212229f, but tha latter doesn't have 'goto finish' which does dma cleanup on errors, it makes more sense to me. But I'd like to have you tested with reverting dbac5d07d13e to be sure. [1] https://marc.info/?l=linux-usb&m=151689238420622&w=2 [2] https://marc.info/?l=linux-kernel&m=146185425805967&w=2 thanks, -Bin.