2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 01:34:00 +08:00

net/smc: remove obsolete link state DELETING

The connection layer in af_smc.c is now using the new LLC flow
framework, which made the link state DELETING obsolete. Remove the state
and the respective helpers.

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:
Karsten Graul 2020-04-30 15:55:51 +02:00 committed by David S. Miller
parent 42d18acce9
commit 41a211d862
4 changed files with 1 additions and 12 deletions

View File

@ -200,7 +200,6 @@ static int smcr_link_send_delete(struct smc_link *lnk, bool orderly)
{ {
if (lnk->state == SMC_LNK_ACTIVE && if (lnk->state == SMC_LNK_ACTIVE &&
!smc_llc_send_delete_link(lnk, SMC_LLC_REQ, orderly)) { !smc_llc_send_delete_link(lnk, SMC_LLC_REQ, orderly)) {
smc_llc_link_deleting(lnk);
return 0; return 0;
} }
return -ENOTCONN; return -ENOTCONN;
@ -767,8 +766,7 @@ void smc_port_terminate(struct smc_ib_device *smcibdev, u8 ibport)
continue; continue;
/* tbd - terminate only when no more links are active */ /* tbd - terminate only when no more links are active */
for (i = 0; i < SMC_LINKS_PER_LGR_MAX; i++) { for (i = 0; i < SMC_LINKS_PER_LGR_MAX; i++) {
if (!smc_link_usable(&lgr->lnk[i]) || if (!smc_link_usable(&lgr->lnk[i]))
lgr->lnk[i].state == SMC_LNK_DELETING)
continue; continue;
if (lgr->lnk[i].smcibdev == smcibdev && if (lgr->lnk[i].smcibdev == smcibdev &&
lgr->lnk[i].ibport == ibport) { lgr->lnk[i].ibport == ibport) {

View File

@ -36,7 +36,6 @@ enum smc_link_state { /* possible states of a link */
SMC_LNK_INACTIVE, /* link is inactive */ SMC_LNK_INACTIVE, /* link is inactive */
SMC_LNK_ACTIVATING, /* link is being activated */ SMC_LNK_ACTIVATING, /* link is being activated */
SMC_LNK_ACTIVE, /* link is active */ SMC_LNK_ACTIVE, /* link is active */
SMC_LNK_DELETING, /* link is being deleted */
}; };
#define SMC_WR_BUF_SIZE 48 /* size of work request buffer */ #define SMC_WR_BUF_SIZE 48 /* size of work request buffer */

View File

@ -545,7 +545,6 @@ static void smc_llc_rx_delete_link(struct smc_link *link,
struct smc_link_group *lgr = smc_get_lgr(link); struct smc_link_group *lgr = smc_get_lgr(link);
smc_lgr_forget(lgr); smc_lgr_forget(lgr);
smc_llc_link_deleting(link);
if (lgr->role == SMC_SERV) { if (lgr->role == SMC_SERV) {
/* client asks to delete this link, send request */ /* client asks to delete this link, send request */
smc_llc_prep_delete_link(llc, link, SMC_LLC_REQ, true); smc_llc_prep_delete_link(llc, link, SMC_LLC_REQ, true);
@ -878,12 +877,6 @@ void smc_llc_link_active(struct smc_link *link)
} }
} }
void smc_llc_link_deleting(struct smc_link *link)
{
link->state = SMC_LNK_DELETING;
smc_wr_wakeup_tx_wait(link);
}
/* called in worker context */ /* called in worker context */
void smc_llc_link_clear(struct smc_link *link) void smc_llc_link_clear(struct smc_link *link)
{ {

View File

@ -57,7 +57,6 @@ void smc_llc_lgr_init(struct smc_link_group *lgr, struct smc_sock *smc);
void smc_llc_lgr_clear(struct smc_link_group *lgr); void smc_llc_lgr_clear(struct smc_link_group *lgr);
int smc_llc_link_init(struct smc_link *link); int smc_llc_link_init(struct smc_link *link);
void smc_llc_link_active(struct smc_link *link); void smc_llc_link_active(struct smc_link *link);
void smc_llc_link_deleting(struct smc_link *link);
void smc_llc_link_clear(struct smc_link *link); void smc_llc_link_clear(struct smc_link *link);
int smc_llc_do_confirm_rkey(struct smc_link *send_link, int smc_llc_do_confirm_rkey(struct smc_link *send_link,
struct smc_buf_desc *rmb_desc); struct smc_buf_desc *rmb_desc);