hamachi endianness fixes
authorAl Viro <viro@ftp.linux.org.uk>
Mon, 10 Dec 2007 18:39:29 +0000 (18:39 +0000)
committerJeff Garzik <jeff@garzik.org>
Fri, 14 Dec 2007 20:26:15 +0000 (15:26 -0500)
commit8e9859184031ac1b0a0234b8671a90cfcd333666
treeaf153b9b74f3833b01175504b8359063bfe24d5f
parent8543da6672b0994921f014f2250e27ae81645580
hamachi endianness fixes

badly broken on big-endian

* passing little-endian to pci_unmap_single() et.al.
* cpu_to_le32() before passing value to writel()
* worse, cpu_to_le64() and shifting/masking result before the same
*  hmp->tx_ring[i].status_n_length = cpu_to_le32(
DescEndRing |
(hmp->tx_ring[i].status_n_length & 0x0000FFFF));
  is obviously bogus on big-endian.  Not hard to untangle, fortunately...
* poisoning addresses in rx_ring is better done after we'd done
pci_unmap_single() on them, not before that.  [this one affects little-endian
as well, obviously, provided that pci_unmap_single() is not a no-op on target
in question]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/hamachi.c