On Fri, Mar 11, 2005 at 11:03:17AM -0500, Alan Stern wrote: > When the PCI subsystem discovers a device, it calls pci_setup_device to > initialize various things. It doesn't call pci_disable_device to stop the > device from doing DMA, or do the equivalent (whatever that might be) to > stop the device from generating IRQs. Unless I'm mistaken, which is > certainly possible. > > During a normal boot most devices are left in reasonably quiescent and > safe condition when the BIOS passes control to the OS. But sometimes a > few of them aren't; that's why we need to have the USB early-handoff quirk > code. And during a kexec reboot things might be even worse.
Huh. I'd always thought of this as a PA-RISC specific problem, not realising that other architectures might have the same problem. We solved this with a call to firmware that says "stop these devices doing DMA". But something more general would be good too ... For machines with IOMMUs, we need to disable DMA quite early in boot, long before the PCI bus gets walked. Or maybe we need to set up the IOMMU after the PCI busses get walked but before the PCI drivers get attached. Grant, you know this area better than I do ... what do you think? > Is it feasible to have the PCI device initialization sequence disable DMA > and IRQs from the device? This could solve the problems we've been seeing > with non-quiescent devices sharing an IRQ line at startup. -- "Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel