• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/usb/host/

Lines Matching refs:ehci

19 /* this file is part of ehci-hcd.c */
38 static inline void ehci_qtd_init(struct ehci_hcd *ehci, struct ehci_qtd *qtd,
44 qtd->hw_next = EHCI_LIST_END(ehci);
45 qtd->hw_alt_next = EHCI_LIST_END(ehci);
49 static struct ehci_qtd *ehci_qtd_alloc (struct ehci_hcd *ehci, gfp_t flags)
54 qtd = dma_pool_alloc (ehci->qtd_pool, flags, &dma);
56 ehci_qtd_init(ehci, qtd, dma);
61 static inline void ehci_qtd_free (struct ehci_hcd *ehci, struct ehci_qtd *qtd)
63 dma_pool_free (ehci->qtd_pool, qtd, qtd->qtd_dma);
69 struct ehci_hcd *ehci = qh->ehci;
73 ehci_dbg (ehci, "unused qh not empty!\n");
77 ehci_qtd_free (ehci, qh->dummy);
78 dma_pool_free(ehci->qh_pool, qh->hw, qh->qh_dma);
82 static struct ehci_qh *ehci_qh_alloc (struct ehci_hcd *ehci, gfp_t flags)
91 dma_pool_alloc(ehci->qh_pool, flags, &dma);
96 qh->ehci = ehci;
102 qh->dummy = ehci_qtd_alloc (ehci, flags);
104 ehci_dbg (ehci, "no dummy td\n");
110 dma_pool_free(ehci->qh_pool, qh->hw, qh->qh_dma);
137 static void ehci_mem_cleanup (struct ehci_hcd *ehci)
139 free_cached_lists(ehci);
140 if (ehci->async)
141 qh_put (ehci->async);
142 ehci->async = NULL;
145 if (ehci->qtd_pool)
146 dma_pool_destroy (ehci->qtd_pool);
147 ehci->qtd_pool = NULL;
149 if (ehci->qh_pool) {
150 dma_pool_destroy (ehci->qh_pool);
151 ehci->qh_pool = NULL;
154 if (ehci->itd_pool)
155 dma_pool_destroy (ehci->itd_pool);
156 ehci->itd_pool = NULL;
158 if (ehci->sitd_pool)
159 dma_pool_destroy (ehci->sitd_pool);
160 ehci->sitd_pool = NULL;
162 if (ehci->periodic)
163 dma_free_coherent (ehci_to_hcd(ehci)->self.controller,
164 ehci->periodic_size * sizeof (u32),
165 ehci->periodic, ehci->periodic_dma);
166 ehci->periodic = NULL;
169 kfree(ehci->pshadow);
170 ehci->pshadow = NULL;
174 static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
179 ehci->qtd_pool = dma_pool_create ("ehci_qtd",
180 ehci_to_hcd(ehci)->self.controller,
184 if (!ehci->qtd_pool) {
189 ehci->qh_pool = dma_pool_create ("ehci_qh",
190 ehci_to_hcd(ehci)->self.controller,
194 if (!ehci->qh_pool) {
197 ehci->async = ehci_qh_alloc (ehci, flags);
198 if (!ehci->async) {
203 ehci->itd_pool = dma_pool_create ("ehci_itd",
204 ehci_to_hcd(ehci)->self.controller,
208 if (!ehci->itd_pool) {
213 ehci->sitd_pool = dma_pool_create ("ehci_sitd",
214 ehci_to_hcd(ehci)->self.controller,
218 if (!ehci->sitd_pool) {
223 ehci->periodic = (__le32 *)
224 dma_alloc_coherent (ehci_to_hcd(ehci)->self.controller,
225 ehci->periodic_size * sizeof(__le32),
226 &ehci->periodic_dma, 0);
227 if (ehci->periodic == NULL) {
230 for (i = 0; i < ehci->periodic_size; i++)
231 ehci->periodic [i] = EHCI_LIST_END(ehci);
234 ehci->pshadow = kcalloc(ehci->periodic_size, sizeof(void *), flags);
235 if (ehci->pshadow != NULL)
239 ehci_dbg (ehci, "couldn't init memory\n");
240 ehci_mem_cleanup (ehci);