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


Ignore:
Timestamp:
2017-08-20T12:01:35Z (7 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
07c08ea
Parents:
5ff9e1d
Message:

Updated RH implementation with virtual hub emulation structure.

File:
1 edited

Legend:

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

    r5ff9e1d rd32d51d  
    220220                goto err_event_ring;
    221221
    222         return EOK;
    223 
     222        if ((err = xhci_rh_init(&hc->rh)))
     223                goto err_rh;
     224
     225        return EOK;
     226
     227err_rh:
     228        xhci_rh_fini(&hc->rh);
    224229err_event_ring:
    225230        xhci_event_ring_fini(&hc->event_ring);
     
    362367        assert(batch);
    363368
     369        /* Check for root hub communication */
     370        /* FIXME: Zero is a very crude workaround. Detect RH better. */
     371        if (batch->ep->address == 0) {
     372                usb_log_debug("XHCI root hub request.\n");
     373                return xhci_rh_schedule(&hc->rh, batch);
     374        }
     375
    364376        usb_log_debug2("EP(%d:%d) started %s transfer of size %lu.",
    365377                batch->ep->address, batch->ep->endpoint,
     
    386398        }
    387399
    388         return ENAK;
     400        return EOK;
    389401}
    390402
     
    515527        hc_dcbaa_fini(hc);
    516528        xhci_fini_commands(hc);
     529        xhci_rh_fini(&hc->rh);
    517530        pio_disable(hc->base, RNGSZ(hc->mmio_range));
    518531        usb_log_info("HC(%p): Finalized.", hc);
Note: See TracChangeset for help on using the changeset viewer.