Received: by 10.223.176.46 with SMTP id f43csp2342155wra; Thu, 25 Jan 2018 08:26:04 -0800 (PST) X-Google-Smtp-Source: AH8x2256rB0nrWrgz03gqDMO8zRJWwrTgxMgK+y/ru9tjgzpBYCnzEUIb/lVSXxQdfJpbGpcpvP0 X-Received: by 2002:a17:902:7597:: with SMTP id j23-v6mr2253748pll.191.1516897564535; Thu, 25 Jan 2018 08:26:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516897564; cv=none; d=google.com; s=arc-20160816; b=qdWDXSHqRMBOp6FMKcBBzVVRi/dyCsaAGoNXkey7ZWvHQGPGHrLpyaNiTKSqb3BSRD LamMVq3t9Pl6B1o+Kn2qeefjGSgC3APZov3yNA6pagCVHm2ibViLJn0Mxf716xKoyDAD 221dA7dkIGOktVqrr4rDheSWI+UbYR2GVtm3QzipX9Ur1lHkGL/ZRo0MxUCrtRyfxRhe Tec59n3DJLrH4Vapd12MGAlhW05KEPutBEMyqK5pvR1Ytf/3Oqb04G7815R6gQWSQxPJ tqwGTy5FfAca/XUqYr4M6PLvEuFJvfTzbj0SDED/TN7UPDwcSv00iY1VYzkgMaY/ZDfi V6hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=zSfJP3yIr0eRa1t3TBgb3nF8u0urd9KByTe3urPhtPU=; b=i1+iT2swQCCTGLZzXGqvDMsHK6TVteADBjlWgTIwqL3PAx9/PW9US2QwWZ3S8uUuIL VhM6tT8meEZj99RQ6mIk7s6v3pITjiLYwjSJ1tL+UvSgo6T0MVx3wJnXuO2SAPSV8fEW 1m1qilGBX/X1mGv+89gDXkqHXvNusBr339WF3InuLV5OW0C+8Je03raRudN4mNIxGd8V tfgRnOg45W4E6XrOQ+hxhdjcfrmuS32hRSudZlEA6PsR6BFGH8DkClnKs4XuhQbhfaCh laalj4B5dgmS+LcBYEmjhL1UD8JWHyFogh88RXzFrsLeWECN5bvYSC4mmpLattu2EzR4 dkGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EKDQ+zk8; 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=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si2136359ply.512.2018.01.25.08.25.49; Thu, 25 Jan 2018 08:26:04 -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=@gmail.com header.s=20161025 header.b=EKDQ+zk8; 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=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751232AbeAYQYJ (ORCPT + 99 others); Thu, 25 Jan 2018 11:24:09 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:38455 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbeAYQYE (ORCPT ); Thu, 25 Jan 2018 11:24:04 -0500 Received: by mail-wm0-f46.google.com with SMTP id 141so15886494wme.3; Thu, 25 Jan 2018 08:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=zSfJP3yIr0eRa1t3TBgb3nF8u0urd9KByTe3urPhtPU=; b=EKDQ+zk8nJPVOjgYvgIn25bouix9v6SVi+TNJGtpmaWr/qkkkaLheEQU5EMY2x+aaF 1thFwZ7cZL4bZc5iLfFx4jDX/hjp8qhdrhkgjMYEWc4Nzy/+YuCbjZZAiQ3pmfn200m4 WvlJ4zqqzYWFQljsUoOUEsvcGT5RiaOMlv6Ln2DrwNJX/KOwwpVMQjOAJZBCQ3Xb1Hwh kfBVhJ80G0TPA6G20cOdCv3LEJ+C6Xm7n3x16YLewBlb/XnbUdt9j4AGawaAHpZ1TOYF shkyjozFxZcwfLGMKNCQQ9eH/rswfa4xdR8SYLSNr7ORWFHzh7rOnPhl73JnImPMj/1N J1ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=zSfJP3yIr0eRa1t3TBgb3nF8u0urd9KByTe3urPhtPU=; b=qzLIjcOtPGuh2FrCBEyOMP24jUBdb3izw44gIL/BiD1iRrvJqA5l8VWGu8WkjskcrB ptzZ9YCEoWjJdRUA/EiX70jjIs/ARwTV9yllnLaWLwQqs8yojwDcUkC4c9I0RC4FtW9o SmYfqkpDu71jV+h3/QKUzXrvsD1tUulpAVKfDGi7mmyht2kUVxQcapfeAGY+obCVBEqK NwwsjSB2T3cUaVUxP47fO+hMTk5/QUmmhrTCb4LR7FvTbX/AdEHKBiq6hHqZaDQydruZ MJLDDAiyBeyLjisUSRZf+vIzfAVKCkh5jK9nScp6WXMVrsd9g5axbfDGpS+PPZCoo8rG vkNQ== X-Gm-Message-State: AKwxytfBtgaK8/VkM1xkm2QKldoZPwTtE/fXmVDXuGyqX7p4DzapZ7Hh epF1UP/JLy8GXyk8dRpFcdV+/ux3OVwaXmHMva0= X-Received: by 10.80.144.132 with SMTP id c4mr30194034eda.13.1516897443113; Thu, 25 Jan 2018 08:24:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.168.67 with HTTP; Thu, 25 Jan 2018 08:24:02 -0800 (PST) In-Reply-To: <20180125154508.GB6590@uda0271908> 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> <20180125154508.GB6590@uda0271908> From: Maxim Uvarov Date: Thu, 25 Jan 2018 19:24:02 +0300 Message-ID: Subject: Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error To: Bin Liu , Yegor Yefremov , Maxim Uvarov , kernel list , linux-usb , Greg KH , sergei.shtylyov@cogentembedded.com, Tomas Paukrt Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [1] says that issue is with back ported driver to 3.12.10. Can the latest kernel be tested on the same hw? Maxim. 2018-01-25 18:45 GMT+03:00 Bin Liu : > 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. > -- Best regards, Maxim Uvarov