Skip to content

Commit

Permalink
typhoon: memory corruptor on big-endian if TSO is enabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro authored and Jeff Garzik committed Dec 23, 2007
1 parent 8a5ed9e commit 8cc085c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/typhoon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 8cc085c

Please sign in to comment.