net/smc: simplify link deactivation
Cancel the testlink worker during link clear processing and remove the extra function smc_llc_link_inactive(). Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Reviewed-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
1020e1ef53
commit
2140ac26f8
@@ -660,22 +660,15 @@ void smc_llc_link_deleting(struct smc_link *link)
|
||||
smc_wr_wakeup_tx_wait(link);
|
||||
}
|
||||
|
||||
/* called in tasklet context */
|
||||
void smc_llc_link_inactive(struct smc_link *link)
|
||||
{
|
||||
if (link->state == SMC_LNK_INACTIVE)
|
||||
return;
|
||||
link->state = SMC_LNK_INACTIVE;
|
||||
cancel_delayed_work_sync(&link->llc_testlink_wrk);
|
||||
smc_wr_wakeup_reg_wait(link);
|
||||
smc_wr_wakeup_tx_wait(link);
|
||||
}
|
||||
|
||||
/* called in worker context */
|
||||
void smc_llc_link_clear(struct smc_link *link)
|
||||
{
|
||||
flush_workqueue(link->llc_wq);
|
||||
destroy_workqueue(link->llc_wq);
|
||||
complete(&link->llc_testlink_resp);
|
||||
cancel_delayed_work_sync(&link->llc_testlink_wrk);
|
||||
smc_wr_wakeup_reg_wait(link);
|
||||
smc_wr_wakeup_tx_wait(link);
|
||||
}
|
||||
|
||||
/* register a new rtoken at the remote peer */
|
||||
|
Reference in New Issue
Block a user