On Thu, Aug 09, 2007 at 06:53:10PM +0100, Alan Cox wrote: > > Or perhaps you got the wrong device here? For ISA devices we > > traditionally used NULL. Or if you set up your own ISA devices > > (which I can't see a reason for but there might be one I'm missing) > > at least give them a dma mask. Then it should probably work on x86-64. > > The libata code currently (and this seems to work for all but x86-64) > does the following if it is setting up a potentially DMA capable device Where does the device come from? What device is it? Is that known already? > Thus I think dma_alloc_coherent() for an ISA, PCMCIA or other class > (platform particularly) shouldn't explode on AMD64 but simply return > NULL. Its a sane request to make when you don't in your library know what > dev is. But at least on x86-64 the device is likely DMA capable. At least PCMCIA usually is. Near all devices are DMA capable, except perhaps SMBus and some real oddballs. So the device should not have a NULL dma_mask in the first place. Or it is the wrong device. e.g. we have platform devices for things like timers etc. which are really not DMA capable because it doesn't make much sense to DMA your timer; but there should be really no reason to use such a device in a libata driver. If it's some kind of PCMCIA device like implied by pata_pcmcia then it's likely DMA capable. So if I return NULL then either a really DMA capable device will not work. Or you got a real oddball device that you shouldn't have gotten in the first place. Perhaps the PCMCIA code sets up some of its devices wrong? -Andi - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html