On Wed, Mar 21, 2012 at 03:33:14PM +0000, Martyn Welch wrote: > The DMA functionality fails to work on Intel based platforms. There are > two reasons for this: > > 1) Some recent Intel platforms have an IOMMU. Transferring the DMA > descriptors, which were mapped using virt_to_phys(), failed. This > patch updates the driver to use dma_map_single(). > > 2) The DMA copies the link list descriptors from memory into big endian > registers. On little endian systems this results in the values being > byte swapped. This patch uses standard kernel functionality to ensure > that the descriptors are stored in big endian format. > In some ways, I can see why you did this as one patch because it makes it work on one system. But could you send it as two patches? The endian fixes are incomplete and buggy. I could point the problems, but it's probably easier if you just run Sparse yourself. It's really easy. http://lwn.net/Articles/205624/ Mostly it's just a matter of changing u32 declarations to __be32 but there are places like this as well where we try doing bitwise OR big endian data like this: > - entry->descriptor.dsat |= TSI148_LCSR_DSAT_PSZ; > + entry->descriptor.dsat |= > + cpu_to_be32(TSI148_LCSR_DSAT_PSZ); regards, dan carpenter
Attachment:
signature.asc
Description: Digital signature
_______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel