Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1393271
| From | Yegor Yefremov <yegorslists@googlemail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error |
| Date | 2016-05-03 12:10 +0200 |
| Message-ID | <ruFrc-6jc-7@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <rsCnM-5TC-5@gated-at.bofh.it> <rsDa9-6Ba-3@gated-at.bofh.it> <rsFbZ-8m2-9@gated-at.bofh.it> <rsO5A-75X-9@gated-at.bofh.it> <rsVgL-4Ob-51@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Apr 28, 2016 at 4:37 PM, Bin Liu <b-liu@ti.com> 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 <yegorslists@googlemail.com>
>> That I think a key thing, which is done in other error. If that change
>> is good for you than I'm also happy with it.
>
> We need to understand why the controller keeps generating the same
> interrupt to come out a proper fix.
>
> I will take a look. But I can only use my spare time on this, so be
> patient.
>
>>
>> I also not sure if musb_writeb(epio, MUSB_RXINTERVAL, 0); is needed.
>> In my case it's the same result with it and without it.
>> In other scenarios might be reasonable...
>
> It disables NAK timeout.
>
>>
>>
>> > First of all, I don't like the idea of merging the two branches, it
>> > makes the code ugly.
>>
>> Yes, I don't like that function at all, it's too long and difficult to
>> read if you first look on it first time. It will be good to split it
>> on 3 small functions for each big if.
>
> This particular function is not that hard to understand, but the driver
> in general is messy. But I am not sure if anyone in the community can
> refactory this driver. The community had some effort in the past to
> clean up this driver, but it always broke usecases on different
> platforms.
>
> Regards,
> -Bin.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Bin Liu <b-liu@ti.com> - 2016-04-28 16:40 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Yegor Yefremov <yegorslists@googlemail.com> - 2016-05-03 12:10 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Bin Liu <b-liu@ti.com> - 2016-05-03 15:50 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Yegor Yefremov <yegorslists@googlemail.com> - 2016-05-03 16:30 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Bin Liu <b-liu@ti.com> - 2016-05-03 16:40 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Yegor Yefremov <yegorslists@googlemail.com> - 2016-05-04 17:00 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Bin Liu <b-liu@ti.com> - 2016-05-04 21:00 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-05-04 21:10 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Bin Liu <b-liu@ti.com> - 2016-05-04 21:20 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Greg KH <gregkh@linuxfoundation.org> - 2016-05-04 22:20 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Bin Liu <b-liu@ti.com> - 2016-05-04 22:50 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-05-05 15:30 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Bin Liu <b-liu@ti.com> - 2016-05-05 15:40 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-05-05 15:40 +0200
Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error Bin Liu <b-liu@ti.com> - 2016-05-05 15:50 +0200
csiph-web