Lines Matching refs:qh
153 struct ehci_qh *qh; in ehci_qh_alloc() local
156 qh = (struct ehci_qh *) in ehci_qh_alloc()
158 if (!qh) in ehci_qh_alloc()
159 return qh; in ehci_qh_alloc()
162 memset (qh, 0, sizeof *qh); in ehci_qh_alloc()
163 atomic_set (&qh->refcount, 1); in ehci_qh_alloc()
164 qh->qh_dma = dma; in ehci_qh_alloc()
166 diag_printf("qh: %p, qh->qh_dma: %p\n", (MS_U32)qh, qh->qh_dma); in ehci_qh_alloc()
167 INIT_LIST_HEAD (&qh->qtd_list); in ehci_qh_alloc()
170 qh->dummy = ehci_qtd_alloc (ehci, flags); in ehci_qh_alloc()
171 if (qh->dummy == 0) in ehci_qh_alloc()
174 pci_pool_free (ehci->qh_pool, qh, qh->qh_dma); in ehci_qh_alloc()
175 qh = 0; in ehci_qh_alloc()
179 return qh; in ehci_qh_alloc()
183 static __inline__ struct ehci_qh *qh_get (/* ehci, */ struct ehci_qh *qh) in qh_get() argument
186 atomic_inc (&qh->refcount); in qh_get()
188 return qh; in qh_get()
192 static void qh_put (struct ehci_hcd *ehci, struct ehci_qh *qh) in qh_put() argument
194 if (!atomic_dec_and_test (&qh->refcount)) in qh_put()
197 if (!list_empty (&qh->qtd_list) || qh->qh_next.ptr) in qh_put()
204 if (qh->dummy) in qh_put()
205 ehci_qtd_free (ehci, qh->dummy); in qh_put()
208 pci_pool_free (ehci->qh_pool, qh, qh->qh_dma); in qh_put()