On Mon, 26 Dec 2005, Daniel Drake wrote: > I just found the problem. > > I upgraded to amd64 and my driver didn't work at all. Kernel panic > ("PCI-DMA: high address but no IOMMU") during the first firmware packet > transfer. > > Turns out you can't just use the data part of the firmware struct in > usb_control_msg context, you have to copy it to a GFP_ATOMIC buffer. Oops!
It's not just the firmware transfer. Most of the other data transfers in the driver you posted were made using buffers allocated on the stack. While this doesn't matter for x86, it does for other architectures (as you've seen). Transfer buffers should always be allocated by kmalloc or the equivalent. You don't have to use GFP_ATOMIC, however (unless you're in an atomic context when calling kmalloc); GFP_KERNEL will be okay too. > After fixing that, I get an interrupt at the point when it is expected. > > You hereby have permission to slap me silly :) I would have mentioned it earlier, but I assumed that you were using x86 and so it wouldn't matter. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&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