diff -Nru a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c
--- a/drivers/usb/host/ehci-mem.c Wed Feb 11 11:42:39 2004
+++ b/drivers/usb/host/ehci-mem.c Wed Feb 11 11:42:39 2004
@@ -24,7 +24,7 @@
* There's basically three types of memory:
* - data used only by the HCD ... kmalloc is fine
* - async and periodic schedules, shared by HC and HCD ... these
- * need to use pci_pool or pci_alloc_consistent
+ * need to use dma_pool or dma_alloc_coherent
* - driver buffers, read/written by HC ... single shot DMA mapped
*
* There's also PCI "register" data, which is memory mapped.
@@ -74,7 +74,7 @@
struct ehci_qtd *qtd;
dma_addr_t dma;
- qtd = pci_pool_alloc (ehci->qtd_pool, flags, &dma);
+ qtd = dma_pool_alloc (ehci->qtd_pool, flags, &dma);
if (qtd != 0) {
ehci_qtd_init (qtd, dma);
}
@@ -83,7 +83,7 @@
static inline void ehci_qtd_free (struct ehci_hcd *ehci, struct ehci_qtd *qtd)
{
- pci_pool_free (ehci->qtd_pool, qtd, qtd->qtd_dma);
+ dma_pool_free (ehci->qtd_pool, qtd, qtd->qtd_dma);
}
@@ -93,7 +93,7 @@
dma_addr_t dma;
qh = (struct ehci_qh *)
- pci_pool_alloc (ehci->qh_pool, flags, &dma);
+ dma_pool_alloc (ehci->qh_pool, flags, &dma);
if (!qh)
return qh;
@@ -107,7 +107,7 @@
qh->dummy = ehci_qtd_alloc (ehci, flags);
if (qh->dummy == 0) {
ehci_dbg (ehci, "no dummy td\n");
- pci_pool_free (ehci->qh_pool, qh, qh->qh_dma);
+ dma_pool_free (ehci->qh_pool, qh, qh->qh_dma);
qh = 0;
}
return qh;
@@ -132,7 +132,7 @@
if (qh->dummy)
ehci_qtd_free (ehci, qh->dummy);
usb_put_dev (qh->dev);
- pci_pool_free (ehci->qh_pool, qh, qh->qh_dma);
+ dma_pool_free (ehci->qh_pool, qh, qh->qh_dma);
}
/*-------------------------------------------------------------------------*/
@@ -148,26 +148,26 @@
qh_put (ehci, ehci->async);
ehci->async = 0;
- /* PCI consistent memory and pools */
+ /* DMA consistent memory and pools */
if (ehci->qtd_pool)
- pci_pool_destroy (ehci->qtd_pool);
+ dma_pool_destroy (ehci->qtd_pool);
ehci->qtd_pool = 0;
if (ehci->qh_pool) {
- pci_pool_destroy (ehci->qh_pool);
+ dma_pool_destroy (ehci->qh_pool);
ehci->qh_pool = 0;
}
if (ehci->itd_pool)
- pci_pool_destroy (ehci->itd_pool);
+ dma_pool_destroy (ehci->itd_pool);
ehci->itd_pool = 0;
if (ehci->sitd_pool)
- pci_pool_destroy (ehci->sitd_pool);
+ dma_pool_destroy (ehci->sitd_pool);
ehci->sitd_pool = 0;
if (ehci->periodic)
- pci_free_consistent (ehci->hcd.pdev,
+ dma_free_coherent (ehci->hcd.self.controller,
ehci->periodic_size * sizeof (u32),
ehci->periodic, ehci->periodic_dma);
ehci->periodic = 0;
@@ -184,7 +184,8 @@
int i;
/* QTDs for control/bulk/intr transfers */
- ehci->qtd_pool = pci_pool_create ("ehci_qtd", ehci->hcd.pdev,
+ ehci->qtd_pool = dma_pool_create ("ehci_qtd",
+ ehci->hcd.self.controller,
sizeof (struct ehci_qtd),
32 /* byte alignment (for hw parts) */,
4096 /* can't cross 4K */);
@@ -193,7 +194,8 @@
}
/* QHs for control/bulk/intr transfers */
- ehci->qh_pool = pci_pool_create ("ehci_qh", ehci->hcd.pdev,
+ ehci->qh_pool = dma_pool_create ("ehci_qh",
+ ehci->hcd.self.controller,
sizeof (struct ehci_qh),
32 /* byte alignment (for hw parts) */,
4096 /* can't cross 4K */);
@@ -206,7 +208,8 @@
}
/* ITD for high speed ISO transfers */
- ehci->itd_pool = pci_pool_create ("ehci_itd", ehci->hcd.pdev,
+ ehci->itd_pool = dma_pool_create ("ehci_itd",
+ ehci->hcd.self.controller,
sizeof (struct ehci_itd),
32 /* byte alignment (for hw parts) */,
4096 /* can't cross 4K */);
@@ -215,7 +218,8 @@
}
/* SITD for full/low speed split ISO transfers */
- ehci->sitd_pool = pci_pool_create ("ehci_sitd", ehci->hcd.pdev,
+ ehci->sitd_pool = dma_pool_create ("ehci_sitd",
+ ehci->hcd.self.controller,
sizeof (struct ehci_sitd),
32 /* byte alignment (for hw parts) */,
4096 /* can't cross 4K */);
@@ -225,9 +229,9 @@
/* Hardware periodic table */
ehci->periodic = (u32 *)
- pci_alloc_consistent (ehci->hcd.pdev,
+ dma_alloc_coherent (ehci->hcd.self.controller,
ehci->periodic_size * sizeof (u32),
- &ehci->periodic_dma);
+ &ehci->periodic_dma, 0);
if (ehci->periodic == 0) {
goto fail;
}
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel