Changeset 3d8a3bd in mainline
- Timestamp:
- 2017-08-20T19:12:12Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6da6039
- Parents:
- decfc8d1
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/hc.c
rdecfc8d1 r3d8a3bd 402 402 } 403 403 404 static void hc_handle_event(xhci_hc_t *hc, xhci_trb_t *trb )404 static void hc_handle_event(xhci_hc_t *hc, xhci_trb_t *trb, xhci_interrupter_regs_t *intr) 405 405 { 406 406 usb_log_debug2("TRB event encountered."); … … 410 410 break; 411 411 case XHCI_TRB_TYPE_PORT_STATUS_CHANGE_EVENT: 412 /** 413 * TODO: This is a very crude hotfix, I'm not sure if 414 * we can do this one level above in the event handling 415 * loop (incase the xHC adds more events while we process events). 416 */ 417 hc->event_ring.dequeue_ptr = host2xhci(64, addr_to_phys(hc->event_ring.dequeue_trb)); 418 uint64_t erdp = hc->event_ring.dequeue_ptr; 419 XHCI_REG_WR(intr, XHCI_INTR_ERDP_LO, LOWER32(erdp)); 420 XHCI_REG_WR(intr, XHCI_INTR_ERDP_HI, UPPER32(erdp)); 421 XHCI_REG_SET(intr, XHCI_INTR_ERDP_EHB, 1); 412 422 xhci_handle_port_status_change_event(hc, trb); 413 423 break; … … 430 440 xhci_trb_str_type(TRB_TYPE(trb))); 431 441 432 hc_handle_event(hc, &trb );442 hc_handle_event(hc, &trb, intr); 433 443 } else { 434 444 usb_log_warning("Error while accessing event ring: %s", str_error(err)); -
uspace/drv/bus/usb/xhci/trb_ring.c
rdecfc8d1 r3d8a3bd 121 121 int xhci_trb_ring_fini(xhci_trb_ring_t *ring) 122 122 { 123 if (!ring) 124 return EOK; 125 123 126 list_foreach(ring->segments, segments_link, trb_segment_t, segment) 124 127 dmamem_unmap_anonymous(segment);
Note:
See TracChangeset
for help on using the changeset viewer.