Lines Matching refs:num_trbs

255 		unsigned int num_trbs)  in room_on_ring()  argument
259 if (ring->num_trbs_free < num_trbs) in room_on_ring()
264 if (ring->num_trbs_free < num_trbs + num_trbs_in_deq_seg) in room_on_ring()
2766 u32 ep_state, unsigned int num_trbs, gfp_t mem_flags) in prepare_ring() argument
2799 if (room_on_ring(xhci, ep_ring, num_trbs)) in prepare_ring()
2809 num_trbs_needed = num_trbs - ep_ring->num_trbs_free; in prepare_ring()
2854 unsigned int num_trbs, in prepare_transfer() argument
2874 num_trbs, mem_flags); in prepare_transfer()
2903 int num_sgs, num_trbs, running_total, temp, i; in count_sg_trbs_needed() local
2910 num_trbs = 0; in count_sg_trbs_needed()
2919 num_trbs++; in count_sg_trbs_needed()
2923 num_trbs++; in count_sg_trbs_needed()
2931 return num_trbs; in count_sg_trbs_needed()
2934 static void check_trb_math(struct urb *urb, int num_trbs, int running_total) in check_trb_math() argument
2936 if (num_trbs != 0) in check_trb_math()
2939 urb->ep->desc.bEndpointAddress, num_trbs); in check_trb_math()
3049 unsigned int num_trbs; in queue_bulk_sg_tx() local
3069 num_trbs = count_sg_trbs_needed(xhci, urb); in queue_bulk_sg_tx()
3076 num_trbs, urb, 0, mem_flags); in queue_bulk_sg_tx()
3086 num_trbs++; in queue_bulk_sg_tx()
3142 if (num_trbs > last_trb_num) { in queue_bulk_sg_tx()
3144 } else if (num_trbs == last_trb_num) { in queue_bulk_sg_tx()
3147 } else if (zero_length_needed && num_trbs == 1) { in queue_bulk_sg_tx()
3168 urb, num_trbs - 1); in queue_bulk_sg_tx()
3174 if (num_trbs > 1) in queue_bulk_sg_tx()
3183 --num_trbs; in queue_bulk_sg_tx()
3207 } while (num_trbs > 0); in queue_bulk_sg_tx()
3209 check_trb_math(urb, num_trbs, running_total); in queue_bulk_sg_tx()
3222 int num_trbs; in xhci_queue_bulk_tx() local
3242 num_trbs = 0; in xhci_queue_bulk_tx()
3252 num_trbs++; in xhci_queue_bulk_tx()
3255 num_trbs++; in xhci_queue_bulk_tx()
3261 num_trbs, urb, 0, mem_flags); in xhci_queue_bulk_tx()
3271 num_trbs++; in xhci_queue_bulk_tx()
3318 if (num_trbs > last_trb_num) { in xhci_queue_bulk_tx()
3320 } else if (num_trbs == last_trb_num) { in xhci_queue_bulk_tx()
3323 } else if (zero_length_needed && num_trbs == 1) { in xhci_queue_bulk_tx()
3336 urb, num_trbs - 1); in xhci_queue_bulk_tx()
3342 if (num_trbs > 1) in xhci_queue_bulk_tx()
3351 --num_trbs; in xhci_queue_bulk_tx()
3359 } while (num_trbs > 0); in xhci_queue_bulk_tx()
3361 check_trb_math(urb, num_trbs, running_total); in xhci_queue_bulk_tx()
3372 int num_trbs; in xhci_queue_ctrl_tx() local
3393 num_trbs = 2; in xhci_queue_ctrl_tx()
3400 num_trbs++; in xhci_queue_ctrl_tx()
3403 num_trbs, urb, 0, mem_flags); in xhci_queue_ctrl_tx()
3493 int num_trbs = 0; in count_isoc_trbs_needed() local
3499 num_trbs = DIV_ROUND_UP(td_len + (addr & (TRB_MAX_BUFF_SIZE - 1)), in count_isoc_trbs_needed()
3501 if (num_trbs == 0) in count_isoc_trbs_needed()
3502 num_trbs++; in count_isoc_trbs_needed()
3504 return num_trbs; in count_isoc_trbs_needed()
3757 int num_tds, num_trbs, i; in xhci_queue_isoc_tx_prepare() local
3764 num_trbs = 0; in xhci_queue_isoc_tx_prepare()
3767 num_trbs += count_isoc_trbs_needed(xhci, urb, i); in xhci_queue_isoc_tx_prepare()
3773 num_trbs, mem_flags); in xhci_queue_isoc_tx_prepare()