Module Name: src Committed By: plunky Date: Sun Aug 30 18:35:53 UTC 2009
Modified Files: src/sys/dev/usb: ubt.c Log Message: (perhaps) fix a long standing issue that I came across recently. If you repeatedly enable/disable a ubt device it sometimes hangs in the bluetooth initialisation where the device responses never arrive, but if you interrupt and try again it works fine. additionally aborting the default pipe on shutdown seems to fix that To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/usb/ubt.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/ubt.c diff -u src/sys/dev/usb/ubt.c:1.35 src/sys/dev/usb/ubt.c:1.36 --- src/sys/dev/usb/ubt.c:1.35 Mon Jul 28 14:19:26 2008 +++ src/sys/dev/usb/ubt.c Sun Aug 30 18:35:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ubt.c,v 1.35 2008/07/28 14:19:26 drochner Exp $ */ +/* $NetBSD: ubt.c,v 1.36 2009/08/30 18:35:53 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.35 2008/07/28 14:19:26 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.36 2009/08/30 18:35:53 plunky Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -734,6 +734,8 @@ DPRINTFN(1, "sc=%p\n", sc); /* Abort all pipes */ + usbd_abort_default_pipe(sc->sc_udev); + if (sc->sc_evt_pipe != NULL) { usbd_abort_pipe(sc->sc_evt_pipe); usbd_close_pipe(sc->sc_evt_pipe);