Lines Matching refs:running_total
2503 int num_sgs, num_trbs, running_total, temp, i; in count_sg_trbs_needed() local
2517 running_total = TRB_MAX_BUFF_SIZE - in count_sg_trbs_needed()
2519 running_total &= TRB_MAX_BUFF_SIZE - 1; in count_sg_trbs_needed()
2520 if (running_total != 0) in count_sg_trbs_needed()
2524 while (running_total < sg_dma_len(sg) && running_total < temp) { in count_sg_trbs_needed()
2526 running_total += TRB_MAX_BUFF_SIZE; in count_sg_trbs_needed()
2547 static void check_trb_math(struct urb *urb, int num_trbs, int running_total) in check_trb_math() argument
2553 if (running_total != urb->transfer_buffer_length) in check_trb_math()
2558 running_total, running_total, in check_trb_math()
2644 int trb_buff_len, this_sg_len, running_total; in queue_bulk_sg_tx() local
2676 running_total = 0; in queue_bulk_sg_tx()
2734 running_total) ; in queue_bulk_sg_tx()
2753 running_total += trb_buff_len; in queue_bulk_sg_tx()
2773 if (running_total + trb_buff_len > urb->transfer_buffer_length) in queue_bulk_sg_tx()
2775 urb->transfer_buffer_length - running_total; in queue_bulk_sg_tx()
2776 } while (running_total < urb->transfer_buffer_length); in queue_bulk_sg_tx()
2778 check_trb_math(urb, num_trbs, running_total); in queue_bulk_sg_tx()
2798 int running_total, trb_buff_len, ret; in xhci_queue_bulk_tx() local
2810 running_total = TRB_MAX_BUFF_SIZE - in xhci_queue_bulk_tx()
2812 running_total &= TRB_MAX_BUFF_SIZE - 1; in xhci_queue_bulk_tx()
2817 if (running_total != 0 || urb->transfer_buffer_length == 0) in xhci_queue_bulk_tx()
2820 while (running_total < urb->transfer_buffer_length) { in xhci_queue_bulk_tx()
2822 running_total += TRB_MAX_BUFF_SIZE; in xhci_queue_bulk_tx()
2852 running_total = 0; in xhci_queue_bulk_tx()
2886 running_total); in xhci_queue_bulk_tx()
2905 running_total += trb_buff_len; in xhci_queue_bulk_tx()
2909 trb_buff_len = urb->transfer_buffer_length - running_total; in xhci_queue_bulk_tx()
2912 } while (running_total < urb->transfer_buffer_length); in xhci_queue_bulk_tx()
2914 check_trb_math(urb, num_trbs, running_total); in xhci_queue_bulk_tx()
3030 u64 addr, td_len, running_total; in count_isoc_trbs_needed() local
3035 running_total = TRB_MAX_BUFF_SIZE - (addr & (TRB_MAX_BUFF_SIZE - 1)); in count_isoc_trbs_needed()
3036 running_total &= TRB_MAX_BUFF_SIZE - 1; in count_isoc_trbs_needed()
3037 if (running_total != 0) in count_isoc_trbs_needed()
3040 while (running_total < td_len) { in count_isoc_trbs_needed()
3042 running_total += TRB_MAX_BUFF_SIZE; in count_isoc_trbs_needed()
3060 int running_total, trb_buff_len, td_len, td_remain_len, ret; in xhci_queue_isoc_tx() local
3090 running_total = 0; in xhci_queue_isoc_tx()
3145 remainder = xhci_td_remainder(td_len - running_total); in xhci_queue_isoc_tx()
3159 running_total += trb_buff_len; in xhci_queue_isoc_tx()
3166 if (running_total != td_len) { in xhci_queue_isoc_tx()