Changeset aee352c in mainline
- Timestamp:
- 2017-07-22T23:09:06Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a06fd64
- Parents:
- 110d795
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/hc.c
r110d795 raee352c 211 211 goto err_event_ring; 212 212 213 if ((err = xhci_init_commands(hc))) 214 goto err_event_ring; 215 213 216 return EOK; 214 217 … … 352 355 { 353 356 xhci_dump_state(hc); 354 xhci_send_no_op_command(hc );357 xhci_send_no_op_command(hc, NULL); 355 358 async_usleep(1000); 356 359 xhci_dump_state(hc); … … 405 408 void hc_interrupt(xhci_hc_t *hc, uint32_t status) 406 409 { 410 /** 411 * TODO: This is a temporary workaround, when an event interrupt 412 * happens, status has the value of 3, which is equal to 413 * XHCI_REG_SHIFT(XHCI_OP_EINT), intstead to the correct 414 * XHCI_REG_MASK(XHCI_OP_EINT), which has the value of 8 (1 << 3). 415 * This is how e.g. FreeBSD does it. 416 */ 417 status = hc->op_regs->usbsts; 418 407 419 if (status & XHCI_REG_MASK(XHCI_OP_HSE)) { 408 420 usb_log_error("Host controller error occured. Bad things gonna happen..."); … … 414 426 xhci_interrupter_regs_t *intr0 = &hc->rt_regs->ir[0]; 415 427 416 if (XHCI_REG_RD(intr0, XHCI_INTR_IP)) { 428 /** 429 * EINT has to be cleared before IP, but we also need to 430 * handle the event before clearing EINT. 431 */ 432 uint32_t ip = XHCI_REG_RD(intr0, XHCI_INTR_IP); 433 434 if (ip | 1) { // TODO: IP is being cleared right after it is set by the xHC. 435 hc_run_event_ring(hc, &hc->event_ring, intr0); 436 } 437 438 XHCI_REG_SET(hc->op_regs, XHCI_OP_EINT, 1); 439 440 if (ip) { 417 441 XHCI_REG_SET(intr0, XHCI_INTR_IP, 1); 418 hc_run_event_ring(hc, &hc->event_ring, intr0);419 442 } 420 443 }
Note:
See TracChangeset
for help on using the changeset viewer.