Atsushi Nemoto wrote: > Can anybody explain me a PCI driver's policy of endianness? It depens on device and board. Most drivers assume PCI is little-endian, but rely on outl implementation in byte swapping policy. > Should we use cpu_to_le32 with outl/writel? If you can't instruct hw to perform byte-swapping for PCI IO, you have to add cpu_to_le32, it's clear. For writel, i.e. PCI MEM the situation is a bit subtle. The problem is your videocard, that may or may not support byte swapping. So, in order to suport videocards that aren't able to swap bytes, you have to setup PCI MEM in big-endian mode. Look, for example, at the tulip driver, it swaps bytes for DMA and doesn't do it for register access. > Should we use cpu_to_le32 to write 32bit data to DMA area? DMA data is stream of bytes. I would treat a device/board as broken, if it would need byte swapping for DMA data. Regards, Gleb.