aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2015-05-13 14:13:09 +0100
committerMichael Brown <mcb30@ipxe.org>2015-05-13 14:13:09 +0100
commita2173fca45983094cfde38359132cccec51b084c (patch)
tree72d5ee239b8addfcbb67dab5a1f8e66aba22f513 /src/drivers/net/bnx2.c
parent372672275e48a7f0fcd058476bd742bf950e4074 (diff)
downloadipxe-a2173fca45983094cfde38359132cccec51b084c.tar.gz
[usb] Do not call usb_hotplug() when registering a new hub
The action of registering a new hub can itself happen in only two ways: either a new USB hub has been created (in which case we are already inside a call to usb_hotplug()), or a new root hub has been created. In the former case, we do not need to issue a further call to usb_hotplug(), since the hub's ports will all be marked as changed and so will be handled after the return from register_usb_hub() anyway. Calling usb_hotplug() within register_usb_hub() leads to a confusing order of events, such as: - root hub port 1 detects a change - root hub port 2 detects a change - usb_hotplug() is called - root hub port 1 finds a USB hub - usb_hotplug() is called - this inner call to usb_hotplug() handles root hub port 2 Fix by calling usb_hotplug() only from usb_step() and from register_usb_bus(). This avoids recursive calls to usb_hotplug() and ensures that devices are enumerated in the order of detection. Tested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/bnx2.c')
0 files changed, 0 insertions, 0 deletions