Changeset a06fd64 in mainline for uspace/drv/bus/usb/xhci/hc.c


Ignore:
Timestamp:
2017-07-23T01:31:57Z (7 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c4d4fa2
Parents:
aee352c
Message:

Fixed the ERDP update, we were missing macro definitions for EHB and did not set it after updating ERDP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/hc.c

    raee352c ra06fd64  
    358358        async_usleep(1000);
    359359        xhci_dump_state(hc);
     360        async_usleep(10000);
     361        xhci_send_no_op_command(hc, NULL);
    360362
    361363        xhci_dump_trb(hc->event_ring.dequeue_trb);
     
    384386        xhci_trb_t trb;
    385387
     388        // TODO: Apparently we are supposed to process events until ering is empty
     389        //       and then update the erdp?
    386390        err = xhci_event_ring_dequeue(event_ring, &trb);;
    387391
     
    401405
    402406        /* Update the ERDP to make room in the ring */
     407        hc->event_ring.dequeue_ptr = host2xhci(64, addr_to_phys(hc->event_ring.dequeue_trb));
    403408        uint64_t erdp = hc->event_ring.dequeue_ptr;
    404409        XHCI_REG_WR(intr, XHCI_INTR_ERDP_LO, LOWER32(erdp));
    405410        XHCI_REG_WR(intr, XHCI_INTR_ERDP_HI, UPPER32(erdp));
     411        XHCI_REG_SET(intr, XHCI_INTR_ERDP_EHB, 1);
    406412}
    407413
Note: See TracChangeset for help on using the changeset viewer.