Changeset 8033f89 in mainline for uspace/drv/bus/usb/xhci/commands.c
- Timestamp:
- 2018-01-23T12:41:22Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e7e1fd3
- Parents:
- e546142
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.c
re546142 r8033f89 244 244 cr_set_state(cr, XHCI_CR_STATE_CLOSED); 245 245 246 /* Some systems, inc. QEMU, need whole 64-bit qword to be written */ 246 247 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 write248 XHCI_REG_SET(hc->op_regs, XHCI_OP_CRCR_HI, 0); 248 249 249 250 while (XHCI_REG_RD(hc->op_regs, XHCI_OP_CRR)) … … 259 260 static void abort_command_ring(xhci_hc_t *hc) 260 261 { 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); 263 265 } 264 266 … … 370 372 command->slot_id = TRB_GET_SLOT(*trb); 371 373 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))); 373 376 374 377 if (code != XHCI_TRBC_SUCCESS) { … … 412 415 413 416 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); 415 419 416 420 return enqueue_command(hc, cmd); … … 683 687 while (!cmd->_header.completed) { 684 688 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); 686 691 687 692 /* The waiting timed out. Current command (not necessarily
Note:
See TracChangeset
for help on using the changeset viewer.