From 8cc085c7aceb78d26d0a5355e111b2330f089161 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 21 Dec 2007 06:21:03 +0000 Subject: 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 Signed-off-by: Jeff Garzik --- drivers/net/typhoon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index 501abe37904..2550d4cf960 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c @@ -1320,7 +1320,7 @@ typhoon_init_interface(struct typhoon *tp) tp->txLoRing.writeRegister = TYPHOON_REG_TX_LO_READY; tp->txHiRing.writeRegister = TYPHOON_REG_TX_HI_READY; - tp->txlo_dma_addr = iface->txLoAddr; + tp->txlo_dma_addr = le32_to_cpu(iface->txLoAddr); tp->card_state = Sleeping; smp_wmb(); -- cgit v1.2.3