summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2022-08-03 16:21:55 +0000
committermartin <martin@NetBSD.org>2022-08-03 16:21:55 +0000
commit43ac304d423636d57e0d86a78ce7ead8140a1fd3 (patch)
tree1c491bf208cfb72b0541b134a46eec090833aa25 /sys/dev
parent8c2e495d3aca21320c208c6e1fdc359af13199e9 (diff)
Pull up following revision(s) (requested by riastradh in ticket #1493):
sys/dev/usb/ucom.c: revision 1.129 ucom(4): Fix earlier mistake causing pipes not to be closed. In revision 1.123, mrg@ changed what he thought was a double-close, but was actually abort&close (as is appropriate) to just abort (which is not enough -- leaks the pipe). This restores the abort&close. The original `bug' was found by code inspection, whereas this bug was found by asserting in usb_subr.c that no pipes are open on device disconnection after detach; the asserts actually triggered with several ucom(4) devices, and no longer trigger with this change. XXX pullup-9
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/ucom.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index bcf648e3841..26897ee3208 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ucom.c,v 1.125.2.1 2020/12/12 12:56:40 martin Exp $ */
+/* $NetBSD: ucom.c,v 1.125.2.2 2022/08/03 16:21:55 martin Exp $ */
/*
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.125.2.1 2020/12/12 12:56:40 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.125.2.2 2022/08/03 16:21:55 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -414,11 +414,9 @@ ucom_detach(device_t self, int flags)
if (sc->sc_bulkin_pipe != NULL) {
usbd_abort_pipe(sc->sc_bulkin_pipe);
- sc->sc_bulkin_pipe = NULL;
}
if (sc->sc_bulkout_pipe != NULL) {
usbd_abort_pipe(sc->sc_bulkout_pipe);
- sc->sc_bulkout_pipe = NULL;
}
mutex_enter(&sc->sc_lock);