Lines Matching refs:td
48 sizeof (struct td), in ohci_mem_init()
76 static inline struct td *
79 struct td *td; in dma_to_td() local
82 td = hc->td_hash [TD_HASH_FUNC(td_dma)]; in dma_to_td()
83 while (td && td->td_dma != td_dma) in dma_to_td()
84 td = td->td_hash; in dma_to_td()
85 return td; in dma_to_td()
89 static struct td *
93 struct td *td; in td_alloc() local
97 td = gen_pool_dma_zalloc_align(hcd->localmem_pool, in td_alloc()
98 sizeof(*td), &dma, 32); in td_alloc()
100 td = dma_pool_zalloc(hc->td_cache, mem_flags, &dma); in td_alloc()
101 if (td) { in td_alloc()
103 td->hwNextTD = cpu_to_hc32 (hc, dma); in td_alloc()
104 td->td_dma = dma; in td_alloc()
107 return td; in td_alloc()
111 td_free (struct ohci_hcd *hc, struct td *td) in td_free() argument
113 struct td **prev = &hc->td_hash [TD_HASH_FUNC (td->td_dma)]; in td_free()
116 while (*prev && *prev != td) in td_free()
119 *prev = td->td_hash; in td_free()
120 else if ((td->hwINFO & cpu_to_hc32(hc, TD_DONE)) != 0) in td_free()
121 ohci_dbg (hc, "no hash for td %p\n", td); in td_free()
124 gen_pool_free(hcd->localmem_pool, (unsigned long)td, in td_free()
125 sizeof(*td)); in td_free()
127 dma_pool_free(hc->td_cache, td, td->td_dma); in td_free()