From 5e1e2069fd438b50b085416597d01009d13bc87b Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 8 May 2015 15:07:26 +0100 Subject: [usb] Maintain a list of all USB buses Signed-off-by: Michael Brown --- src/include/ipxe/usb.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/include/ipxe') diff --git a/src/include/ipxe/usb.h b/src/include/ipxe/usb.h index 50d8a6fd8..d326678c8 100644 --- a/src/include/ipxe/usb.h +++ b/src/include/ipxe/usb.h @@ -916,6 +916,8 @@ struct usb_bus { /** Root hub */ struct usb_hub *hub; + /** List of USB buses */ + struct list_head list; /** List of devices */ struct list_head devices; /** List of hubs */ @@ -999,6 +1001,10 @@ usb_poll ( struct usb_bus *bus ) { bus->host->poll ( bus ); } +/** Iterate over all USB buses */ +#define for_each_usb_bus( bus ) \ + list_for_each_entry ( (bus), &usb_buses, list ) + /** * Complete transfer (without error) * @@ -1182,6 +1188,8 @@ usb_set_interface ( struct usb_device *usb, unsigned int interface, NULL, 0 ); } +extern struct list_head usb_buses; + extern struct usb_interface_descriptor * usb_interface_descriptor ( struct usb_configuration_descriptor *config, unsigned int interface, unsigned int alternate ); -- cgit v1.2.3-55-g7522