diff options
author | Michael Chan <michael.chan@broadcom.com> | 2017-01-25 07:55:07 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-17 04:41:55 (GMT) |
commit | 710ea9b028de2c5cd0565407d31b633972074182 (patch) | |
tree | 06e22c171085332269d42df24ac067122c71bf21 /.gitignore | |
parent | cb7188295d18dcfbca1586d176f88113e2eae7f5 (diff) | |
download | linux-710ea9b028de2c5cd0565407d31b633972074182.tar.xz |
bnxt_en: Fix bnxt_reset() in the slow path task.
[ Upstream commit a551ee94ea723b4af9b827c7460f108bc13425ee ]
In bnxt_sp_task(), we set a bit BNXT_STATE_IN_SP_TASK so that bnxt_close()
will synchronize and wait for bnxt_sp_task() to finish. Some functions
in bnxt_sp_task() require us to clear BNXT_STATE_IN_SP_TASK and then
acquire rtnl_lock() to prevent race conditions.
There are some bugs related to this logic. This patch refactors the code
to have common bnxt_rtnl_lock_sp() and bnxt_rtnl_unlock_sp() to handle
the RTNL and the clearing/setting of the bit. Multiple functions will
need the same logic. We also need to move bnxt_reset() to the end of
bnxt_sp_task(). Functions that clear BNXT_STATE_IN_SP_TASK must be the
last functions to be called in bnxt_sp_task(). The common scheme will
handle the condition properly.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions