On Tue, Dec 23, 2025 at 10:11:00PM +0100, Schuh Andreas wrote:

> Machine still panics with the patch:
> 
> ddb{0}> show panic                                          
> *cpu0: kernel diagnostic assertion "dxfer->xfer.status == USBD_IN_PROGRESS" 
> fai
> led: file "/usr/src/sys/dev/usb/dwc2/dwc2.c", line 315      

OK, pity.  Then the xfer status must be something else than
USBD_CANCELLED, USBD_TIMEOUT, or USBD_IN_PROGRESS.  Maybe USBD_STALLED.
Can you please try this diff?  It's probably still not the solution to
the issue, but at least it should give us more clearness about the xfer
status.  Again, it should prevent the panic, and print the xfer status
in your dmesg output.

Thanks,
Marcus


Index: sys/dev/usb/dwc2/dwc2.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/dwc2/dwc2.c,v
diff -u -p -u -p -r1.68 dwc2.c
--- sys/dev/usb/dwc2/dwc2.c     18 Sep 2022 21:12:19 -0000      1.68
+++ sys/dev/usb/dwc2/dwc2.c     28 Dec 2025 21:01:55 -0000
@@ -305,6 +305,11 @@ dwc2_softintr(void *v)
         */
        mtx_enter(&hsotg->lock);
        TAILQ_FOREACH_SAFE(dxfer, &sc->sc_complete, xnext, next) {
+               if (dxfer->xfer.status != USBD_IN_PROGRESS) {
+                       printf("%s: xfer status = %s\n",
+                           __func__, usbd_errstr(dxfer->xfer.status));
+                       continue;
+               }
                KASSERT(dxfer->xfer.status == USBD_IN_PROGRESS);
                KASSERT(dxfer->intr_status != USBD_CANCELLED);
                KASSERT(dxfer->intr_status != USBD_TIMEOUT);

Reply via email to