Changeset c9bec1c in mainline
- Timestamp:
- 2017-07-30T16:01:06Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 73e5b62
- Parents:
- 0cabd10
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.c
r0cabd10 rc9bec1c 167 167 } 168 168 169 static inline xhci_cmd_t *add_cmd(xhci_hc_t *hc, xhci_cmd_t *cmd)169 static inline int add_cmd(xhci_hc_t *hc, xhci_cmd_t *cmd) 170 170 { 171 171 if (cmd == NULL) { 172 172 cmd = xhci_alloc_command(); 173 173 if (cmd == NULL) 174 return cmd;174 return ENOMEM; 175 175 176 176 cmd->has_owner = false; … … 180 180 cmd->trb = hc->command_ring.enqueue_trb; 181 181 182 return cmd;182 return EOK; 183 183 } 184 184 … … 273 273 TRB_SET_TYPE(trb, XHCI_TRB_TYPE_NO_OP_CMD); 274 274 275 cmd =add_cmd(hc, cmd);275 add_cmd(hc, cmd); 276 276 277 277 return enqueue_trb(hc, &trb, 0, 0); … … 288 288 trb.control |= host2xhci(32, XHCI_REG_RD(hc->xecp, XHCI_EC_SP_SLOT_TYPE) << 16); 289 289 290 cmd =add_cmd(hc, cmd);290 add_cmd(hc, cmd); 291 291 292 292 return enqueue_trb(hc, &trb, 0, 0); … … 337 337 TRB_SET_SLOT(trb, cmd->slot_id); 338 338 339 cmd =add_cmd(hc, cmd);339 add_cmd(hc, cmd); 340 340 341 341 return enqueue_trb(hc, &trb, 0, 0); … … 357 357 TRB_SET_SLOT(trb, cmd->slot_id); 358 358 359 cmd =add_cmd(hc, cmd);359 add_cmd(hc, cmd); 360 360 361 361 return enqueue_trb(hc, &trb, 0, 0); … … 383 383 TRB_SET_SLOT(trb, cmd->slot_id); 384 384 385 cmd =add_cmd(hc, cmd);385 add_cmd(hc, cmd); 386 386 387 387 return enqueue_trb(hc, &trb, 0, 0); … … 405 405 TRB_SET_SLOT(trb, cmd->slot_id); 406 406 407 add_cmd(hc, cmd); 408 407 409 return enqueue_trb(hc, &trb, 0, 0); 408 410 } … … 421 423 TRB_SET_SLOT(trb, cmd->slot_id); 422 424 423 cmd =add_cmd(hc, cmd);425 add_cmd(hc, cmd); 424 426 425 427 return enqueue_trb(hc, &trb, 0, 0); … … 446 448 */ 447 449 448 cmd =add_cmd(hc, cmd);450 add_cmd(hc, cmd); 449 451 450 452 return enqueue_trb(hc, &trb, 0, 0); … … 461 463 TRB_SET_TYPE(trb, XHCI_TRB_TYPE_RESET_DEVICE_CMD); 462 464 TRB_SET_SLOT(trb, cmd->slot_id); 465 466 add_cmd(hc, cmd); 463 467 464 468 return enqueue_trb(hc, &trb, 0, 0); -
uspace/drv/bus/usb/xhci/hc.c
r0cabd10 rc9bec1c 331 331 XHCI_REG_WR(intr0, XHCI_INTR_ERSTBA_HI, UPPER32(erstptr)); 332 332 333 // TODO: Setup scratchpad buffers334 335 333 if (irq) { 336 334 XHCI_REG_SET(intr0, XHCI_INTR_IE, 1);
Note:
See TracChangeset
for help on using the changeset viewer.