Hi Paul, On Wed, May 08, 2013 at 10:46:29PM +0200, Matthijs Kooijman wrote: > Paul wrote: > > Hmm. Is it kosher to override these in a driver and force DMA to be > > enabled? > > Apparently, since a lot of drivers do it like this. This particular code > was taken from the ehci-platform driver. See also: > > http://thread.gmane.org/gmane.linux.usb.general/86066 > > The discussion in that thread suggests that even though this is not > quite the optimal way to do this, it is the accepted way for now and > changing it needs a bit more complicated changes and more discussion, > apparently. > > > What if it has been disabled earlier on purpose, say because the > > platform does not have DMA support? You say "This still allows any > > platform code to set any more specific mask if needed", but how would > > that be done exactly? > Platform code could go over the list of platform devices and (based on the > device-tree compatible value, for example) change the mask of a device. > Admittedly, this could set a more specific mask, but not exactly disable > dma entirely. I guess this is not a usecase for the other drivers? > > For the dwc2 driver, I guess the dwc2 hardware would not have dma > enabled if the system does not support it anyway? > > Note that this code only runs for platform devices, so not for pci > devices, which can disable dma by not setting a dma_mask when combined > with the next patch. Does this satisfy your doubts, or do you think further changes are needed to this series of patches? Gr. Matthijs -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html