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


Ignore:
Timestamp:
2018-02-26T16:51:40Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e773f58
Parents:
3692678
Message:

usb: cstyle

File:
1 edited

Legend:

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

    r3692678 rae3a941  
    150150
    151151        while (cmd_link != NULL) {
    152                 xhci_cmd_t *cmd = list_get_instance(cmd_link, xhci_cmd_t, _header.link);
     152                xhci_cmd_t *cmd = list_get_instance(cmd_link, xhci_cmd_t,
     153                    _header.link);
    153154
    154155                if (cmd->_header.trb_phys == phys)
     
    158159        }
    159160
    160         return cmd_link ? list_get_instance(cmd_link, xhci_cmd_t, _header.link)
    161                 : NULL;
     161        return cmd_link
     162            ? list_get_instance(cmd_link, xhci_cmd_t, _header.link)
     163            : NULL;
    162164}
    163165
     
    167169
    168170        cr->state = state;
    169         if (state == XHCI_CR_STATE_OPEN
    170             || state == XHCI_CR_STATE_CLOSED)
     171        if (state == XHCI_CR_STATE_OPEN || state == XHCI_CR_STATE_CLOSED)
    171172                fibril_condvar_broadcast(&cr->state_cv);
    172173}
     
    206207        }
    207208
    208         usb_log_debug("Sending command %s", xhci_trb_str_type(TRB_TYPE(cmd->_header.trb)));
     209        usb_log_debug("Sending command %s",
     210            xhci_trb_str_type(TRB_TYPE(cmd->_header.trb)));
    209211
    210212        list_append(&cmd->_header.link, &cr->cmd_list);
     
    337339                usb_log_error("Command resulted in error: %s.", trb_codes[code]);
    338340        else
    339                 usb_log_error("Command resulted in reserved or vendor specific error.");
     341                usb_log_error("Command resulted in reserved or "
     342                    "vendor specific error.");
    340343}
    341344
     
    657660        }
    658661
    659         usb_log_error("Timeout while waiting for command: aborting current command.");
     662        usb_log_error("Timeout while waiting for command: "
     663            "aborting current command.");
    660664
    661665        cr_set_state(cr, XHCI_CR_STATE_CHANGING);
     
    663667        abort_command_ring(hc);
    664668
    665         fibril_condvar_wait_timeout(&cr->stopped_cv, &cr->guard, XHCI_CR_ABORT_TIMEOUT);
     669        fibril_condvar_wait_timeout(&cr->stopped_cv, &cr->guard,
     670            XHCI_CR_ABORT_TIMEOUT);
    666671
    667672        if (XHCI_REG_RD(hc->op_regs, XHCI_OP_CRR)) {
Note: See TracChangeset for help on using the changeset viewer.