projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05e4ecd
)
net/mlx5_core: Avoid usage command work entry after writing command doorbell
author
Ira Gusinsky
<
[email protected]
>
Thu, 2 Apr 2015 14:07:27 +0000
(17:07 +0300)
committer
David S. Miller
<
[email protected]
>
Thu, 2 Apr 2015 20:33:41 +0000
(16:33 -0400)
Avoid usage of command work entry in cmd_work_handler since it can be released
by mlx5_cmd_invoke before the work handler returns to running.
Signed-off-by: Ira Gusinsky <
[email protected]
>
Signed-off-by: Saeed Mahameed <
[email protected]
>
Signed-off-by: Eli Cohen <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index 290ae87fdef7823e9884606a68680f0aa05a3db6..0d862696b8769843ec2ca369afe1103a297349ad 100644
(file)
--- a/
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@
-515,10
+515,11
@@
static void cmd_work_handler(struct work_struct *work)
ent->ts1 = ktime_get_ns();
/* ring doorbell after the descriptor is valid */
+ mlx5_core_dbg(dev, "writing 0x%x to command doorbell\n", 1 << ent->idx);
wmb();
iowrite32be(1 << ent->idx, &dev->iseg->cmd_dbell);
- mlx5_core_dbg(dev, "write 0x%x to command doorbell\n", 1 << ent->idx);
mmiowb();
+ /* if not in polling don't use ent after this point */
if (cmd->mode == CMD_MODE_POLLING) {
poll_timeout(ent);
/* make sure we read the descriptor after ownership is SW */