Start to add GIANT_REQUIRED; macros in places where giant is required
and that I've verified things seem to basically work. I was able to boot and hot plug usb devices. Please let me know if this causes problems for anybody. The push down of giant has proceeded to the point that this will start to matter more and more.
This commit is contained in:
parent
6add7f75e4
commit
891e611130
@ -1559,6 +1559,8 @@ device_probe_child(device_t dev, device_t child)
|
||||
int result, pri = 0;
|
||||
int hasclass = (child->devclass != 0);
|
||||
|
||||
GIANT_REQUIRED;
|
||||
|
||||
dc = dev->devclass;
|
||||
if (!dc)
|
||||
panic("device_probe_child: parent device has no devclass");
|
||||
@ -2183,6 +2185,8 @@ device_probe_and_attach(device_t dev)
|
||||
{
|
||||
int error;
|
||||
|
||||
GIANT_REQUIRED;
|
||||
|
||||
if (dev->state >= DS_ALIVE && (dev->flags & DF_REBID) == 0)
|
||||
return (0);
|
||||
|
||||
@ -2270,6 +2274,8 @@ device_detach(device_t dev)
|
||||
{
|
||||
int error;
|
||||
|
||||
GIANT_REQUIRED;
|
||||
|
||||
PDEBUG(("%s", DEVICENAME(dev)));
|
||||
if (dev->state == DS_BUSY)
|
||||
return (EBUSY);
|
||||
|
Loading…
Reference in New Issue
Block a user