Changeset 275f529 in mainline


Ignore:
Timestamp:
2017-08-17T19:01:16Z (7 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e439f468
Parents:
d3dce3f
Message:

Detecting transfer types.

File:
1 edited

Legend:

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

    rd3dce3f r275f529  
    360360int hc_schedule(xhci_hc_t *hc, usb_transfer_batch_t *batch)
    361361{
    362         // TODO: This function currently contains cmd ring testing
    363         //       stuff, remove it.
    364         xhci_cmd_t *cmd = xhci_alloc_command();
    365         xhci_send_no_op_command(hc, cmd);
    366         xhci_wait_for_command(cmd, 1000000);
    367         xhci_free_command(cmd);
    368 
    369         return EOK;
     362        assert(batch);
     363
     364        usb_log_debug2("EP(%d:%d) started %s transfer of size %lu.",
     365                batch->ep->address, batch->ep->endpoint,
     366                usb_str_transfer_type(batch->ep->transfer_type),
     367                batch->buffer_size);
     368
     369        switch (batch->ep->transfer_type) {
     370        case USB_TRANSFER_CONTROL:
     371                /* TODO: Send setup stage TRB. */
     372                /* TODO: Optionally, send data stage TRB followed by zero or
     373                         more normal TRB's. */
     374                /* TODO: Send status stage TRB. */
     375                /* TODO: Ring the appropriate doorbell. */
     376                break;
     377        case USB_TRANSFER_ISOCHRONOUS:
     378                /* TODO: Implement me. */
     379                break;
     380        case USB_TRANSFER_BULK:
     381                /* TODO: Implement me. */
     382                break;
     383        case USB_TRANSFER_INTERRUPT:
     384                /* TODO: Implement me. */
     385                break;
     386        }
     387
     388        return ENAK;
    370389}
    371390
     
    456475                usb_log_error("Port change detected. Not implemented yet!");
    457476        }
    458        
     477
    459478        if (status & XHCI_REG_MASK(XHCI_OP_SRE)) {
    460479                usb_log_error("Save/Restore error occured. WTF, S/R mechanism not implemented!");
Note: See TracChangeset for help on using the changeset viewer.