Lines Matching refs:td
57 void fhci_add_td_to_frame(struct fhci_time_frame *frame, struct td *td) in fhci_add_td_to_frame() argument
59 list_add_tail(&td->frame_lh, &frame->tds_list); in fhci_add_td_to_frame()
62 void fhci_add_tds_to_ed(struct ed *ed, struct td **td_list, int number) in fhci_add_tds_to_ed()
67 struct td *td = td_list[i]; in fhci_add_tds_to_ed() local
68 list_add_tail(&td->node, &ed->td_list); in fhci_add_tds_to_ed()
74 static struct td *peek_td_from_ed(struct ed *ed) in peek_td_from_ed()
76 struct td *td; in peek_td_from_ed() local
79 td = list_entry(ed->td_list.next, struct td, node); in peek_td_from_ed()
81 td = NULL; in peek_td_from_ed()
83 return td; in peek_td_from_ed()
86 struct td *fhci_remove_td_from_frame(struct fhci_time_frame *frame) in fhci_remove_td_from_frame()
88 struct td *td; in fhci_remove_td_from_frame() local
91 td = list_entry(frame->tds_list.next, struct td, frame_lh); in fhci_remove_td_from_frame()
94 td = NULL; in fhci_remove_td_from_frame()
96 return td; in fhci_remove_td_from_frame()
99 struct td *fhci_peek_td_from_frame(struct fhci_time_frame *frame) in fhci_peek_td_from_frame()
101 struct td *td; in fhci_peek_td_from_frame() local
104 td = list_entry(frame->tds_list.next, struct td, frame_lh); in fhci_peek_td_from_frame()
106 td = NULL; in fhci_peek_td_from_frame()
108 return td; in fhci_peek_td_from_frame()
111 struct td *fhci_remove_td_from_ed(struct ed *ed) in fhci_remove_td_from_ed()
113 struct td *td; in fhci_remove_td_from_ed() local
116 td = list_entry(ed->td_list.next, struct td, node); in fhci_remove_td_from_ed()
121 ed->td_head = list_entry(ed->td_list.next, struct td, in fhci_remove_td_from_ed()
126 td = NULL; in fhci_remove_td_from_ed()
128 return td; in fhci_remove_td_from_ed()
131 struct td *fhci_remove_td_from_done_list(struct fhci_controller_list *p_list) in fhci_remove_td_from_done_list()
133 struct td *td; in fhci_remove_td_from_done_list() local
136 td = list_entry(p_list->done_list.next, struct td, node); in fhci_remove_td_from_done_list()
139 td = NULL; in fhci_remove_td_from_done_list()
141 return td; in fhci_remove_td_from_done_list()
146 struct td *td; in fhci_move_td_from_ed_to_done_list() local
148 td = ed->td_head; in fhci_move_td_from_ed_to_done_list()
149 list_del_init(&td->node); in fhci_move_td_from_ed_to_done_list()
153 ed->td_head = list_entry(ed->td_list.next, struct td, node); in fhci_move_td_from_ed_to_done_list()
158 ed->toggle_carry = td->toggle; in fhci_move_td_from_ed_to_done_list()
159 list_add_tail(&td->node, &usb->hc_list->done_list); in fhci_move_td_from_ed_to_done_list()
160 if (td->ioc) in fhci_move_td_from_ed_to_done_list()
178 ed->td_head = list_entry(ed->td_list.next, struct td, node); in free_urb_priv()
218 void fhci_done_td(struct urb *urb, struct td *td) in fhci_done_td() argument
220 struct ed *ed = td->ed; in fhci_done_td()
221 u32 cc = td->status; in fhci_done_td()
231 len = urb->iso_frame_desc[td->iso_index].length; in fhci_done_td()
233 len = td->actual_len; in fhci_done_td()
236 urb->iso_frame_desc[td->iso_index].actual_length = len; in fhci_done_td()
237 urb->iso_frame_desc[td->iso_index].status = in fhci_done_td()
246 if (td->error_cnt >= 3) in fhci_done_td()
263 if (td->type != FHCI_TA_SETUP || td->iso_index != 0) in fhci_done_td()
264 urb->actual_length += td->actual_len; in fhci_done_td()
271 struct td *td = peek_td_from_ed(ed); in fhci_del_ed_list() local
272 struct urb *urb = td->urb; in fhci_del_ed_list()
276 td = fhci_remove_td_from_ed(ed); in fhci_del_ed_list()
278 if (td->status != USB_TD_INPROGRESS) in fhci_del_ed_list()
279 fhci_done_td(urb, td); in fhci_del_ed_list()