Module Name:    src
Committed By:   skrll
Date:           Sat Sep  3 12:06:50 UTC 2016

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

Log Message:
Suppress stopping-endpoint in xhci_close_pipe if the endpoint is
already stopped.

>From t-hash


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 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.65 src/sys/dev/usb/xhci.c:1.66
--- src/sys/dev/usb/xhci.c:1.65	Thu Aug 18 07:18:52 2016
+++ src/sys/dev/usb/xhci.c	Sat Sep  3 12:06:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.65 2016/08/18 07:18:52 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.66 2016/09/03 12:06:50 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.65 2016/08/18 07:18:52 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.66 2016/09/03 12:06:50 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1511,11 +1511,8 @@ xhci_close_pipe(struct usbd_pipe *pipe)
 		return;
 	}
 
-	/*
-	 * This may fail in the case that xhci_close_pipe is called after
-	 * xhci_abort_xfer e.g. usbd_kill_pipe.
-	 */
-	(void)xhci_stop_endpoint(pipe);
+	if (xhci_get_epstate(sc, xs, dci) != XHCI_EPSTATE_STOPPED)
+		(void)xhci_stop_endpoint(pipe);
 
 	/*
 	 * set appropriate bit to be dropped.

Reply via email to