|
@@ -1615,6 +1615,22 @@ static void xhci_port_status ( struct xhci_device *xhci,
|
1615
|
1615
|
usb_port_changed ( usb_port ( xhci->bus->hub, port->port ) );
|
1616
|
1616
|
}
|
1617
|
1617
|
|
|
1618
|
+/**
|
|
1619
|
+ * Handle host controller event
|
|
1620
|
+ *
|
|
1621
|
+ * @v xhci xHCI device
|
|
1622
|
+ * @v host Host controller event
|
|
1623
|
+ */
|
|
1624
|
+static void xhci_host_controller ( struct xhci_device *xhci,
|
|
1625
|
+ struct xhci_trb_host_controller *host ) {
|
|
1626
|
+ int rc;
|
|
1627
|
+
|
|
1628
|
+ /* Construct error */
|
|
1629
|
+ rc = -ECODE ( host->code );
|
|
1630
|
+ DBGC ( xhci, "XHCI %p host controller event (code %d): %s\n",
|
|
1631
|
+ xhci, host->code, strerror ( rc ) );
|
|
1632
|
+}
|
|
1633
|
+
|
1618
|
1634
|
/**
|
1619
|
1635
|
* Poll event ring
|
1620
|
1636
|
*
|
|
@@ -1656,6 +1672,10 @@ static void xhci_event_poll ( struct xhci_device *xhci ) {
|
1656
|
1672
|
xhci_port_status ( xhci, &trb->port );
|
1657
|
1673
|
break;
|
1658
|
1674
|
|
|
1675
|
+ case XHCI_TRB_HOST_CONTROLLER:
|
|
1676
|
+ xhci_host_controller ( xhci, &trb->host );
|
|
1677
|
+ break;
|
|
1678
|
+
|
1659
|
1679
|
default:
|
1660
|
1680
|
DBGC ( xhci, "XHCI %p unrecognised event %#x\n:",
|
1661
|
1681
|
xhci, event->cons );
|