net/smc: move link group list to smc_core
This patch moves the global link group list to smc_core where the link group functions are. To make this work, it moves code in af_smc and smc_ib that operates on the link group list to smc_core as well. While at it, the link group counter is integrated into the list structure and initialized to zero. Signed-off-by: Hans Wippel <hwippel@linux.ibm.com> Signed-off-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
69cb7dc021
commit
9fda3510ab
@@ -143,17 +143,6 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void smc_ib_port_terminate(struct smc_ib_device *smcibdev, u8 ibport)
|
||||
{
|
||||
struct smc_link_group *lgr, *l;
|
||||
|
||||
list_for_each_entry_safe(lgr, l, &smc_lgr_list.list, list) {
|
||||
if (lgr->lnk[SMC_SINGLE_LINK].smcibdev == smcibdev &&
|
||||
lgr->lnk[SMC_SINGLE_LINK].ibport == ibport)
|
||||
smc_lgr_terminate(lgr);
|
||||
}
|
||||
}
|
||||
|
||||
/* process context wrapper for might_sleep smc_ib_remember_port_attr */
|
||||
static void smc_ib_port_event_work(struct work_struct *work)
|
||||
{
|
||||
@@ -165,7 +154,7 @@ static void smc_ib_port_event_work(struct work_struct *work)
|
||||
smc_ib_remember_port_attr(smcibdev, port_idx + 1);
|
||||
clear_bit(port_idx, &smcibdev->port_event_mask);
|
||||
if (!smc_ib_port_active(smcibdev, port_idx + 1))
|
||||
smc_ib_port_terminate(smcibdev, port_idx + 1);
|
||||
smc_port_terminate(smcibdev, port_idx + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user