patch-2.4.13 linux/drivers/pci/pci.c
Next file: linux/drivers/pci/pci.ids
Previous file: linux/drivers/pci/gen-devlist.c
Back to the patch index
Back to the overall index
- Lines: 68
- Date:
Fri Oct 12 15:35:53 2001
- Orig file:
v2.4.12/linux/drivers/pci/pci.c
- Orig date:
Sun Sep 23 11:40:59 2001
diff -u --recursive --new-file v2.4.12/linux/drivers/pci/pci.c linux/drivers/pci/pci.c
@@ -834,17 +834,27 @@
}
int
-pci_set_dma_mask(struct pci_dev *dev, dma_addr_t mask)
+pci_set_dma_mask(struct pci_dev *dev, u64 mask)
{
- if(! pci_dma_supported(dev, mask))
- return -EIO;
+ if (!pci_dma_supported(dev, mask))
+ return -EIO;
- dev->dma_mask = mask;
+ dev->dma_mask = mask;
- return 0;
+ return 0;
}
+int
+pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask)
+{
+ if (!pci_dac_dma_supported(dev, mask))
+ return -EIO;
+
+ dev->dma_mask = mask;
+ return 0;
+}
+
/*
* Translate the low bits of the PCI base
* to the resource type
@@ -1678,7 +1688,8 @@
if (!page)
return 0;
page->vaddr = pci_alloc_consistent (pool->dev,
- pool->allocation, &page->dma);
+ pool->allocation,
+ &page->dma);
if (page->vaddr) {
memset (page->bitmap, 0xff, mapsize); // bit set == free
if (pool->flags & SLAB_POISON)
@@ -1864,14 +1875,14 @@
if ((page = pool_find_page (pool, dma)) == 0) {
printk (KERN_ERR "pci_pool_free %s/%s, %p/%x (bad dma)\n",
pool->dev ? pool->dev->slot_name : NULL,
- pool->name, vaddr, dma);
+ pool->name, vaddr, (int) (dma & 0xffffffff));
return;
}
#ifdef CONFIG_PCIPOOL_DEBUG
if (((dma - page->dma) + (void *)page->vaddr) != vaddr) {
printk (KERN_ERR "pci_pool_free %s/%s, %p (bad vaddr)/%x\n",
pool->dev ? pool->dev->slot_name : NULL,
- pool->name, vaddr, dma);
+ pool->name, vaddr, (int) (dma & 0xffffffff));
return;
}
#endif
@@ -1956,6 +1967,7 @@
EXPORT_SYMBOL(pci_find_subsys);
EXPORT_SYMBOL(pci_set_master);
EXPORT_SYMBOL(pci_set_dma_mask);
+EXPORT_SYMBOL(pci_dac_set_dma_mask);
EXPORT_SYMBOL(pci_assign_resource);
EXPORT_SYMBOL(pci_register_driver);
EXPORT_SYMBOL(pci_unregister_driver);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)