• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/usb/host/

Lines Matching defs:ehci

19 /* this file is part of ehci-hcd.c */
48 static struct ehci_qtd *ehci_qtd_alloc (struct ehci_hcd *ehci, gfp_t flags)
53 qtd = dma_pool_alloc (ehci->qtd_pool, flags, &dma);
60 static inline void ehci_qtd_free (struct ehci_hcd *ehci, struct ehci_qtd *qtd)
62 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, qh->qh_dma);
81 static struct ehci_qh *ehci_qh_alloc (struct ehci_hcd *ehci, gfp_t flags)
87 dma_pool_alloc (ehci->qh_pool, flags, &dma);
93 qh->ehci = ehci;
99 qh->dummy = ehci_qtd_alloc (ehci, flags);
101 ehci_dbg (ehci, "no dummy td\n");
102 dma_pool_free (ehci->qh_pool, qh, qh->qh_dma);
127 static void ehci_mem_cleanup (struct ehci_hcd *ehci)
129 if (ehci->async)
130 qh_put (ehci->async);
131 ehci->async = NULL;
134 if (ehci->qtd_pool)
135 dma_pool_destroy (ehci->qtd_pool);
136 ehci->qtd_pool = NULL;
138 if (ehci->qh_pool) {
139 dma_pool_destroy (ehci->qh_pool);
140 ehci->qh_pool = NULL;
143 if (ehci->itd_pool)
144 dma_pool_destroy (ehci->itd_pool);
145 ehci->itd_pool = NULL;
147 if (ehci->sitd_pool)
148 dma_pool_destroy (ehci->sitd_pool);
149 ehci->sitd_pool = NULL;
151 if (ehci->periodic)
152 dma_free_coherent (ehci_to_hcd(ehci)->self.controller,
153 ehci->periodic_size * sizeof (u32),
154 ehci->periodic, ehci->periodic_dma);
155 ehci->periodic = NULL;
158 kfree(ehci->pshadow);
159 ehci->pshadow = NULL;
163 static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
168 ehci->qtd_pool = dma_pool_create ("ehci_qtd",
169 ehci_to_hcd(ehci)->self.controller,
173 if (!ehci->qtd_pool) {
178 ehci->qh_pool = dma_pool_create ("ehci_qh",
179 ehci_to_hcd(ehci)->self.controller,
183 if (!ehci->qh_pool) {
186 ehci->async = ehci_qh_alloc (ehci, flags);
187 if (!ehci->async) {
192 ehci->itd_pool = dma_pool_create ("ehci_itd",
193 ehci_to_hcd(ehci)->self.controller,
197 if (!ehci->itd_pool) {
202 ehci->sitd_pool = dma_pool_create ("ehci_sitd",
203 ehci_to_hcd(ehci)->self.controller,
207 if (!ehci->sitd_pool) {
212 ehci->periodic = (__le32 *)
213 dma_alloc_coherent (ehci_to_hcd(ehci)->self.controller,
214 ehci->periodic_size * sizeof(__le32),
215 &ehci->periodic_dma, 0);
216 if (ehci->periodic == NULL) {
219 for (i = 0; i < ehci->periodic_size; i++)
220 ehci->periodic [i] = EHCI_LIST_END;
223 ehci->pshadow = kcalloc(ehci->periodic_size, sizeof(void *), flags);
224 if (ehci->pshadow != NULL)
228 ehci_dbg (ehci, "couldn't init memory\n");
229 ehci_mem_cleanup (ehci);