===== drivers/usb/host/ehci-mem.c 1.16 vs edited =====
--- 2.6.2-mm1/drivers/usb/host/ehci-hcd.c Sun Dec 28 13:36:41 2003
+++ edited/drivers/usb/host/ehci-hcd.c Wed Feb 4 14:06:27 2004
@@ -26,6 +26,7 @@
#include <linux/module.h>
#include <linux/pci.h>
+#include <linux/dmapool.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/ioport.h>
@@ -67,6 +68,7 @@
*
* HISTORY:
*
+ * 2004-02-24 Replace pci_* with generic dma_* API calls ([EMAIL PROTECTED])
* 2003-12-29 Rewritten high speed iso transfer support (by Michal Sojka,
* <[EMAIL PROTECTED]>, updates by DB).
*
@@ -288,13 +290,13 @@
/* request handoff to OS */
cap &= 1 << 24;
- pci_write_config_dword (ehci->hcd.pdev, where, cap);
+ pci_write_config_dword (to_pci_dev(ehci->hcd.dev), where, cap);
/* and wait a while for it to happen */
do {
wait_ms (10);
msec -= 10;
- pci_read_config_dword (ehci->hcd.pdev, where, &cap);
+ pci_read_config_dword (to_pci_dev(ehci->hcd.dev), where, &cap);
} while ((cap & (1 << 16)) && msec);
if (cap & (1 << 16)) {
ehci_err (ehci, "BIOS handoff failed (%d, %04x)\n",
@@ -339,7 +341,7 @@
while (temp) {
u32 cap;
- pci_read_config_dword (ehci->hcd.pdev, temp, &cap);
+ pci_read_config_dword (to_pci_dev(ehci->hcd.dev), temp, &cap);
ehci_dbg (ehci, "capability %04x at %02x\n", cap, temp);
switch (cap & 0xff) {
case 1: /* BIOS/SMM/... handoff */
@@ -378,7 +380,7 @@
* periodic_size can shrink by USBCMD update if hcc_params allows.
*/
ehci->periodic_size = DEFAULT_I_TDPS;
- if ((retval = ehci_mem_init (ehci, SLAB_KERNEL)) < 0)
+ if ((retval = ehci_mem_init (ehci, GFP_KERNEL)) < 0)
return retval;
/* controllers may cache some of the periodic schedule ... */
@@ -433,13 +435,13 @@
writel (0, &ehci->regs->segment);
#if 0
// this is deeply broken on almost all architectures
- if (!pci_set_dma_mask (ehci->hcd.pdev, 0xffffffffffffffffULL))
+ if (!pci_set_dma_mask (to_pci_dev(ehci->hcd.dev),
0xffffffffffffffffULL))
ehci_info (ehci, "enabled 64bit PCI DMA\n");
#endif
}
/* help hc dma work well with cachelines */
- pci_set_mwi (ehci->hcd.pdev);
+ pci_set_mwi (to_pci_dev(ehci->hcd.dev));
/* clear interrupt enables, set irq latency */
temp = readl (&ehci->regs->command) & 0x0fff;
@@ -493,7 +495,7 @@
readl (&ehci->regs->command); /* unblock posted write */
/* PCI Serial Bus Release Number is at 0x60 offset */
- pci_read_config_byte (hcd->pdev, 0x60, &tempbyte);
+ pci_read_config_byte (to_pci_dev(hcd->dev), 0x60, &tempbyte);
temp = HC_VERSION(readl (&ehci->caps->hc_capbase));
ehci_info (ehci,
"USB %x.%x enabled, EHCI %x.%02x, driver %s\n",
--
Deepak Saxena - dsaxena at plexity dot net - http://www.plexity.net/
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel