bnxt_en: Don't cancel sp_task from bnxt_close_nic().
authorMichael Chan <mchan@broadcom.com>
Thu, 10 Dec 2015 00:35:43 +0000 (19:35 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Dec 2015 04:34:06 +0000 (23:34 -0500)
commit4cebdcec0933bf39c0ab42e8ce8c9d72f803fbe9
treeb80eaa62f21b2f8a804475d79092930af02ee4f2
parentcaefe526d7b5af11d9b5977b2862eb144fa45537
bnxt_en: Don't cancel sp_task from bnxt_close_nic().

When implementing driver reset from tx_timeout in the next patch,
bnxt_close_nic() will be called from the sp_task workqueue.  Calling
cancel_work() on sp_task will hang the workqueue.

Instead, set a new bit BNXT_STATE_IN_SP_TASK when bnxt_sp_task() is running.
bnxt_close_nic() will wait for BNXT_STATE_IN_SP_TASK to clear before
proceeding.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h