david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/drivers
Michael Brown a2173fca45 [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>
2015-05-13 14:13:09 +01:00
..
bitbash [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
block [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
bus [usb] Do not call usb_hotplug() when registering a new hub 2015-05-13 14:13:09 +01:00
infiniband [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:50:42 +00:00
linux [linux] Apply MAC address prior to registering network device 2013-09-03 02:02:58 +01:00
net [base16] Add buffer size parameter to base16_encode() and base16_decode() 2015-04-24 14:41:32 +01:00
nvs [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
usb [usb] Add basic support for USB keyboards 2015-05-12 15:53:22 +01:00