Lines Matching refs:pEhci

85 static struct ehci_qtd *ms_ehci_qtd_alloc (struct ehci_hcd *pEhci, int iFlags)  in ms_ehci_qtd_alloc()  argument
90 pQtd = (struct ehci_qtd*) ms_mem_pool_alloc (pEhci->pQtdPool, iFlags, &tDmaAddr); in ms_ehci_qtd_alloc()
109 static __inline__ void ms_ehci_qtd_free (struct ehci_hcd *pEhci, struct ehci_qtd *pQtd) in ms_ehci_qtd_free() argument
111 ms_mem_pool_free (pEhci->pQtdPool, pQtd, pQtd->qtd_dma_addr); in ms_ehci_qtd_free()
115 static struct ehci_qh *ms_ehci_qh_alloc (struct ehci_hcd *pEhci, int iFlags) in ms_ehci_qh_alloc() argument
120 pQh = (struct ehci_qh *)ms_mem_pool_alloc (pEhci->pQhPool, iFlags, &tDmaAddr); in ms_ehci_qh_alloc()
131 pQh->pDummyQtd = ms_ehci_qtd_alloc (pEhci, iFlags); in ms_ehci_qh_alloc()
135 ms_mem_pool_free (pEhci->pQhPool, pQh, pQh->qh_dma_addr); in ms_ehci_qh_alloc()
149 static void ms_qh_put (struct ehci_hcd *pEhci, struct ehci_qh *pQh) in ms_qh_put() argument
160 ms_ehci_qtd_free (pEhci, pQh->pDummyQtd); in ms_qh_put()
161 ms_mem_pool_free (pEhci->pQhPool, pQh, pQh->qh_dma_addr); in ms_qh_put()
166 static void ms_ehci_mem_cleanup (struct ehci_hcd *pEhci) in ms_ehci_mem_cleanup() argument
168 if (pEhci->stAsync) in ms_ehci_mem_cleanup()
169 ms_qh_put (pEhci, pEhci->stAsync); in ms_ehci_mem_cleanup()
170 pEhci->stAsync = 0; in ms_ehci_mem_cleanup()
173 if (pEhci->pQtdPool) in ms_ehci_mem_cleanup()
174 ms_mem_pool_destroy (pEhci->pQtdPool); in ms_ehci_mem_cleanup()
175 pEhci->pQtdPool = 0; in ms_ehci_mem_cleanup()
177 if (pEhci->pQhPool) in ms_ehci_mem_cleanup()
179 ms_mem_pool_destroy (pEhci->pQhPool); in ms_ehci_mem_cleanup()
180 pEhci->pQhPool = 0; in ms_ehci_mem_cleanup()
183 if (pEhci->pPeriodic) in ms_ehci_mem_cleanup()
185 pEhci->u32PeriodicSize = DEFAULT_I_TDPS; // to match with allocated size in ms_ehci_mem_cleanup()
186 …ms_debug_debug("Free periodic frame list array %p, size %d\n",pEhci->pPeriodic, pEhci->u32Periodic… in ms_ehci_mem_cleanup()
187 …ms_hcd_buffer_free(&pEhci->hcd.self, pEhci->u32PeriodicSize * sizeof (void *), pEhci->pPeriodic, p… in ms_ehci_mem_cleanup()
189 pEhci->pPeriodic = 0; in ms_ehci_mem_cleanup()
190 pEhci->tPeriodicDma = 0; in ms_ehci_mem_cleanup()
193 if (pEhci->pshadow) in ms_ehci_mem_cleanup()
194 kfree (pEhci->pshadow); in ms_ehci_mem_cleanup()
195 pEhci->pshadow = 0; in ms_ehci_mem_cleanup()
198 static int ms_ehci_mem_init (struct ehci_hcd *pEhci, int iFlags) in ms_ehci_mem_init() argument
203 pEhci->pQtdPool = ms_mem_pool_create ("ehci_qtd", sizeof (struct ehci_qtd), in ms_ehci_mem_init()
210 if (!pEhci->pQtdPool) in ms_ehci_mem_init()
216 pEhci->pQhPool = ms_mem_pool_create ("ehci_qh", sizeof (struct ehci_qh), in ms_ehci_mem_init()
223 if (!pEhci->pQhPool) in ms_ehci_mem_init()
227 pEhci->stAsync = ms_ehci_qh_alloc (pEhci, iFlags); in ms_ehci_mem_init()
228 if (!pEhci->stAsync) in ms_ehci_mem_init()
234pEhci->pPeriodic = (U32*) ms_hcd_buffer_alloc(&pEhci->hcd.self,pEhci->u32PeriodicSize * sizeof (vo… in ms_ehci_mem_init()
236 …cheable memory pool for periodic frame list array %p, size %d\n",pEhci->pPeriodic, pEhci->u32Perio… in ms_ehci_mem_init()
237 if (pEhci->pPeriodic == 0) in ms_ehci_mem_init()
241 for (i = 0; i < pEhci->u32PeriodicSize; i++) in ms_ehci_mem_init()
242 pEhci->pPeriodic [i] = EHCI_LIST_END; in ms_ehci_mem_init()
244pEhci->pshadow = (union ehci_qh_shadow *) kmalloc (pEhci->u32PeriodicSize * sizeof (void *), iFla… in ms_ehci_mem_init()
245 if (pEhci->pshadow == 0) in ms_ehci_mem_init()
249 memset (pEhci->pshadow, 0, pEhci->u32PeriodicSize * sizeof (void *)); in ms_ehci_mem_init()
254 ms_ehci_mem_cleanup (pEhci); in ms_ehci_mem_init()