Changeset dcf0597 in mainline for uspace/drv/bus/usb/xhci/hc.c


Ignore:
Timestamp:
2017-10-13T17:40:48Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2297fab
Parents:
063dfe8
Message:

xhci rh: move away from virthub

xHC's root hub is too different from other HCs, that it does not make sense to use usbhub for driving it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/hc.c

    r063dfe8 rdcf0597  
    425425        XHCI_REG_SET(hc->op_regs, XHCI_OP_RS, 1);
    426426
     427        /* The reset changed status of all ports, and SW originated reason does
     428         * not cause an interrupt.
     429         */
     430        xhci_rh_handle_port_change(&hc->rh);
     431
    427432        return EOK;
    428433}
     
    451456{
    452457        assert(batch);
    453 
    454         /* Check for root hub communication */
    455         if (batch->ep->target.address == xhci_rh_get_address(&hc->rh)) {
    456                 usb_log_debug("XHCI root hub request.\n");
    457                 return xhci_rh_schedule(&hc->rh, batch);
    458         }
    459458
    460459        usb_log_debug2("EP(%d:%d) started %s transfer of size %lu.",
     
    488487static event_handler event_handlers [] = {
    489488        [XHCI_TRB_TYPE_COMMAND_COMPLETION_EVENT] = &xhci_handle_command_completion,
    490         [XHCI_TRB_TYPE_PORT_STATUS_CHANGE_EVENT] = &xhci_handle_port_status_change_event,
     489        [XHCI_TRB_TYPE_PORT_STATUS_CHANGE_EVENT] = &xhci_rh_handle_port_status_change_event,
    491490        [XHCI_TRB_TYPE_TRANSFER_EVENT] = &xhci_handle_transfer_event,
    492491};
     
    559558        status = xhci2host(32, status);
    560559
    561         /* TODO: Figure out how root hub interrupts work. */
    562560        if (status & XHCI_REG_MASK(XHCI_OP_PCD)) {
    563561                usb_log_debug2("Root hub interrupt.");
    564                 xhci_rh_interrupt(&hc->rh);
    565 
     562                xhci_rh_handle_port_change(&hc->rh);
    566563                status &= ~XHCI_REG_MASK(XHCI_OP_PCD);
    567564        }
Note: See TracChangeset for help on using the changeset viewer.