Lines Matching refs:td

20 		struct td	*td;  in urb_free_priv()  local
23 td = urb_priv->td [i]; in urb_free_priv()
24 if (td) in urb_free_priv()
25 td_free (hc, td); in urb_free_priv()
414 struct td *td; in ed_get() local
425 td = td_alloc (ohci, GFP_ATOMIC); in ed_get()
426 if (!td) { in ed_get()
432 ed->dummy = td; in ed_get()
433 ed->hwTailP = cpu_to_hc32 (ohci, td->td_dma); in ed_get()
520 struct td *td, *td_pt; in td_fill() local
543 td_pt = urb_priv->td [index]; in td_fill()
546 td = urb_priv->td [index] = urb_priv->ed->dummy; in td_fill()
549 td->ed = urb_priv->ed; in td_fill()
550 td->next_dl_td = NULL; in td_fill()
551 td->index = index; in td_fill()
552 td->urb = urb; in td_fill()
553 td->data_dma = data; in td_fill()
557 td->hwINFO = cpu_to_hc32 (ohci, info); in td_fill()
559 td->hwCBP = cpu_to_hc32 (ohci, data & 0xFFFFF000); in td_fill()
560 *ohci_hwPSWp(ohci, td, 0) = cpu_to_hc16 (ohci, in td_fill()
563 td->hwCBP = cpu_to_hc32 (ohci, data); in td_fill()
566 td->hwBE = cpu_to_hc32 (ohci, data + len - 1); in td_fill()
568 td->hwBE = 0; in td_fill()
569 td->hwNextTD = cpu_to_hc32 (ohci, td_pt->td_dma); in td_fill()
572 list_add_tail (&td->td_list, &td->ed->td_list); in td_fill()
575 hash = TD_HASH_FUNC (td->td_dma); in td_fill()
576 td->td_hash = ohci->td_hash [hash]; in td_fill()
577 ohci->td_hash [hash] = td; in td_fill()
581 td->ed->hwTailP = td->hwNextTD; in td_fill()
756 static int td_done(struct ohci_hcd *ohci, struct urb *urb, struct td *td) in td_done() argument
758 u32 tdINFO = hc32_to_cpup (ohci, &td->hwINFO); in td_done()
762 list_del (&td->td_list); in td_done()
766 u16 tdPSW = ohci_hwPSW(ohci, td, 0); in td_done()
778 dlen = urb->iso_frame_desc [td->index].length; in td_done()
786 urb->iso_frame_desc [td->index].actual_length = dlen; in td_done()
787 urb->iso_frame_desc [td->index].status = cc_to_error [cc]; in td_done()
792 urb, td, 1 + td->index, dlen, cc); in td_done()
800 u32 tdBE = hc32_to_cpup (ohci, &td->hwBE); in td_done()
812 if ((type != PIPE_CONTROL || td->index != 0) && tdBE != 0) { in td_done()
813 if (td->hwCBP == 0) in td_done()
814 urb->actual_length += tdBE - td->data_dma + 1; in td_done()
817 hc32_to_cpup (ohci, &td->hwCBP) in td_done()
818 - td->data_dma; in td_done()
824 urb, td, 1 + td->index, cc, in td_done()
833 static void ed_halted(struct ohci_hcd *ohci, struct td *td, int cc) in ed_halted() argument
835 struct urb *urb = td->urb; in ed_halted()
837 struct ed *ed = td->ed; in ed_halted()
838 struct list_head *tmp = td->td_list.next; in ed_halted()
853 struct td *next; in ed_halted()
855 next = list_entry (tmp, struct td, td_list); in ed_halted()
893 hc32_to_cpu (ohci, td->hwINFO), in ed_halted()
899 static void add_to_done_list(struct ohci_hcd *ohci, struct td *td) in add_to_done_list() argument
901 struct td *td2, *td_prev; in add_to_done_list()
904 if (td->next_dl_td) in add_to_done_list()
908 ed = td->ed; in add_to_done_list()
909 td2 = td_prev = td; in add_to_done_list()
926 ohci->dl_end = td->next_dl_td = td; in add_to_done_list()
938 struct td *td = NULL; in update_done_list() local
950 td = dma_to_td (ohci, td_dma); in update_done_list()
951 if (!td) { in update_done_list()
956 td->hwINFO |= cpu_to_hc32 (ohci, TD_DONE); in update_done_list()
957 cc = TD_CC_GET (hc32_to_cpup (ohci, &td->hwINFO)); in update_done_list()
964 && (td->ed->hwHeadP & cpu_to_hc32 (ohci, ED_H))) in update_done_list()
965 ed_halted(ohci, td, cc); in update_done_list()
967 td_dma = hc32_to_cpup (ohci, &td->hwNextTD); in update_done_list()
968 add_to_done_list(ohci, td); in update_done_list()
996 struct td *td; in finish_unlinks() local
999 td = list_first_entry(&ed->td_list, struct td, td_list); in finish_unlinks()
1003 if (td->td_dma != head && in finish_unlinks()
1008 if (td->next_dl_td) in finish_unlinks()
1038 struct td *td; in finish_unlinks() local
1044 td = list_entry (entry, struct td, td_list); in finish_unlinks()
1045 urb = td->urb; in finish_unlinks()
1046 urb_priv = td->urb->hcpriv; in finish_unlinks()
1049 prev = &td->hwNextTD; in finish_unlinks()
1055 *prev = td->hwNextTD | savebits; in finish_unlinks()
1062 tdINFO = hc32_to_cpup(ohci, &td->hwINFO); in finish_unlinks()
1069 td_done (ohci, urb, td); in finish_unlinks()
1150 static void takeback_td(struct ohci_hcd *ohci, struct td *td) in takeback_td() argument
1152 struct urb *urb = td->urb; in takeback_td()
1154 struct ed *ed = td->ed; in takeback_td()
1158 status = td_done(ohci, urb, td); in takeback_td()
1173 td = list_entry(ed->td_list.next, struct td, td_list); in takeback_td()
1174 if (!(td->hwINFO & cpu_to_hc32(ohci, TD_DONE))) { in takeback_td()
1200 struct td *td; in process_done_list() local
1203 td = ohci->dl_start; in process_done_list()
1204 if (td == ohci->dl_end) in process_done_list()
1207 ohci->dl_start = td->next_dl_td; in process_done_list()
1209 takeback_td(ohci, td); in process_done_list()