cxgb3: fix workqueue flush issues
authorDivy Le Ray <divy@chelsio.com>
Fri, 17 Apr 2009 12:21:17 +0000 (12:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Apr 2009 09:07:24 +0000 (02:07 -0700)
commitc80b0c28caed5cd9165caab6295ed86b4e9fc327
treeb0c9980129bc5464461a1f1d0c1332d51d1050a3
parent3851c66cf0d130ae49f99fe1dea42950d9835037
cxgb3: fix workqueue flush issues

The fatal error task can be scheduled while processing an offload packet
in NAPI context when the connection handle is bogus. this can race
with the ports being brought down and the cxgb3 workqueue being flushed.
Stop napi processing before flushing the work queue.

The ULP drivers (iSCSI, iWARP) might also schedule a task on keventd_wk
while releasing a connection handle (cxgb3_offload.c::cxgb3_queue_tid_release()).
The driver however does not flush any work on keventd_wq while being unloaded.
This patch also fixes this.

Also call cancel_delayed_work_sync in place of the the deprecated
cancel_rearming_delayed_workqueue.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cxgb3/cxgb3_main.c