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


Ignore:
Timestamp:
2018-08-25T21:35:26Z (6 years ago)
Author:
GitHub <noreply@…>
Parents:
e2625b1a (diff), 3c45353 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jakub Jermář <jakub@…> (2018-08-25 21:35:26)
git-committer:
GitHub <noreply@…> (2018-08-25 21:35:26)
Message:

Merge 3c453534a2b093c8039d8e8059b923c71f3492a3 into e2625b1a1e5a2895b86f0e39c2d70a39e49e042a

File:
1 edited

Legend:

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

    re2625b1a r231b3fd  
    229229        hc->max_slots = XHCI_REG_RD(hc->cap_regs, XHCI_CAP_MAX_SLOTS);
    230230
    231         struct timeval tv;
    232         getuptime(&tv);
    233         hc->wrap_time = tv.tv_sec * 1000000 + tv.tv_usec;
     231        struct timespec ts;
     232        getuptime(&ts);
     233        hc->wrap_time = SEC2USEC(ts.tv_sec) + NSEC2USEC(ts.tv_nsec);
    234234        hc->wrap_count = 0;
    235235
     
    591591static errno_t xhci_handle_mfindex_wrap_event(xhci_hc_t *hc, xhci_trb_t *trb)
    592592{
    593         struct timeval tv;
    594         getuptime(&tv);
    595         usb_log_debug("Microframe index wrapped (@%lu.%li, %" PRIu64 " total).",
    596             tv.tv_sec, tv.tv_usec, hc->wrap_count);
    597         hc->wrap_time = ((uint64_t) tv.tv_sec) * 1000000 + ((uint64_t) tv.tv_usec);
     593        struct timespec ts;
     594        getuptime(&ts);
     595        usb_log_debug("Microframe index wrapped (@%lld.%lld, %" PRIu64 " total).",
     596            ts.tv_sec, NSEC2USEC(ts.tv_nsec), hc->wrap_count);
     597        hc->wrap_time = SEC2USEC(ts.tv_sec) + NSEC2USEC(ts.tv_nsec);
    598598        ++hc->wrap_count;
    599599        return EOK;
Note: See TracChangeset for help on using the changeset viewer.