Changeset 8033f89 in mainline for uspace/drv/bus/usb/xhci/commands.c


Ignore:
Timestamp:
2018-01-23T12:41:22Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e7e1fd3
Parents:
e546142
Message:

xhci: cstyle

File:
1 edited

Legend:

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

    re546142 r8033f89  
    244244        cr_set_state(cr, XHCI_CR_STATE_CLOSED);
    245245
     246        /* Some systems, inc. QEMU, need whole 64-bit qword to be written */
    246247        XHCI_REG_SET(hc->op_regs, XHCI_OP_CS, 1);
    247         XHCI_REG_SET(hc->op_regs, XHCI_OP_CRCR_HI, 0); // Some systems (incl. QEMU) require 64-bit write
     248        XHCI_REG_SET(hc->op_regs, XHCI_OP_CRCR_HI, 0);
    248249
    249250        while (XHCI_REG_RD(hc->op_regs, XHCI_OP_CRR))
     
    259260static void abort_command_ring(xhci_hc_t *hc)
    260261{
    261         XHCI_REG_WR(hc->op_regs, XHCI_OP_CA, 1);
    262         XHCI_REG_SET(hc->op_regs, XHCI_OP_CRCR_HI, 0); // Some systems (incl. QEMU) require 64-bit write
     262        /* Some systems, inc. QEMU, need whole 64-bit qword to be written */
     263        XHCI_REG_SET(hc->op_regs, XHCI_OP_CA, 1);
     264        XHCI_REG_SET(hc->op_regs, XHCI_OP_CRCR_HI, 0);
    263265}
    264266
     
    370372        command->slot_id = TRB_GET_SLOT(*trb);
    371373
    372         usb_log_debug("Completed command %s", xhci_trb_str_type(TRB_TYPE(command->_header.trb)));
     374        usb_log_debug("Completed command %s",
     375            xhci_trb_str_type(TRB_TYPE(command->_header.trb)));
    373376
    374377        if (code != XHCI_TRBC_SUCCESS) {
     
    412415
    413416        TRB_SET_TYPE(cmd->_header.trb, XHCI_TRB_TYPE_ENABLE_SLOT_CMD);
    414         cmd->_header.trb.control |= host2xhci(32, XHCI_REG_RD(hc->xecp, XHCI_EC_SP_SLOT_TYPE) << 16);
     417        cmd->_header.trb.control |=
     418            host2xhci(32, XHCI_REG_RD(hc->xecp, XHCI_EC_SP_SLOT_TYPE) << 16);
    415419
    416420        return enqueue_command(hc, cmd);
     
    683687        while (!cmd->_header.completed) {
    684688
    685                 rv = fibril_condvar_wait_timeout(&cmd->_header.completed_cv, &cmd->_header.completed_mtx, XHCI_COMMAND_TIMEOUT);
     689                rv = fibril_condvar_wait_timeout(&cmd->_header.completed_cv,
     690                    &cmd->_header.completed_mtx, XHCI_COMMAND_TIMEOUT);
    686691
    687692                /* The waiting timed out. Current command (not necessarily
Note: See TracChangeset for help on using the changeset viewer.