Lines Matching refs:td
23 static void init_td(struct td *td) in init_td() argument
25 memset(td, 0, sizeof(*td)); in init_td()
26 INIT_LIST_HEAD(&td->node); in init_td()
27 INIT_LIST_HEAD(&td->frame_lh); in init_td()
37 static struct td *get_empty_td(struct fhci_hcd *fhci) in get_empty_td()
39 struct td *td; in get_empty_td() local
42 td = list_entry(fhci->empty_tds.next, struct td, node); in get_empty_td()
45 td = kmalloc(sizeof(*td), GFP_ATOMIC); in get_empty_td()
46 if (!td) in get_empty_td()
49 init_td(td); in get_empty_td()
52 return td; in get_empty_td()
55 void fhci_recycle_empty_td(struct fhci_hcd *fhci, struct td *td) in fhci_recycle_empty_td() argument
57 init_td(td); in fhci_recycle_empty_td()
58 list_add(&td->node, &fhci->empty_tds); in fhci_recycle_empty_td()
85 struct td *fhci_td_fill(struct fhci_hcd *fhci, struct urb *urb, in fhci_td_fill()
90 struct td *td = get_empty_td(fhci); in fhci_td_fill() local
92 if (!td) in fhci_td_fill()
95 td->urb = urb; in fhci_td_fill()
96 td->ed = ed; in fhci_td_fill()
97 td->type = type; in fhci_td_fill()
98 td->toggle = toggle; in fhci_td_fill()
99 td->data = data; in fhci_td_fill()
100 td->len = len; in fhci_td_fill()
101 td->iso_index = index; in fhci_td_fill()
102 td->interval = interval; in fhci_td_fill()
103 td->start_frame = start_frame; in fhci_td_fill()
104 td->ioc = ioc; in fhci_td_fill()
105 td->status = USB_TD_OK; in fhci_td_fill()
107 urb_priv->tds[index] = td; in fhci_td_fill()
109 return td; in fhci_td_fill()