summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2018-03-05 20:55:49 -0800
committerJens Axboe <axboe@kernel.dk>2018-03-26 08:53:43 -0600
commit0cdd5fca876b1e9c56ca01186ba650b680248b35 (patch)
tree187650f01447c052f2ad936b7ecee58ae97cb7b4
parentb12740d316fa89f3f6191b71f986cf3b9383d379 (diff)
downloadop-kernel-dev-0cdd5fca876b1e9c56ca01186ba650b680248b35.zip
op-kernel-dev-0cdd5fca876b1e9c56ca01186ba650b680248b35.tar.gz
nvme_fc: on remoteport reuse, set new nport_id and role.
When reattaching to a removed remoteport that has not yet been fully deleted as it's waiting for reconnect timeouts, be sure to re-set the ports nport id and role. Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--drivers/nvme/host/fc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 49e2ef2..0676d44 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -588,6 +588,8 @@ nvme_fc_attach_to_suspended_rport(struct nvme_fc_lport *lport,
return ERR_PTR(-ESTALE);
}
+ rport->remoteport.port_role = pinfo->port_role;
+ rport->remoteport.port_id = pinfo->port_id;
rport->remoteport.port_state = FC_OBJSTATE_ONLINE;
rport->dev_loss_end = 0;
OpenPOWER on IntegriCloud