summaryrefslogtreecommitdiffstats
path: root/src/drivers/usb/ehci.c
diff options
context:
space:
mode:
authorMichael Brown2015-03-23 16:59:51 +0100
committerMichael Brown2015-03-23 17:21:13 +0100
commit9e88194655c7d074fb7eeab834db97353c47282d (patch)
tree9b451e999176a2aa082e36f314b537f7d5dda41a /src/drivers/usb/ehci.c
parent[usb] Reset endpoints without waiting for a new transfer to be enqueued (diff)
downloadipxe-9e88194655c7d074fb7eeab834db97353c47282d.tar.gz
ipxe-9e88194655c7d074fb7eeab834db97353c47282d.tar.xz
ipxe-9e88194655c7d074fb7eeab834db97353c47282d.zip
[usb] Add clear_tt() hub method to clear transaction translator buffer
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/usb/ehci.c')
-rw-r--r--src/drivers/usb/ehci.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/drivers/usb/ehci.c b/src/drivers/usb/ehci.c
index 4436c982..83635f45 100644
--- a/src/drivers/usb/ehci.c
+++ b/src/drivers/usb/ehci.c
@@ -1022,7 +1022,7 @@ static void ehci_endpoint_close ( struct usb_endpoint *ep ) {
/* No way to prevent hardware from continuing to
* access the memory, so leak it.
*/
- DBGC ( ehci, "EHCI %p %s endpoint %d could not unschedule: "
+ DBGC ( ehci, "EHCI %p %s endpoint %02x could not unschedule: "
"%s\n", ehci, usb->name, ep->address, strerror ( rc ) );
return;
}
@@ -1217,7 +1217,7 @@ static void ehci_endpoint_poll ( struct ehci_endpoint *endpoint ) {
*/
if ( status & EHCI_STATUS_HALTED ) {
rc = -EIO_STATUS ( status );
- DBGC ( ehci, "EHCI %p %s endpoint %d completion %d "
+ DBGC ( ehci, "EHCI %p %s endpoint %02x completion %d "
"failed (status %02x): %s\n", ehci, usb->name,
ep->address, index, status, strerror ( rc ) );
while ( ! iobuf )
@@ -1497,6 +1497,25 @@ static int ehci_hub_speed ( struct usb_hub *hub, struct usb_port *port ) {
}
/**
+ * Clear transaction translator buffer
+ *
+ * @v hub USB hub
+ * @v port USB port
+ * @v ep USB endpoint
+ * @ret rc Return status code
+ */
+static int ehci_hub_clear_tt ( struct usb_hub *hub, struct usb_port *port,
+ struct usb_endpoint *ep ) {
+ struct ehci_device *ehci = usb_hub_get_drvdata ( hub );
+
+ /* Should never be called; this is a root hub */
+ DBGC ( ehci, "EHCI %p port %d nonsensical CLEAR_TT for %s endpoint "
+ "%02x\n", ehci, port->address, ep->usb->name, ep->address );
+
+ return -ENOTSUP;
+}
+
+/**
* Poll for port status changes
*
* @v hub USB hub
@@ -1706,6 +1725,7 @@ static struct usb_host_operations ehci_operations = {
.enable = ehci_hub_enable,
.disable = ehci_hub_disable,
.speed = ehci_hub_speed,
+ .clear_tt = ehci_hub_clear_tt,
},
};