Lines Matching refs:td

53 void fhci_add_td_to_frame(struct fhci_time_frame *frame, struct td *td)  in fhci_add_td_to_frame()  argument
55 list_add_tail(&td->frame_lh, &frame->tds_list); in fhci_add_td_to_frame()
58 void fhci_add_tds_to_ed(struct ed *ed, struct td **td_list, int number) in fhci_add_tds_to_ed()
63 struct td *td = td_list[i]; in fhci_add_tds_to_ed() local
64 list_add_tail(&td->node, &ed->td_list); in fhci_add_tds_to_ed()
70 static struct td *peek_td_from_ed(struct ed *ed) in peek_td_from_ed()
72 struct td *td; in peek_td_from_ed() local
75 td = list_entry(ed->td_list.next, struct td, node); in peek_td_from_ed()
77 td = NULL; in peek_td_from_ed()
79 return td; in peek_td_from_ed()
82 struct td *fhci_remove_td_from_frame(struct fhci_time_frame *frame) in fhci_remove_td_from_frame()
84 struct td *td; in fhci_remove_td_from_frame() local
87 td = list_entry(frame->tds_list.next, struct td, frame_lh); in fhci_remove_td_from_frame()
90 td = NULL; in fhci_remove_td_from_frame()
92 return td; in fhci_remove_td_from_frame()
95 struct td *fhci_peek_td_from_frame(struct fhci_time_frame *frame) in fhci_peek_td_from_frame()
97 struct td *td; in fhci_peek_td_from_frame() local
100 td = list_entry(frame->tds_list.next, struct td, frame_lh); in fhci_peek_td_from_frame()
102 td = NULL; in fhci_peek_td_from_frame()
104 return td; in fhci_peek_td_from_frame()
107 struct td *fhci_remove_td_from_ed(struct ed *ed) in fhci_remove_td_from_ed()
109 struct td *td; in fhci_remove_td_from_ed() local
112 td = list_entry(ed->td_list.next, struct td, node); in fhci_remove_td_from_ed()
117 ed->td_head = list_entry(ed->td_list.next, struct td, in fhci_remove_td_from_ed()
122 td = NULL; in fhci_remove_td_from_ed()
124 return td; in fhci_remove_td_from_ed()
127 struct td *fhci_remove_td_from_done_list(struct fhci_controller_list *p_list) in fhci_remove_td_from_done_list()
129 struct td *td; in fhci_remove_td_from_done_list() local
132 td = list_entry(p_list->done_list.next, struct td, node); in fhci_remove_td_from_done_list()
135 td = NULL; in fhci_remove_td_from_done_list()
137 return td; in fhci_remove_td_from_done_list()
142 struct td *td; in fhci_move_td_from_ed_to_done_list() local
144 td = ed->td_head; in fhci_move_td_from_ed_to_done_list()
145 list_del_init(&td->node); in fhci_move_td_from_ed_to_done_list()
149 ed->td_head = list_entry(ed->td_list.next, struct td, node); in fhci_move_td_from_ed_to_done_list()
154 ed->toggle_carry = td->toggle; in fhci_move_td_from_ed_to_done_list()
155 list_add_tail(&td->node, &usb->hc_list->done_list); in fhci_move_td_from_ed_to_done_list()
156 if (td->ioc) in fhci_move_td_from_ed_to_done_list()
174 ed->td_head = list_entry(ed->td_list.next, struct td, node); in free_urb_priv()
214 void fhci_done_td(struct urb *urb, struct td *td) in fhci_done_td() argument
216 struct ed *ed = td->ed; in fhci_done_td()
217 u32 cc = td->status; in fhci_done_td()
227 len = urb->iso_frame_desc[td->iso_index].length; in fhci_done_td()
229 len = td->actual_len; in fhci_done_td()
232 urb->iso_frame_desc[td->iso_index].actual_length = len; in fhci_done_td()
233 urb->iso_frame_desc[td->iso_index].status = in fhci_done_td()
242 if (td->error_cnt >= 3) in fhci_done_td()
259 if (td->type != FHCI_TA_SETUP || td->iso_index != 0) in fhci_done_td()
260 urb->actual_length += td->actual_len; in fhci_done_td()
267 struct td *td = peek_td_from_ed(ed); in fhci_del_ed_list() local
268 struct urb *urb = td->urb; in fhci_del_ed_list()
272 td = fhci_remove_td_from_ed(ed); in fhci_del_ed_list()
274 if (td->status != USB_TD_INPROGRESS) in fhci_del_ed_list()
275 fhci_done_td(urb, td); in fhci_del_ed_list()