aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2004-09-22 06:02:10 +0000
committerWarner Losh <imp@FreeBSD.org>2004-09-22 06:02:10 +0000
commit9c3ae2ef4bd0c8d74ad3122368eed6edeaaf25a1 (patch)
tree980a6d115c2bcb48ae695212ae4a62d3776aba50
parenta971139680b3d7aa8e12b1a0f367a47a2986a180 (diff)
Add a temporary workaround to the panic on boot with hub attached and
panic on hub detach bugs that have been reported. This work around detaches the device before deleting it. This changes the detach order from in-order to pre-order. This avoids uhub's deleting the children after its subdevs has been deleted. This is only a workaround. This leads to a strange condition in the device tree where attached devices are children of detached ones. I really don't know what that's supposed to mean, but does violate my sense of POLA. Fortunately, the violation is short lived, which is why I'm going ahead and committing the work around. # We really need to consider life w/o the multiple nested layers of # compatibility macros. They make finding bugs like this *MUCH* # harder. Patch by: iadowse MT5 before: next_release(5.3-BETA5) (unless someting better comes along)
Notes
Notes: svn path=/head/; revision=135566
-rw-r--r--sys/dev/usb/usb_port.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 95bb8adcabbd..69fb7a16bf8f 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -422,6 +422,7 @@ typedef struct callout usb_callout_t;
#define config_detach(dev, flag) \
do { \
free(device_get_ivars(dev), M_USB); \
+ device_detach(dev); \
device_delete_child(device_get_parent(dev), dev); \
} while (0);