diff options
author | Michael Chan <michael.chan@broadcom.com> | 2017-01-25 02:55:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-25 13:27:12 -0500 |
commit | a551ee94ea723b4af9b827c7460f108bc13425ee (patch) | |
tree | 40f3b1b0e736e0ab695294cf8ae9d3c1fe8722ad /include/uapi | |
parent | 56d806222ace4c3aeae516cd7a855340fb2839d8 (diff) |
bnxt_en: Fix bnxt_reset() in the slow path task.
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>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions