]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: core: Fix race condition in __mlxsw_emad_transmit
authorIdo Schimmel <idosch@mellanox.com>
Thu, 15 Oct 2015 06:21:55 +0000 (08:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Oct 2015 13:03:06 +0000 (06:03 -0700)
commitf2a9fc86dcc1bc7a9ef32bcd2feb9d3dd288ed6f
tree0c1e0f86f002f0f332bea9e4532804f98a673c8b
parent5a8e34b83b30756d503a695863e1e15ba0b07f77
mlxsw: core: Fix race condition in __mlxsw_emad_transmit

Under certain conditions EMAD responses can be returned from the device
even before setting trans_active. This will cause the EMAD Rx listener
to drop the EMAD response - as there are no active transactions - and
timeouts will be generated.

Fix this by setting trans_active before transmitting the EMAD skb.

Fixes: 27ae48ae117a ("mlxsw: Add interface to access registers and process events")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c