Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb now that the task threads are created earlier, m...
details: https://anonhg.NetBSD.org/src/rev/8cd3ca69a219
branches: trunk
changeset: 780354:8cd3ca69a219
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Jul 20 23:18:02 2012 +0000
description:
now that the task threads are created earlier, move the call to
usb_create_event_thread() back into usb_doattach(), so that eg,
usb_discover() never operates when the root_hub is not setup.
fixes a crash joerg@ reported.
diffstat:
sys/dev/usb/usb.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r a8876a5940da -r 8cd3ca69a219 sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Fri Jul 20 21:53:57 2012 +0000
+++ b/sys/dev/usb/usb.c Fri Jul 20 23:18:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb.c,v 1.134 2012/07/20 07:31:14 mrg Exp $ */
+/* $NetBSD: usb.c,v 1.135 2012/07/20 23:18:02 mrg Exp $ */
/*
* Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.134 2012/07/20 07:31:14 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.135 2012/07/20 23:18:02 mrg Exp $");
#include "opt_compat_netbsd.h"
#include "opt_usb.h"
@@ -205,7 +205,6 @@
sc->sc_bus->methods->get_lock(sc->sc_bus, &sc->sc_bus->lock);
else
sc->sc_bus->lock = NULL;
- usb_create_event_thread(self);
RUN_ONCE(&init_control, usb_once_init);
config_interrupts(self, usb_doattach);
@@ -297,6 +296,7 @@
return;
}
sc->sc_bus->root_hub = dev;
+ usb_create_event_thread(self);
#if 1
/*
* Turning this code off will delay attachment of USB devices
Home |
Main Index |
Thread Index |
Old Index