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)
This commit is contained in:
parent
a971139680
commit
9c3ae2ef4b
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user