Changeset 889146e in mainline for uspace/drv/bus/usb/xhci/hc.c
- Timestamp:
- 2017-12-10T21:49:12Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 53db806
- Parents:
- 6ef407b
- git-author:
- Ondřej Hlavatý <aearsis@…> (2017-12-10 21:43:47)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2017-12-10 21:49:12)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/hc.c
r6ef407b r889146e 44 44 #include "hw_struct/context.h" 45 45 #include "endpoint.h" 46 #include "commands.h"47 46 #include "transfers.h" 48 47 #include "trb_ring.h" … … 204 203 hc->dcbaa = hc->dcbaa_dma.virt; 205 204 206 if ((err = xhci_ trb_ring_init(&hc->command_ring)))205 if ((err = xhci_event_ring_init(&hc->event_ring))) 207 206 goto err_dcbaa; 208 209 if ((err = xhci_event_ring_init(&hc->event_ring)))210 goto err_cmd_ring;211 207 212 208 if ((err = xhci_scratchpad_alloc(hc))) … … 233 229 err_event_ring: 234 230 xhci_event_ring_fini(&hc->event_ring); 235 err_cmd_ring:236 xhci_trb_ring_fini(&hc->command_ring);237 231 err_dcbaa: 238 232 hc->dcbaa = NULL; … … 399 393 return err; 400 394 395 // FIXME: Waiting forever. 401 396 while (XHCI_REG_RD(hc->op_regs, XHCI_OP_CNR)) 402 397 async_usleep(1000); … … 407 402 XHCI_REG_WR(hc->op_regs, XHCI_OP_MAX_SLOTS_EN, 0); 408 403 409 uint64_t crptr = xhci_trb_ring_get_dequeue_ptr(&hc->c ommand_ring);404 uint64_t crptr = xhci_trb_ring_get_dequeue_ptr(&hc->cr.trb_ring); 410 405 XHCI_REG_WR(hc->op_regs, XHCI_OP_CRCR_LO, LOWER32(crptr) >> 6); 411 406 XHCI_REG_WR(hc->op_regs, XHCI_OP_CRCR_HI, UPPER32(crptr)); … … 578 573 { 579 574 xhci_bus_fini(&hc->bus); 580 xhci_trb_ring_fini(&hc->command_ring);581 575 xhci_event_ring_fini(&hc->event_ring); 582 576 hc_dcbaa_fini(hc);
Note:
See TracChangeset
for help on using the changeset viewer.