I don't understand the objection. The memory has been declared
as DMA and the system already manages it as such. What's the catch ?
If I can't use virt_to_phys(), can I have a function that does
exactly the same ? The new API is heavy enough, and if drivers can't
have something like this it's just messy...
Just define something like :
------------------------------------------
static inline dma_addr_t pci_map_alloc(struct pci_dev *hwdev, void *ptr)
{
ret virt_to_phys(ptr);
}
------------------------------------------
> Note for ISA (and EISA and VLB) devices, you also call
> pci_alloc_consistent. You pass NULL for the pci device.
That's what I do. But I don't claim it's tested.
By the way, it seems weird to prefix all those functions with
"pci_" where in fact they are only loosely related to PCI stuff.
Also, on the inconsistent side, most functions handle pci_dev
== NULL, but not all, and it's not well documented. For example, if
you pass NULL to pci_set_dma_mask(), it will kaboom !
> Jeff
Jean
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/