mirror of
https://github.com/ipxe/ipxe
synced 2025-12-22 21:11:03 +03:00
[xhci] Support USB1 devices attached via transaction translators
xHCI provides a somewhat convoluted mechanism for specifying details of a transaction translator. Hubs must be marked as such in the device slot context. The only opportunity to do so is as part of a Configure Endpoint command, which can be executed only when opening the hub's interrupt endpoint. We add a mechanism for host controllers to intercept the opening of hub devices, providing xHCI with an opportunity to update the internal device slot structure for the corresponding USB device to indicate that the device is a hub. We then include the hub-specific details in the input context whenever any Configure Endpoint command is issued. When a device is opened, we record the device slot and port for its transaction translator (if any), and supply these as part of the Address Device command. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -777,6 +777,8 @@ struct usb_hub {
|
||||
/** List of hubs */
|
||||
struct list_head list;
|
||||
|
||||
/** Host controller operations */
|
||||
struct usb_hub_host_operations *host;
|
||||
/** Driver operations */
|
||||
struct usb_hub_driver_operations *driver;
|
||||
/** Driver private data */
|
||||
@@ -789,7 +791,22 @@ struct usb_hub {
|
||||
struct usb_port port[0];
|
||||
};
|
||||
|
||||
/** USB hub operations */
|
||||
/** USB hub host controller operations */
|
||||
struct usb_hub_host_operations {
|
||||
/** Open hub
|
||||
*
|
||||
* @v hub USB hub
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int ( * open ) ( struct usb_hub *hub );
|
||||
/** Close hub
|
||||
*
|
||||
* @v hub USB hub
|
||||
*/
|
||||
void ( * close ) ( struct usb_hub *hub );
|
||||
};
|
||||
|
||||
/** USB hub driver operations */
|
||||
struct usb_hub_driver_operations {
|
||||
/** Open hub
|
||||
*
|
||||
@@ -940,8 +957,10 @@ struct usb_host_operations {
|
||||
struct usb_device_host_operations device;
|
||||
/** Bus operations */
|
||||
struct usb_bus_host_operations bus;
|
||||
/** Hub operations */
|
||||
struct usb_hub_host_operations hub;
|
||||
/** Root hub operations */
|
||||
struct usb_hub_driver_operations hub;
|
||||
struct usb_hub_driver_operations root;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user