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


Ignore:
Timestamp:
2018-01-13T00:54:24Z (6 years ago)
Author:
Salmelu <salmelu@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
230ef1c
Parents:
0e7380f
Message:

xhci: Isoch mfindex epoch counting

Isochronous mfindex is now saved together with wrap epochs.
This allows us to work with endpoints with larger intervals,
that need to schedule over epochs.

File:
1 edited

Legend:

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

    r0e7380f r94e9c29  
    220220        hc->ac64 = XHCI_REG_RD(hc->cap_regs, XHCI_CAP_AC64);
    221221        hc->max_slots = XHCI_REG_RD(hc->cap_regs, XHCI_CAP_MAX_SLOTS);
     222
     223        struct timeval tv;
     224        getuptime(&tv);
     225        hc->wrap_time = tv.tv_sec * 1000000 + tv.tv_usec;
    222226        hc->wrap_count = 0;
     227
    223228        unsigned ist = XHCI_REG_RD(hc->cap_regs, XHCI_CAP_IST);
    224229        hc->ist = (ist & 0x10 >> 1) * (ist & 0xf);
     
    508513static int xhci_handle_mfindex_wrap_event(xhci_hc_t *hc, xhci_trb_t *trb)
    509514{
     515        struct timeval tv;
     516        getuptime(&tv);
     517        hc->wrap_time = ((uint64_t) tv.tv_sec) * 1000000 + ((uint64_t) tv.tv_usec);
    510518        ++hc->wrap_count;
    511519        return EOK;
Note: See TracChangeset for help on using the changeset viewer.