[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:
Michael Brown
2015-03-23 20:24:20 +00:00
parent 026b3446b9
commit f557794ab3
5 changed files with 164 additions and 33 deletions

View File

@@ -1110,6 +1110,12 @@ struct xhci_slot {
unsigned int port;
/** Protocol speed ID */
unsigned int psiv;
/** Number of ports (if this device is a hub) */
unsigned int ports;
/** Transaction translator slot ID */
unsigned int tt_id;
/** Transaction translator port */
unsigned int tt_port;
/** Endpoints, indexed by context ID */
struct xhci_endpoint *endpoint[XHCI_CTX_END];
};