diff options
author | Karsten Graul <kgraul@linux.ibm.com> | 2018-07-25 16:35:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-26 07:25:53 +0200 |
commit | 0d18a0cb4b1585d9e5a3b300d5df9ed866561ffb (patch) | |
tree | 1c854a0d55d1e3636aa7f75674712c233eabb36c /net/smc/smc_wr.c | |
parent | net/smc: provide fallback reason code (diff) | |
download | linux-0d18a0cb4b1585d9e5a3b300d5df9ed866561ffb.tar.xz linux-0d18a0cb4b1585d9e5a3b300d5df9ed866561ffb.zip |
net/smc: improve delete link processing
Send an orderly DELETE LINK request before termination of a link group,
add support for client triggered DELETE LINK processing. And send a
disorderly DELETE LINK before module is unloaded.
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_wr.c')
-rw-r--r-- | net/smc/smc_wr.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c index b6df69756bef..f856b8402b3f 100644 --- a/net/smc/smc_wr.c +++ b/net/smc/smc_wr.c @@ -182,17 +182,14 @@ int smc_wr_tx_get_free_slot(struct smc_link *link, if (rc) return rc; } else { - struct smc_link_group *lgr; - - lgr = smc_get_lgr(link); rc = wait_event_timeout( link->wr_tx_wait, - list_empty(&lgr->list) || /* lgr terminated */ + link->state == SMC_LNK_INACTIVE || (smc_wr_tx_get_free_slot_index(link, &idx) != -EBUSY), SMC_WR_TX_WAIT_FREE_SLOT_TIME); if (!rc) { /* timeout - terminate connections */ - smc_lgr_terminate(lgr); + smc_lgr_terminate(smc_get_lgr(link)); return -EPIPE; } if (idx == link->wr_tx_cnt) |