Changeset a06fd64 in mainline


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.

Location:
uspace/drv/bus/usb/xhci
Files:
2 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
  • uspace/drv/bus/usb/xhci/hw_struct/regs.h

    raee352c ra06fd64  
    461461#define XHCI_INTR_ERSTBA_LO  erstba_lo, 32, FIELD
    462462#define XHCI_INTR_ERSTBA_HI  erstba_hi, 32, FIELD
     463#define XHCI_INTR_ERDP_ESI     erdp_lo, 32, RANGE,  2, 0
     464#define XHCI_INTR_ERDP_EHB     erdp_lo, 32,  FLAG,  3
     465// TODO: ERDP_LO is supposed to be RANGE 31, 4 (section 5.5.2.3.3).
    463466#define XHCI_INTR_ERDP_LO      erdp_lo, 32, FIELD
    464467#define XHCI_INTR_ERDP_HI      erdp_hi, 32, FIELD
Note: See TracChangeset for help on using the changeset viewer.