mbox series

[0/8] USB fixes: xHCI error handling

Message ID 20231027-usb-fixes-1-v1-0-1c879bbcd928@marcan.st
Headers show
Series USB fixes: xHCI error handling | expand

Message

Hector Martin Oct. 26, 2023, 11:16 p.m. UTC
This series is the first of a few bundles of USB fixes we have been
carrying downstream on the Asahi U-Boot branch for a few months.

Most importantly, this related set of patches makes xHCI error/stall
recovery more robust (or work at all in some cases). There are also a
couple patches fixing other xHCI bugs and adding better debug logs.

I believe this should fix this Fedora bug too:

https://bugzilla.redhat.com/show_bug.cgi?id=2244305

Signed-off-by: Hector Martin <marcan@marcan.st>
---
Hector Martin (8):
      usb: xhci: Guard all calls to xhci_wait_for_event
      usb: xhci: Better error handling in abort_td()
      usb: xhci: Allow context state errors when halting an endpoint
      usb: xhci: Recover from halted non-control endpoints
      usb: xhci: Fail on attempt to queue TRBs to a halted endpoint
      usb: xhci: Do not panic on event timeouts
      usb: xhci: Fix DMA address calculation in queue_trb
      usb: xhci: Add more debugging

 drivers/usb/host/xhci-ring.c | 100 +++++++++++++++++++++++++++++++++++--------
 drivers/usb/host/xhci.c      |   9 ++++
 include/usb/xhci.h           |   2 +
 3 files changed, 92 insertions(+), 19 deletions(-)
---
base-commit: fb428b61819444b9337075f49c72f326f5d12085
change-id: 20231027-usb-fixes-1-83bfc7013012

Best regards,

Comments

Neal Gompa Oct. 27, 2023, 6:58 p.m. UTC | #1
On Thu, Oct 26, 2023 at 7:26 PM Hector Martin <marcan@marcan.st> wrote:
>
> This series is the first of a few bundles of USB fixes we have been
> carrying downstream on the Asahi U-Boot branch for a few months.
>
> Most importantly, this related set of patches makes xHCI error/stall
> recovery more robust (or work at all in some cases). There are also a
> couple patches fixing other xHCI bugs and adding better debug logs.
>
> I believe this should fix this Fedora bug too:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=2244305
>
> Signed-off-by: Hector Martin <marcan@marcan.st>
> ---
> Hector Martin (8):
>       usb: xhci: Guard all calls to xhci_wait_for_event
>       usb: xhci: Better error handling in abort_td()
>       usb: xhci: Allow context state errors when halting an endpoint
>       usb: xhci: Recover from halted non-control endpoints
>       usb: xhci: Fail on attempt to queue TRBs to a halted endpoint
>       usb: xhci: Do not panic on event timeouts
>       usb: xhci: Fix DMA address calculation in queue_trb
>       usb: xhci: Add more debugging
>
>  drivers/usb/host/xhci-ring.c | 100 +++++++++++++++++++++++++++++++++++--------
>  drivers/usb/host/xhci.c      |   9 ++++
>  include/usb/xhci.h           |   2 +
>  3 files changed, 92 insertions(+), 19 deletions(-)
> ---
> base-commit: fb428b61819444b9337075f49c72f326f5d12085
> change-id: 20231027-usb-fixes-1-83bfc7013012
>

The series looks reasonable and has worked quite well in Fedora Asahi.

Reviewed-by: Neal Gompa <neal@gompa.dev>
Neal Gompa Oct. 27, 2023, 7:42 p.m. UTC | #2
On Fri, Oct 27, 2023 at 2:58 PM Neal Gompa <neal@gompa.dev> wrote:
>
> On Thu, Oct 26, 2023 at 7:26 PM Hector Martin <marcan@marcan.st> wrote:
> >
> > This series is the first of a few bundles of USB fixes we have been
> > carrying downstream on the Asahi U-Boot branch for a few months.
> >
> > Most importantly, this related set of patches makes xHCI error/stall
> > recovery more robust (or work at all in some cases). There are also a
> > couple patches fixing other xHCI bugs and adding better debug logs.
> >
> > I believe this should fix this Fedora bug too:
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=2244305
> >
> > Signed-off-by: Hector Martin <marcan@marcan.st>
> > ---
> > Hector Martin (8):
> >       usb: xhci: Guard all calls to xhci_wait_for_event
> >       usb: xhci: Better error handling in abort_td()
> >       usb: xhci: Allow context state errors when halting an endpoint
> >       usb: xhci: Recover from halted non-control endpoints
> >       usb: xhci: Fail on attempt to queue TRBs to a halted endpoint
> >       usb: xhci: Do not panic on event timeouts
> >       usb: xhci: Fix DMA address calculation in queue_trb
> >       usb: xhci: Add more debugging
> >
> >  drivers/usb/host/xhci-ring.c | 100 +++++++++++++++++++++++++++++++++++--------
> >  drivers/usb/host/xhci.c      |   9 ++++
> >  include/usb/xhci.h           |   2 +
> >  3 files changed, 92 insertions(+), 19 deletions(-)
> > ---
> > base-commit: fb428b61819444b9337075f49c72f326f5d12085
> > change-id: 20231027-usb-fixes-1-83bfc7013012
> >
>
> The series looks reasonable and has worked quite well in Fedora Asahi.
>
> Reviewed-by: Neal Gompa <neal@gompa.dev>
>

Resending now that I'm subscribed to the U-Boot mailing list...

Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Marek Vasut Nov. 19, 2023, 8:08 p.m. UTC | #3
On 10/27/23 01:16, Hector Martin wrote:
> This series is the first of a few bundles of USB fixes we have been
> carrying downstream on the Asahi U-Boot branch for a few months.
> 
> Most importantly, this related set of patches makes xHCI error/stall
> recovery more robust (or work at all in some cases). There are also a
> couple patches fixing other xHCI bugs and adding better debug logs.
> 
> I believe this should fix this Fedora bug too:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=2244305

Was there ever a V2 of these patches I might've missed ?
Shantur Rathore Nov. 19, 2023, 11:17 p.m. UTC | #4
On Sun, Nov 19, 2023 at 8:08 PM Marek Vasut <marex@denx.de> wrote:
>
> On 10/27/23 01:16, Hector Martin wrote:
> > This series is the first of a few bundles of USB fixes we have been
> > carrying downstream on the Asahi U-Boot branch for a few months.
> >
> > Most importantly, this related set of patches makes xHCI error/stall
> > recovery more robust (or work at all in some cases). There are also a
> > couple patches fixing other xHCI bugs and adding better debug logs.
> >
> > I believe this should fix this Fedora bug too:
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=2244305
>
> Was there ever a V2 of these patches I might've missed ?

Is it this one?
https://patchwork.ozlabs.org/project/uboot/list/?series=379807
Marek Vasut Nov. 20, 2023, 2:09 a.m. UTC | #5
On 11/20/23 00:17, Shantur Rathore wrote:
> On Sun, Nov 19, 2023 at 8:08 PM Marek Vasut <marex@denx.de> wrote:
>>
>> On 10/27/23 01:16, Hector Martin wrote:
>>> This series is the first of a few bundles of USB fixes we have been
>>> carrying downstream on the Asahi U-Boot branch for a few months.
>>>
>>> Most importantly, this related set of patches makes xHCI error/stall
>>> recovery more robust (or work at all in some cases). There are also a
>>> couple patches fixing other xHCI bugs and adding better debug logs.
>>>
>>> I believe this should fix this Fedora bug too:
>>>
>>> https://bugzilla.redhat.com/show_bug.cgi?id=2244305
>>
>> Was there ever a V2 of these patches I might've missed ?
> 
> Is it this one?
> https://patchwork.ozlabs.org/project/uboot/list/?series=379807

I think so, thanks.

And uh, my question therefore it, is there a V3 which addresses the 3/8 
and 8/8 comment ?
Hector Martin Nov. 20, 2023, 10:45 a.m. UTC | #6
On 2023/11/20 11:09, Marek Vasut wrote:
> On 11/20/23 00:17, Shantur Rathore wrote:
>> On Sun, Nov 19, 2023 at 8:08 PM Marek Vasut <marex@denx.de> wrote:
>>>
>>> On 10/27/23 01:16, Hector Martin wrote:
>>>> This series is the first of a few bundles of USB fixes we have been
>>>> carrying downstream on the Asahi U-Boot branch for a few months.
>>>>
>>>> Most importantly, this related set of patches makes xHCI error/stall
>>>> recovery more robust (or work at all in some cases). There are also a
>>>> couple patches fixing other xHCI bugs and adding better debug logs.
>>>>
>>>> I believe this should fix this Fedora bug too:
>>>>
>>>> https://bugzilla.redhat.com/show_bug.cgi?id=2244305
>>>
>>> Was there ever a V2 of these patches I might've missed ?
>>
>> Is it this one?
>> https://patchwork.ozlabs.org/project/uboot/list/?series=379807
> 
> I think so, thanks.
> 
> And uh, my question therefore it, is there a V3 which addresses the 3/8 
> and 8/8 comment ?

Not yet, no. Sorry, I probably won't have time to work on this in a
while, currently busy with other stuff.


- Hector
Marek Vasut Nov. 20, 2023, 12:15 p.m. UTC | #7
On 11/20/23 11:45, Hector Martin wrote:
> 
> 
> On 2023/11/20 11:09, Marek Vasut wrote:
>> On 11/20/23 00:17, Shantur Rathore wrote:
>>> On Sun, Nov 19, 2023 at 8:08 PM Marek Vasut <marex@denx.de> wrote:
>>>>
>>>> On 10/27/23 01:16, Hector Martin wrote:
>>>>> This series is the first of a few bundles of USB fixes we have been
>>>>> carrying downstream on the Asahi U-Boot branch for a few months.
>>>>>
>>>>> Most importantly, this related set of patches makes xHCI error/stall
>>>>> recovery more robust (or work at all in some cases). There are also a
>>>>> couple patches fixing other xHCI bugs and adding better debug logs.
>>>>>
>>>>> I believe this should fix this Fedora bug too:
>>>>>
>>>>> https://bugzilla.redhat.com/show_bug.cgi?id=2244305
>>>>
>>>> Was there ever a V2 of these patches I might've missed ?
>>>
>>> Is it this one?
>>> https://patchwork.ozlabs.org/project/uboot/list/?series=379807
>>
>> I think so, thanks.
>>
>> And uh, my question therefore it, is there a V3 which addresses the 3/8
>> and 8/8 comment ?
> 
> Not yet, no. Sorry, I probably won't have time to work on this in a
> while, currently busy with other stuff.

I can probably fix the patches up myself if that is fine with you, I'd 
really like to get these fixes into the release soon. Would that be OK 
with you ?
Hector Martin Nov. 21, 2023, 6:46 a.m. UTC | #8
On 2023/11/20 21:15, Marek Vasut wrote:
> On 11/20/23 11:45, Hector Martin wrote:
>>
>>
>> On 2023/11/20 11:09, Marek Vasut wrote:
>>> On 11/20/23 00:17, Shantur Rathore wrote:
>>>> On Sun, Nov 19, 2023 at 8:08 PM Marek Vasut <marex@denx.de> wrote:
>>>>>
>>>>> On 10/27/23 01:16, Hector Martin wrote:
>>>>>> This series is the first of a few bundles of USB fixes we have been
>>>>>> carrying downstream on the Asahi U-Boot branch for a few months.
>>>>>>
>>>>>> Most importantly, this related set of patches makes xHCI error/stall
>>>>>> recovery more robust (or work at all in some cases). There are also a
>>>>>> couple patches fixing other xHCI bugs and adding better debug logs.
>>>>>>
>>>>>> I believe this should fix this Fedora bug too:
>>>>>>
>>>>>> https://bugzilla.redhat.com/show_bug.cgi?id=2244305
>>>>>
>>>>> Was there ever a V2 of these patches I might've missed ?
>>>>
>>>> Is it this one?
>>>> https://patchwork.ozlabs.org/project/uboot/list/?series=379807
>>>
>>> I think so, thanks.
>>>
>>> And uh, my question therefore it, is there a V3 which addresses the 3/8
>>> and 8/8 comment ?
>>
>> Not yet, no. Sorry, I probably won't have time to work on this in a
>> while, currently busy with other stuff.
> 
> I can probably fix the patches up myself if that is fine with you, I'd 
> really like to get these fixes into the release soon. Would that be OK 
> with you ?
> 

Of course, I would appreciate that :)

- Hector
Marek Vasut Nov. 22, 2023, 11:52 p.m. UTC | #9
On 11/21/23 07:46, Hector Martin wrote:
> 
> 
> On 2023/11/20 21:15, Marek Vasut wrote:
>> On 11/20/23 11:45, Hector Martin wrote:
>>>
>>>
>>> On 2023/11/20 11:09, Marek Vasut wrote:
>>>> On 11/20/23 00:17, Shantur Rathore wrote:
>>>>> On Sun, Nov 19, 2023 at 8:08 PM Marek Vasut <marex@denx.de> wrote:
>>>>>>
>>>>>> On 10/27/23 01:16, Hector Martin wrote:
>>>>>>> This series is the first of a few bundles of USB fixes we have been
>>>>>>> carrying downstream on the Asahi U-Boot branch for a few months.
>>>>>>>
>>>>>>> Most importantly, this related set of patches makes xHCI error/stall
>>>>>>> recovery more robust (or work at all in some cases). There are also a
>>>>>>> couple patches fixing other xHCI bugs and adding better debug logs.
>>>>>>>
>>>>>>> I believe this should fix this Fedora bug too:
>>>>>>>
>>>>>>> https://bugzilla.redhat.com/show_bug.cgi?id=2244305
>>>>>>
>>>>>> Was there ever a V2 of these patches I might've missed ?
>>>>>
>>>>> Is it this one?
>>>>> https://patchwork.ozlabs.org/project/uboot/list/?series=379807
>>>>
>>>> I think so, thanks.
>>>>
>>>> And uh, my question therefore it, is there a V3 which addresses the 3/8
>>>> and 8/8 comment ?
>>>
>>> Not yet, no. Sorry, I probably won't have time to work on this in a
>>> while, currently busy with other stuff.
>>
>> I can probably fix the patches up myself if that is fine with you, I'd
>> really like to get these fixes into the release soon. Would that be OK
>> with you ?
>>
> 
> Of course, I would appreciate that :)

I picked a subset to usb/master and fixed a subset, for the rest I 
really do need your input on those patches.