NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/59678 ("ring->queued > 0" panic from utwn)
Hi David,
I've received patches from sc_dying for better handing of xhci events with
regards to the ZLP that is now added on every USBD_FORCE_SHORT_XFER.
Please apply this patch to your -11 srcs and let me know if it works better.
This way it'll will quicken my testing and hopefully the patch will be
commited soon.
Best regards,
Nat
--- sys/dev/usb/xhci.c.orig 2025-08-24 09:59:43.231022329 +0000
+++ sys/dev/usb/xhci.c 2025-09-10 08:27:57.172289557 +0000
@@ -2576,6 +2576,20 @@ xhci_event_transfer(struct xhci_softc *
return;
}
+ /*
+ * If next event will be from zero-length packet,
+ * suppress notification of first event.
+ */
+ if (xfertype == UE_BULK &&
+ err == USBD_NORMAL_COMPLETION &&
+ (xfer->ux_flags & USBD_FORCE_SHORT_XFER) &&
+ XHCI_TRB_2_REM_GET(le32toh(xr->xr_trb[idx].trb_2)) != 0) {
+ DPRINTFN(100, "short xfer %#jx: suppress notification status "
+ "%ju pipe %#jx", (uintptr_t)xfer, xfer->ux_status,
+ (uintptr_t)xfer->ux_pipe, 0);
+ return;
+ }
+
if ((trb_3 & XHCI_TRB_3_ED_BIT) == 0 ||
(trb_0 & 0x3) == 0x0) {
/*
Home |
Main Index |
Thread Index |
Old Index