Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 12fba858 in mainline


Ignore:
Timestamp:
2017-07-19T18:29:32Z (3 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
master
Children:
9af3281
Parents:
955e988
Message:

Fixed the value of ERDP sent to the xHC, according to section 4.9.4 it is supposed to be the value of ERST[0].BaseAddress?, which is stored in the dequeue_ptr field of the event ring.

File:
1 edited

Legend:

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

    r955e988 r12fba858  
    320320
    321321        uint64_t erstptr = addr_to_phys(hc->event_ring.erst);
     322        uint64_t erdp = hc->event_ring.dequeue_ptr;
    322323        xhci_interrupter_regs_t *intr0 = &hc->rt_regs->ir[0];
    323324        XHCI_REG_WR(intr0, XHCI_INTR_ERSTSZ, hc->event_ring.segment_count);
    324         XHCI_REG_WR(intr0, XHCI_INTR_ERDP_LO, LOWER32(erstptr));
    325         XHCI_REG_WR(intr0, XHCI_INTR_ERDP_HI, UPPER32(erstptr));
     325        XHCI_REG_WR(intr0, XHCI_INTR_ERDP_LO, LOWER32(erdp));
     326        XHCI_REG_WR(intr0, XHCI_INTR_ERDP_HI, UPPER32(erdp));
    326327        XHCI_REG_WR(intr0, XHCI_INTR_ERSTBA_LO, LOWER32(erstptr));
    327328        XHCI_REG_WR(intr0, XHCI_INTR_ERSTBA_HI, UPPER32(erstptr));
     
    397398
    398399        /* Update the ERDP to make room in the ring */
    399         uint64_t erstptr = addr_to_phys(hc->event_ring.erst);
    400         XHCI_REG_WR(intr, XHCI_INTR_ERDP_LO, LOWER32(erstptr));
    401         XHCI_REG_WR(intr, XHCI_INTR_ERDP_HI, UPPER32(erstptr));
     400        uint64_t erdp = hc->event_ring.dequeue_ptr;
     401        XHCI_REG_WR(intr, XHCI_INTR_ERDP_LO, LOWER32(erdp));
     402        XHCI_REG_WR(intr, XHCI_INTR_ERDP_HI, UPPER32(erdp));
    402403}
    403404
Note: See TracChangeset for help on using the changeset viewer.