[parisc-linux] IBM TR patch

Randolph Chung Randolph Chung <randolph@tausq.org>
Tue, 15 Jan 2002 17:23:43 -0800


> I think the driver was correct. The i/o layer should not try to byteswap
> the io requests, because it can not second-guess what the driver is doing.

For reference, you may wish to read
http://lists.parisc-linux.org/pipermail/parisc-linux/2001-November/014606.html

Originally the parisc {read,write}[wl] macros did not swap, but this
breaks many PCI drivers. For example, we used to have hppa specific code in the
sym53c8xx driver that did the swapping....

> And in the case of the tr driver it now does two swaps for each word it tranfers on
> big endian platforms instad of zero.


I agree this is not optimal, altho, as Alan Cox pointed out in
http://lists.parisc-linux.org/pipermail/parisc-linux/2001-November/014527.html
double swaps may be optimized out by the compiler.
> 
> The ne2000 driver had the same problem, but I removed the swaps from the parisc i/o code 
> instad of touching the driver.

for parisc we follow the ppc convention of defining __raw_{read,write}[wl]
that are host-endian. perhaps the drivers can use this instead?

randolph
-- 
   @..@                                         http://www.TauSq.org/
  (----)
 ( >__< )
 ^^ ~~ ^^