Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Suppress stopping-endpoint in xhci_close_pipe if...



details:   https://anonhg.NetBSD.org/src/rev/eb7548c94355
branches:  trunk
changeset: 347571:eb7548c94355
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Sep 03 12:06:50 2016 +0000

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

>From t-hash

diffstat:

 sys/dev/usb/xhci.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (32 lines):

diff -r b636faa24695 -r eb7548c94355 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Sat Sep 03 12:05:36 2016 +0000
+++ b/sys/dev/usb/xhci.c        Sat Sep 03 12:06:50 2016 +0000
@@ -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 @@
                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.



Home | Main Index | Thread Index | Old Index