generic device DMA implementation
Quoted 2 lines · [email protected] said:
I'd rather keep our existing pci_* API than be forced into this crap again.
Let me just clarify: I'm not planning to revoke the pci_* API, or to deviate substantially from it. I'm not even planning to force any arch's to use it if they don't want to. I'm actually thinking of putting something like this in the asm-generic implementations:
dma_*(struct device *dev, ...) {
BUG_ON(dev->bus != &pci_bus_type)
pci_*(to_pci_device(dev), ..)
}The whole point is not to force another massive shift in the way drivers are written, but to provide a generic device based API for those who need it. There are very few drivers that actually have to allocate fake PCI devices today, but this API is aimed squarely at helping them. Drivers that only ever see real PCI devices won't need touching.
James
Quoted 2 lines · [email protected] said:
What happens to
&hwdev->devwhen you do as detailed there and pass NULL into these "compatibility" functions? Probably an oops.
Yes. Already found by Udo Steinberg and fixed in bk latest...
James