diff options
author | David Dillow <dave@thedillows.org> | 2010-03-04 04:37:16 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-05 14:00:18 -0800 |
commit | 5fe88eae26dbd24eed73eb0b681e13981fd486b3 (patch) | |
tree | ea9c3175edbed98f6cbce7a680eb451f7872633b /drivers/net | |
parent | d17792ebdf90289c9fd1bce888076d3d60ecd53b (diff) |
typhoon: fix incorrect use of smp_wmb()
The typhoon driver was incorrectly using smp_wmb() to order memory
accesses against IO to the NIC in a few instances. Use wmb() instead,
which is required to actually order between memory types.
Signed-off-by: David Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/typhoon.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index e3ddcb8f29d..1cf012d3e07 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c @@ -480,7 +480,7 @@ typhoon_hello(struct typhoon *tp) typhoon_inc_cmd_index(&ring->lastWrite, 1); INIT_COMMAND_NO_RESPONSE(cmd, TYPHOON_CMD_HELLO_RESP); - smp_wmb(); + wmb(); iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); spin_unlock(&tp->command_lock); } @@ -1311,13 +1311,15 @@ typhoon_init_interface(struct typhoon *tp) tp->txlo_dma_addr = le32_to_cpu(iface->txLoAddr); tp->card_state = Sleeping; - smp_wmb(); tp->offload = TYPHOON_OFFLOAD_IP_CHKSUM | TYPHOON_OFFLOAD_TCP_CHKSUM; tp->offload |= TYPHOON_OFFLOAD_UDP_CHKSUM | TSO_OFFLOAD_ON; spin_lock_init(&tp->command_lock); spin_lock_init(&tp->state_lock); + + /* Force the writes to the shared memory area out before continuing. */ + wmb(); } static void |