Received: by 10.223.176.46 with SMTP id f43csp543626wra; Fri, 26 Jan 2018 03:05:13 -0800 (PST) X-Google-Smtp-Source: AH8x2245dQRANdqUCq7YtE0DNlF5zDd6hmZBJA8xeeScb7pfruJVjv5FOwVps79+JnST8asyAplp X-Received: by 10.98.89.71 with SMTP id n68mr3719724pfb.121.1516964713139; Fri, 26 Jan 2018 03:05:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516964713; cv=none; d=google.com; s=arc-20160816; b=P+ASRz81YqPOD2FTOZWAn2dt/EtGIjheJmwFrVBBVwun+IoEUQ3Ht7z4BlCci34Tz5 /EuKvvrRVTRP44AhZGYqeC1YyXB18o0nDD1rZcmVXf+nAbf+d5FqwjJsSoH6xsqrdG3Z Ot+biVkJ+c+HaNKKiOICkSD6xcCOJtvud07wnsS/KVeXVogGTmrjFSkpPVYsvmk8TyuX SZJ9TRjvbMihV6FxH8fiCa/vRNEdU3k80jggCzN/U4IytFqUB4LXqVLpXLTMoT3kNcHv EF/lBZX3DvAOxe8WUfVed9XtiIO2AvYZSEwYz7N7UVpMOisoK+K7+GQW/VhZleuJFsXF Y9jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:arc-authentication-results; bh=SAomLk4XCJrdYs15DGXlkhIoYv72dPhJF7W8UFBfIAY=; b=sif9i5YM5758hKV0fBSGHHW7wyMg1InqYTP6fAXPq27GIPeOAFOhlFUlNrvYk/ho+w D8yMtE+NtqihgqHak/4H1/gLjFqTHqomFx8RJ5TTtZBfUeCW7we2td6aOgTIQGS3K0Y6 LKWca3afTBaXxbqvX17DsxD/0SdITUqI+9DCHS2MZs7L08ePik03vDT5X8AXPM0Yxa4p 3AALv3w4iqzEatIPOelZVwELCbGZSFjq6b9ufwrjogI5O//nsBitG1iCHp5iUtMomY7y jQ3pO0s0/WNEnaaEPVTKx0/eoCrWGVYB6iugvM0CNXl5rV1B/T4XOX8yD7tj/xOd7bZu Twig== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si6121581pfh.319.2018.01.26.03.04.59; Fri, 26 Jan 2018 03:05:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753233AbeAZLEE (ORCPT + 99 others); Fri, 26 Jan 2018 06:04:04 -0500 Received: from mail.conel.cz ([46.13.7.58]:55330 "EHLO mail.conel.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752676AbeAZLED (ORCPT ); Fri, 26 Jan 2018 06:04:03 -0500 X-Greylist: delayed 1285 seconds by postgrey-1.27 at vger.kernel.org; Fri, 26 Jan 2018 06:04:02 EST Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.conel.cz (Postfix) with ESMTP id 726BC1F9182F; Fri, 26 Jan 2018 11:44:58 +0100 (CET) X-Virus-Scanned: by amavis at conel.cz Received: from mail.conel.cz ([127.0.0.1]) by localhost (linux.conel.cz [127.0.0.1]) (amavisd-new, port 10024) with LMTP id flW63fX1vNxm; Fri, 26 Jan 2018 11:44:55 +0100 (CET) Received: from aserver.conel.cz (aserver [192.168.2.100]) by mail.conel.cz (Postfix) with ESMTP id 83A8E1F91802; Fri, 26 Jan 2018 11:44:55 +0100 (CET) Received: from [10.40.28.10] (localhost [127.0.0.1]) by aserver.conel.cz (Postfix) with ESMTP id 3459BCA808D; Fri, 26 Jan 2018 11:42:33 +0100 (CET) Subject: Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error To: Maxim Uvarov , Bin Liu , Yegor Yefremov , kernel list , linux-usb , Greg KH , sergei.shtylyov@cogentembedded.com 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: Tomas Paukrt Message-ID: <8d667479-136c-a695-6eda-0ff654e8acad@advantech-bb.cz> Date: Fri, 26 Jan 2018 11:42:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: cs Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxim, unfortunately we cannot test the latest kernel right now, because we have custom drivers and additional changes that need to be ported, but the MUSB driver in our kernel should contain all fixes from https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/drivers/usb/musb Best regards Tomas Dne 25.1.2018 v 17:24 Maxim Uvarov napsal(a): > [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. >> > >