diff options
author | Karsten Graul <kgraul@linux.ibm.com> | 2020-04-29 18:10:37 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-29 22:26:32 +0300 |
commit | fdff704dc60418e9a1bac78ae09c857d05c65aa3 (patch) | |
tree | cb062642b536079b4771f8db824cbbf2c9b0d728 /net/smc/smc_ism.c | |
parent | 21615efa6a69891fa287bade979d56dd68b09878 (diff) | |
download | linux-fdff704dc60418e9a1bac78ae09c857d05c65aa3.tar.xz |
net/smc: rework pnet table to support SMC-R failover
The pnet table stored pnet ids in the smc device structures. When a
device is going down its smc device structure is freed, and when the
device is brought online again it no longer has a pnet id set.
Rework the pnet table implementation to store the device name with their
assigned pnet id and apply the pnet id to devices when they are
registered.
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_ism.c')
-rw-r--r-- | net/smc/smc_ism.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c index 5c4727d5066e..32be2da2cb85 100644 --- a/net/smc/smc_ism.c +++ b/net/smc/smc_ism.c @@ -296,7 +296,8 @@ struct smcd_dev *smcd_alloc_dev(struct device *parent, const char *name, device_initialize(&smcd->dev); dev_set_name(&smcd->dev, name); smcd->ops = ops; - smc_pnetid_by_dev_port(parent, 0, smcd->pnetid); + if (smc_pnetid_by_dev_port(parent, 0, smcd->pnetid)) + smc_pnetid_by_table_smcd(smcd); spin_lock_init(&smcd->lock); spin_lock_init(&smcd->lgr_lock); |