diff options
author | James Smart <jsmart2021@gmail.com> | 2017-05-15 20:10:15 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-05-22 14:55:29 -0400 |
commit | 0ce872bf8b5c4d425a41940a523ff1b8daa0b275 (patch) | |
tree | e8a14b697c11c46c9511dcd3f5b49acc6fd46523 | |
parent | 7254a50a5db40ca6739ddf37e0a45e6912532b2c (diff) |
nvme_fc: get rid of local reconnect_delay
Remove the local copy of reconnect_delay.
Use the value in the controller options directly.
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/nvme/host/fc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index dca7165fabcf..c3ab1043efbd 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c | |||
@@ -165,7 +165,6 @@ struct nvme_fc_ctrl { | |||
165 | struct work_struct delete_work; | 165 | struct work_struct delete_work; |
166 | struct work_struct reset_work; | 166 | struct work_struct reset_work; |
167 | struct delayed_work connect_work; | 167 | struct delayed_work connect_work; |
168 | int reconnect_delay; | ||
169 | int connect_attempts; | 168 | int connect_attempts; |
170 | 169 | ||
171 | struct kref ref; | 170 | struct kref ref; |
@@ -2615,9 +2614,9 @@ nvme_fc_reset_ctrl_work(struct work_struct *work) | |||
2615 | 2614 | ||
2616 | dev_warn(ctrl->ctrl.device, | 2615 | dev_warn(ctrl->ctrl.device, |
2617 | "NVME-FC{%d}: Reconnect attempt in %d seconds.\n", | 2616 | "NVME-FC{%d}: Reconnect attempt in %d seconds.\n", |
2618 | ctrl->cnum, ctrl->reconnect_delay); | 2617 | ctrl->cnum, ctrl->ctrl.opts->reconnect_delay); |
2619 | queue_delayed_work(nvme_fc_wq, &ctrl->connect_work, | 2618 | queue_delayed_work(nvme_fc_wq, &ctrl->connect_work, |
2620 | ctrl->reconnect_delay * HZ); | 2619 | ctrl->ctrl.opts->reconnect_delay * HZ); |
2621 | } else | 2620 | } else |
2622 | dev_info(ctrl->ctrl.device, | 2621 | dev_info(ctrl->ctrl.device, |
2623 | "NVME-FC{%d}: controller reset complete\n", ctrl->cnum); | 2622 | "NVME-FC{%d}: controller reset complete\n", ctrl->cnum); |
@@ -2695,9 +2694,9 @@ nvme_fc_connect_ctrl_work(struct work_struct *work) | |||
2695 | 2694 | ||
2696 | dev_warn(ctrl->ctrl.device, | 2695 | dev_warn(ctrl->ctrl.device, |
2697 | "NVME-FC{%d}: Reconnect attempt in %d seconds.\n", | 2696 | "NVME-FC{%d}: Reconnect attempt in %d seconds.\n", |
2698 | ctrl->cnum, ctrl->reconnect_delay); | 2697 | ctrl->cnum, ctrl->ctrl.opts->reconnect_delay); |
2699 | queue_delayed_work(nvme_fc_wq, &ctrl->connect_work, | 2698 | queue_delayed_work(nvme_fc_wq, &ctrl->connect_work, |
2700 | ctrl->reconnect_delay * HZ); | 2699 | ctrl->ctrl.opts->reconnect_delay * HZ); |
2701 | } else | 2700 | } else |
2702 | dev_info(ctrl->ctrl.device, | 2701 | dev_info(ctrl->ctrl.device, |
2703 | "NVME-FC{%d}: controller reconnect complete\n", | 2702 | "NVME-FC{%d}: controller reconnect complete\n", |
@@ -2755,7 +2754,6 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts, | |||
2755 | INIT_WORK(&ctrl->delete_work, nvme_fc_delete_ctrl_work); | 2754 | INIT_WORK(&ctrl->delete_work, nvme_fc_delete_ctrl_work); |
2756 | INIT_WORK(&ctrl->reset_work, nvme_fc_reset_ctrl_work); | 2755 | INIT_WORK(&ctrl->reset_work, nvme_fc_reset_ctrl_work); |
2757 | INIT_DELAYED_WORK(&ctrl->connect_work, nvme_fc_connect_ctrl_work); | 2756 | INIT_DELAYED_WORK(&ctrl->connect_work, nvme_fc_connect_ctrl_work); |
2758 | ctrl->reconnect_delay = opts->reconnect_delay; | ||
2759 | spin_lock_init(&ctrl->lock); | 2757 | spin_lock_init(&ctrl->lock); |
2760 | 2758 | ||
2761 | /* io queue count */ | 2759 | /* io queue count */ |