Ignore:
File:
1 edited

Legend:

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

    r3bacee1 r205f1add  
    113113{
    114114        xhci_isoch_t *const isoch = ep->isoch;
    115         const suseconds_t delay = isoch->buffer_count * ep->interval * 125 +
     115        const usec_t delay = isoch->buffer_count * ep->interval * 125 +
    116116            RESET_TIMER_DELAY;
    117117
     
    210210static inline uint64_t get_system_time()
    211211{
    212         struct timeval tv;
    213         getuptime(&tv);
    214         return ((uint64_t) tv.tv_sec) * 1000000 + ((uint64_t) tv.tv_usec);
     212        struct timespec ts;
     213        getuptime(&ts);
     214        return SEC2USEC(ts.tv_sec) + NSEC2USEC(ts.tv_nsec);
    215215}
    216216
     
    314314        while (isoch->transfers[isoch->hw_enqueue].state == ISOCH_FILLED) {
    315315                xhci_isoch_transfer_t *const it = &isoch->transfers[isoch->hw_enqueue];
    316                 suseconds_t delay;
     316                usec_t delay;
    317317
    318318                assert(it->state == ISOCH_FILLED);
     
    324324                case WINDOW_TOO_SOON:
    325325                        delay = wd.offset * 125;
    326                         usb_log_debug("[isoch] delaying feeding buffer %zu for %ldus",
     326                        usb_log_debug("[isoch] delaying feeding buffer %zu for %lldus",
    327327                            it - isoch->transfers, delay);
    328328                        fibril_timer_set_locked(isoch->feeding_timer, delay,
     
    400400        while (isoch->transfers[isoch->enqueue].state <= ISOCH_FILLED) {
    401401                xhci_isoch_transfer_t *const it = &isoch->transfers[isoch->enqueue];
    402                 suseconds_t delay;
     402                usec_t delay;
    403403
    404404                /* IN buffers are "filled" with free space */
     
    416416                        /* Not allowed to feed yet. Defer to later. */
    417417                        delay = wd.offset * 125;
    418                         usb_log_debug("[isoch] delaying feeding buffer %zu for %ldus",
     418                        usb_log_debug("[isoch] delaying feeding buffer %zu for %lldus",
    419419                            it - isoch->transfers, delay);
    420420                        fibril_timer_set_locked(isoch->feeding_timer, delay,
Note: See TracChangeset for help on using the changeset viewer.