aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/typhoon.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-12-21 01:21:03 -0500
committerJeff Garzik <jeff@garzik.org>2007-12-22 22:53:06 -0500
commit8cc085c7aceb78d26d0a5355e111b2330f089161 (patch)
tree3754b076639725dbb1d324d74d155f091b3f889d /drivers/net/typhoon.c
parent8a5ed9efe661dd42bc140e522c2635e0d7b26141 (diff)
typhoon: memory corruptor on big-endian if TSO is enabled
txlo_dma_addr should be host-endian; we pass it to typhoon_tso_fill(), which does arithmetics on it, converts to l-e and passes it to card. Unfortunately, we forgot le32_to_cpu() when initializing it from face->txLoAddr, which sits in shared memory and is little-endian. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/typhoon.c')
-rw-r--r--drivers/net/typhoon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 501abe379047..2550d4cf9609 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -1320,7 +1320,7 @@ typhoon_init_interface(struct typhoon *tp)
1320 tp->txLoRing.writeRegister = TYPHOON_REG_TX_LO_READY; 1320 tp->txLoRing.writeRegister = TYPHOON_REG_TX_LO_READY;
1321 tp->txHiRing.writeRegister = TYPHOON_REG_TX_HI_READY; 1321 tp->txHiRing.writeRegister = TYPHOON_REG_TX_HI_READY;
1322 1322
1323 tp->txlo_dma_addr = iface->txLoAddr; 1323 tp->txlo_dma_addr = le32_to_cpu(iface->txLoAddr);
1324 tp->card_state = Sleeping; 1324 tp->card_state = Sleeping;
1325 smp_wmb(); 1325 smp_wmb();
1326 1326