diff options
author | Vladislav Zolotarov <vladz@broadcom.com> | 2011-07-19 01:45:02 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-19 09:57:49 -0700 |
commit | 53e51e2f480aaa000b0a7d2704ce2b4b646a73c7 (patch) | |
tree | 24b372ced7a414d4f72aa431517c96e2d90df419 /drivers/net/bnx2x/bnx2x_main.c | |
parent | f5219d8eb8b32eb32522063d2163f95e1cf7bb5c (diff) | |
download | blackbird-op-linux-53e51e2f480aaa000b0a7d2704ce2b4b646a73c7.tar.gz blackbird-op-linux-53e51e2f480aaa000b0a7d2704ce2b4b646a73c7.zip |
bnx2x: fix memory barriers
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_main.c')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 7a891824fab2..e4dea114d04a 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c @@ -2984,8 +2984,12 @@ static inline void bnx2x_sp_prod_update(struct bnx2x *bp) { int func = BP_FUNC(bp); - /* Make sure that BD data is updated before writing the producer */ - wmb(); + /* + * Make sure that BD data is updated before writing the producer: + * BD data is written to the memory, the producer is read from the + * memory, thus we need a full memory barrier to ensure the ordering. + */ + mb(); REG_WR16(bp, BAR_XSTRORM_INTMEM + XSTORM_SPQ_PROD_OFFSET(func), bp->spq_prod_idx); |