diff options
author | Karsten Graul <kgraul@linux.ibm.com> | 2020-05-04 15:18:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-04 20:54:39 +0300 |
commit | f3811fd7bc97587b142fed9edf8c726694220cb2 (patch) | |
tree | da435e2555c6b44096b06edf5cd00c73e72e83c5 /net/smc/smc_core.c | |
parent | 09c61d24f96dfef7791debfcaf96efe067ab2ba8 (diff) | |
download | linux-f3811fd7bc97587b142fed9edf8c726694220cb2.tar.xz |
net/smc: send DELETE_LINK, ALL message and wait for send to complete
Add smc_llc_send_message_wait() which uses smc_wr_tx_send_wait() to send
an LLC message and waits for the message send to complete.
smc_llc_send_link_delete_all() calls the new function to send an
DELETE_LINK,ALL LLC message. The RFC states that the sender of this type
of message needs to wait for the completion event of the message
transmission and can terminate the link afterwards.
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>
Diffstat (limited to 'net/smc/smc_core.c')
-rw-r--r-- | net/smc/smc_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index b5633fa19b6d..8f630b76c5a4 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -238,6 +238,9 @@ static void smc_lgr_free_work(struct work_struct *work) spin_unlock_bh(lgr_lock); cancel_delayed_work(&lgr->free_work); + if (!lgr->is_smcd && !lgr->terminating) + smc_llc_send_link_delete_all(lgr, true, + SMC_LLC_DEL_PROG_INIT_TERM); if (lgr->is_smcd && !lgr->terminating) smc_ism_signal_shutdown(lgr); if (!lgr->is_smcd) { @@ -847,6 +850,8 @@ static void smc_lgr_cleanup(struct smc_link_group *lgr) smc_ism_put_vlan(lgr->smcd, lgr->vlan_id); put_device(&lgr->smcd->dev); } else { + smc_llc_send_link_delete_all(lgr, false, + SMC_LLC_DEL_OP_INIT_TERM); for (i = 0; i < SMC_LINKS_PER_LGR_MAX; i++) { struct smc_link *lnk = &lgr->lnk[i]; |