Module Name:    src
Committed By:   jdolecek
Date:           Sun Jun  6 18:37:20 UTC 2021

Modified Files:
        src/sys/dev/usb: xhci.c

Log Message:
also reset xs->xs_xr[dci] to NULL when closing the pipe

avoids KASSERT() on next xhci_open()

should fix PR kern/56194 by nia


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/dev/usb/xhci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.143 src/sys/dev/usb/xhci.c:1.144
--- src/sys/dev/usb/xhci.c:1.143	Sat May 29 16:49:30 2021
+++ src/sys/dev/usb/xhci.c	Sun Jun  6 18:37:20 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.143 2021/05/29 16:49:30 riastradh Exp $	*/
+/*	$NetBSD: xhci.c,v 1.144 2021/06/06 18:37:20 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.143 2021/05/29 16:49:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.144 2021/06/06 18:37:20 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -2159,6 +2159,7 @@ xhci_close_pipe(struct usbd_pipe *pipe)
 	usb_syncmem(&xs->xs_dc_dma, 0, sc->sc_pgsz, BUS_DMASYNC_POSTREAD);
 
 	xhci_ring_free(sc, &xs->xs_xr[dci]);
+	xs->xs_xr[dci] = NULL;
 }
 
 /*

Reply via email to