From: Bin Liu <b-liu@ti.com>
To: Yegor Yefremov <yegorslists@googlemail.com>
Cc: Maxim Uvarov <muvarov@gmail.com>,
kernel list <linux-kernel@vger.kernel.org>,
linux-usb <linux-usb@vger.kernel.org>,
Greg KH <gregkh@linuxfoundation.org>,
<sergei.shtylyov@cogentembedded.com>,
Tomas Paukrt <tomas.paukrt@advantech-bb.cz>
Subject: Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error
Date: Thu, 25 Jan 2018 09:45:08 -0600 [thread overview]
Message-ID: <20180125154508.GB6590@uda0271908> (raw)
In-Reply-To: <CAGm1_kvLh-+kJVdtv+7i_1nVsPTQ67uE_5ZizRRfK2iEoWcj+w@mail.gmail.com>
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 <b-liu@ti.com> 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 <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>
> >
> > 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.
next prev parent reply other threads:[~2018-01-25 15:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 6:51 [PATCHv2] musb_host: fix lockup on rxcsr_h_error Max Uvarov
2016-04-27 15:46 ` Bin Liu
2016-04-27 18:26 ` Maxim Uvarov
2016-04-27 19:13 ` Bin Liu
2016-04-27 21:28 ` Bin Liu
2016-04-28 6:51 ` Maxim Uvarov
2016-04-28 14:37 ` Bin Liu
2016-05-03 10:03 ` Yegor Yefremov
2016-05-03 13:48 ` Bin Liu
2016-05-03 14:25 ` Yegor Yefremov
2016-05-03 14:35 ` Bin Liu
2016-05-04 14:49 ` Yegor Yefremov
2016-05-04 18:56 ` Bin Liu
2016-05-04 19:02 ` Sergei Shtylyov
2016-05-04 19:17 ` Bin Liu
2016-05-04 20:19 ` Greg KH
2016-05-04 20:47 ` Bin Liu
2016-05-05 13:21 ` Sergei Shtylyov
2016-05-05 13:31 ` Bin Liu
2016-05-05 13:39 ` Sergei Shtylyov
2016-05-05 13:45 ` Bin Liu
2018-01-25 15:45 ` Bin Liu [this message]
2018-01-25 16:24 ` Maxim Uvarov
2018-01-25 16:31 ` Bin Liu
2018-01-26 9:24 ` Maxim Uvarov
2018-02-08 2:38 ` Bin Liu
2018-01-26 10:42 ` Tomas Paukrt
2018-08-06 13:19 ` Tomas Paukrt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180125154508.GB6590@uda0271908 \
--to=b-liu@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=muvarov@gmail.com \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=tomas.paukrt@advantech-bb.cz \
--cc=yegorslists@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox