mirror of
https://github.com/ipxe/ipxe
synced 2026-01-01 09:09:32 +03:00
[usb] Report xHCI host controller events
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1615,6 +1615,22 @@ static void xhci_port_status ( struct xhci_device *xhci,
|
||||
usb_port_changed ( usb_port ( xhci->bus->hub, port->port ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle host controller event
|
||||
*
|
||||
* @v xhci xHCI device
|
||||
* @v host Host controller event
|
||||
*/
|
||||
static void xhci_host_controller ( struct xhci_device *xhci,
|
||||
struct xhci_trb_host_controller *host ) {
|
||||
int rc;
|
||||
|
||||
/* Construct error */
|
||||
rc = -ECODE ( host->code );
|
||||
DBGC ( xhci, "XHCI %p host controller event (code %d): %s\n",
|
||||
xhci, host->code, strerror ( rc ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Poll event ring
|
||||
*
|
||||
@@ -1656,6 +1672,10 @@ static void xhci_event_poll ( struct xhci_device *xhci ) {
|
||||
xhci_port_status ( xhci, &trb->port );
|
||||
break;
|
||||
|
||||
case XHCI_TRB_HOST_CONTROLLER:
|
||||
xhci_host_controller ( xhci, &trb->host );
|
||||
break;
|
||||
|
||||
default:
|
||||
DBGC ( xhci, "XHCI %p unrecognised event %#x\n:",
|
||||
xhci, event->cons );
|
||||
|
||||
Reference in New Issue
Block a user