diff options
author | James Smart <jsmart2021@gmail.com> | 2019-09-27 14:27:22 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-04 10:56:40 -0700 |
commit | bcde5f0fc7d318c98d4234b52bcc1a87fc2162d9 (patch) | |
tree | 23c5ef1292a4c87c68f60db746a0a2ae2ac1aea1 /drivers/nvme | |
parent | 7db394848ece0e0706dfe8e4940b24e949f3b88f (diff) |
nvme-fc: ensure association_id is cleared regardless of a Disconnect LS
Code today only clears the association_id if a Disconnect LS is transmit.
Remove ambiguity and unconditionally clear the association_id if the
association has been terminated.
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/fc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index 2284b7f9e8b9..714a1c3aa0c5 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -1462,9 +1462,6 @@ nvme_fc_xmt_disconnect_assoc(struct nvme_fc_ctrl *ctrl) nvme_fc_disconnect_assoc_done); if (ret) kfree(lsop); - - /* only meaningful part to terminating the association */ - ctrl->association_id = 0; } @@ -2743,6 +2740,7 @@ out_term_aen_ops: out_disconnect_admin_queue: /* send a Disconnect(association) LS to fc-nvme target */ nvme_fc_xmt_disconnect_assoc(ctrl); + ctrl->association_id = 0; out_delete_hw_queue: __nvme_fc_delete_hw_queue(ctrl, &ctrl->queues[0], 0); out_free_queue: @@ -2834,6 +2832,8 @@ nvme_fc_delete_association(struct nvme_fc_ctrl *ctrl) if (ctrl->association_id) nvme_fc_xmt_disconnect_assoc(ctrl); + ctrl->association_id = 0; + if (ctrl->ctrl.tagset) { nvme_fc_delete_hw_io_queues(ctrl); nvme_fc_free_io_queues(ctrl); |