Changeset ae3a941 in mainline for uspace/drv/bus/usb/xhci/commands.c
- Timestamp:
- 2018-02-26T16:51:40Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e773f58
- Parents:
- 3692678
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.c
r3692678 rae3a941 150 150 151 151 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); 153 154 154 155 if (cmd->_header.trb_phys == phys) … … 158 159 } 159 160 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; 162 164 } 163 165 … … 167 169 168 170 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) 171 172 fibril_condvar_broadcast(&cr->state_cv); 172 173 } … … 206 207 } 207 208 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))); 209 211 210 212 list_append(&cmd->_header.link, &cr->cmd_list); … … 337 339 usb_log_error("Command resulted in error: %s.", trb_codes[code]); 338 340 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."); 340 343 } 341 344 … … 657 660 } 658 661 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."); 660 664 661 665 cr_set_state(cr, XHCI_CR_STATE_CHANGING); … … 663 667 abort_command_ring(hc); 664 668 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); 666 671 667 672 if (XHCI_REG_RD(hc->op_regs, XHCI_OP_CRR)) {
Note:
See TracChangeset
for help on using the changeset viewer.