Implemented from the Linux driver:
authormglocker <mglocker@openbsd.org>
Tue, 27 Jul 2021 13:36:59 +0000 (13:36 +0000)
committermglocker <mglocker@openbsd.org>
Tue, 27 Jul 2021 13:36:59 +0000 (13:36 +0000)
commit9bb9c18945f6f463965eb0e2c0ba4950598614c0
treea0f2b10b0a70c503d8af95630f5623821962e519
parent4ebb4dc4246b6e34ecef3af5b36b613604a35786
Implemented from the Linux driver:

* Introduce split transaction order queues.
* Improve the NAK interrupt handler routine.
* Mostly move from list_move() to list_move_tail().

Those changes fix an attachment problem seen for certain devices which
are issuing NAK interrupts during split transactions, which don't get
handled correctly by the driver today.  This could result in unexpected
channel halting, printing "ChHltd set, but reason is unknown", which
finally leaves the device back on a disabled USB port.

ok kettenis@
sys/dev/usb/dwc2/dwc2_core.c
sys/dev/usb/dwc2/dwc2_core.h
sys/dev/usb/dwc2/dwc2_hcd.c
sys/dev/usb/dwc2/dwc2_hcd.h
sys/dev/usb/dwc2/dwc2_hcdddma.c
sys/dev/usb/dwc2/dwc2_hcdintr.c
sys/dev/usb/dwc2/dwc2_hcdqueue.c
sys/dev/usb/dwc2/list.h