diff options
| -rw-r--r-- | drivers/nvme/host/core.c | 79 | ||||
| -rw-r--r-- | drivers/nvme/host/fabrics.c | 4 | ||||
| -rw-r--r-- | drivers/nvme/host/fc.c | 14 | ||||
| -rw-r--r-- | drivers/nvme/host/multipath.c | 2 | ||||
| -rw-r--r-- | drivers/nvme/host/pci.c | 4 | ||||
| -rw-r--r-- | drivers/nvme/host/rdma.c | 34 | ||||
| -rw-r--r-- | drivers/nvme/host/trace.h | 1 | ||||
| -rw-r--r-- | include/linux/nvme.h | 4 |
8 files changed, 64 insertions, 78 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index cd16d98d1f1a..d7de0642c832 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c | |||
| @@ -1257,10 +1257,9 @@ static u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns, | |||
| 1257 | return 0; | 1257 | return 0; |
| 1258 | } | 1258 | } |
| 1259 | 1259 | ||
| 1260 | effects |= nvme_known_admin_effects(opcode); | ||
| 1260 | if (ctrl->effects) | 1261 | if (ctrl->effects) |
| 1261 | effects = le32_to_cpu(ctrl->effects->acs[opcode]); | 1262 | effects = le32_to_cpu(ctrl->effects->acs[opcode]); |
| 1262 | else | ||
| 1263 | effects = nvme_known_admin_effects(opcode); | ||
| 1264 | 1263 | ||
| 1265 | /* | 1264 | /* |
| 1266 | * For simplicity, IO to all namespaces is quiesced even if the command | 1265 | * For simplicity, IO to all namespaces is quiesced even if the command |
| @@ -2342,20 +2341,35 @@ static const struct attribute_group *nvme_subsys_attrs_groups[] = { | |||
| 2342 | NULL, | 2341 | NULL, |
| 2343 | }; | 2342 | }; |
| 2344 | 2343 | ||
| 2345 | static int nvme_active_ctrls(struct nvme_subsystem *subsys) | 2344 | static bool nvme_validate_cntlid(struct nvme_subsystem *subsys, |
| 2345 | struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) | ||
| 2346 | { | 2346 | { |
| 2347 | int count = 0; | 2347 | struct nvme_ctrl *tmp; |
| 2348 | struct nvme_ctrl *ctrl; | 2348 | |
| 2349 | lockdep_assert_held(&nvme_subsystems_lock); | ||
| 2350 | |||
| 2351 | list_for_each_entry(tmp, &subsys->ctrls, subsys_entry) { | ||
| 2352 | if (ctrl->state == NVME_CTRL_DELETING || | ||
| 2353 | ctrl->state == NVME_CTRL_DEAD) | ||
| 2354 | continue; | ||
| 2355 | |||
| 2356 | if (tmp->cntlid == ctrl->cntlid) { | ||
| 2357 | dev_err(ctrl->device, | ||
| 2358 | "Duplicate cntlid %u with %s, rejecting\n", | ||
| 2359 | ctrl->cntlid, dev_name(tmp->device)); | ||
| 2360 | return false; | ||
| 2361 | } | ||
| 2349 | 2362 | ||
| 2350 | mutex_lock(&subsys->lock); | 2363 | if ((id->cmic & (1 << 1)) || |
| 2351 | list_for_each_entry(ctrl, &subsys->ctrls, subsys_entry) { | 2364 | (ctrl->opts && ctrl->opts->discovery_nqn)) |
| 2352 | if (ctrl->state != NVME_CTRL_DELETING && | 2365 | continue; |
| 2353 | ctrl->state != NVME_CTRL_DEAD) | 2366 | |
| 2354 | count++; | 2367 | dev_err(ctrl->device, |
| 2368 | "Subsystem does not support multiple controllers\n"); | ||
| 2369 | return false; | ||
| 2355 | } | 2370 | } |
| 2356 | mutex_unlock(&subsys->lock); | ||
| 2357 | 2371 | ||
| 2358 | return count; | 2372 | return true; |
| 2359 | } | 2373 | } |
| 2360 | 2374 | ||
| 2361 | static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) | 2375 | static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) |
| @@ -2395,22 +2409,13 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) | |||
| 2395 | mutex_lock(&nvme_subsystems_lock); | 2409 | mutex_lock(&nvme_subsystems_lock); |
| 2396 | found = __nvme_find_get_subsystem(subsys->subnqn); | 2410 | found = __nvme_find_get_subsystem(subsys->subnqn); |
| 2397 | if (found) { | 2411 | if (found) { |
| 2398 | /* | ||
| 2399 | * Verify that the subsystem actually supports multiple | ||
| 2400 | * controllers, else bail out. | ||
| 2401 | */ | ||
| 2402 | if (!(ctrl->opts && ctrl->opts->discovery_nqn) && | ||
| 2403 | nvme_active_ctrls(found) && !(id->cmic & (1 << 1))) { | ||
| 2404 | dev_err(ctrl->device, | ||
| 2405 | "ignoring ctrl due to duplicate subnqn (%s).\n", | ||
| 2406 | found->subnqn); | ||
| 2407 | nvme_put_subsystem(found); | ||
| 2408 | ret = -EINVAL; | ||
| 2409 | goto out_unlock; | ||
| 2410 | } | ||
| 2411 | |||
| 2412 | __nvme_release_subsystem(subsys); | 2412 | __nvme_release_subsystem(subsys); |
| 2413 | subsys = found; | 2413 | subsys = found; |
| 2414 | |||
| 2415 | if (!nvme_validate_cntlid(subsys, ctrl, id)) { | ||
| 2416 | ret = -EINVAL; | ||
| 2417 | goto out_put_subsystem; | ||
| 2418 | } | ||
| 2414 | } else { | 2419 | } else { |
| 2415 | ret = device_add(&subsys->dev); | 2420 | ret = device_add(&subsys->dev); |
| 2416 | if (ret) { | 2421 | if (ret) { |
| @@ -2422,23 +2427,20 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) | |||
| 2422 | list_add_tail(&subsys->entry, &nvme_subsystems); | 2427 | list_add_tail(&subsys->entry, &nvme_subsystems); |
| 2423 | } | 2428 | } |
| 2424 | 2429 | ||
| 2425 | ctrl->subsys = subsys; | ||
| 2426 | mutex_unlock(&nvme_subsystems_lock); | ||
| 2427 | |||
| 2428 | if (sysfs_create_link(&subsys->dev.kobj, &ctrl->device->kobj, | 2430 | if (sysfs_create_link(&subsys->dev.kobj, &ctrl->device->kobj, |
| 2429 | dev_name(ctrl->device))) { | 2431 | dev_name(ctrl->device))) { |
| 2430 | dev_err(ctrl->device, | 2432 | dev_err(ctrl->device, |
| 2431 | "failed to create sysfs link from subsystem.\n"); | 2433 | "failed to create sysfs link from subsystem.\n"); |
| 2432 | /* the transport driver will eventually put the subsystem */ | 2434 | goto out_put_subsystem; |
| 2433 | return -EINVAL; | ||
| 2434 | } | 2435 | } |
| 2435 | 2436 | ||
| 2436 | mutex_lock(&subsys->lock); | 2437 | ctrl->subsys = subsys; |
| 2437 | list_add_tail(&ctrl->subsys_entry, &subsys->ctrls); | 2438 | list_add_tail(&ctrl->subsys_entry, &subsys->ctrls); |
| 2438 | mutex_unlock(&subsys->lock); | 2439 | mutex_unlock(&nvme_subsystems_lock); |
| 2439 | |||
| 2440 | return 0; | 2440 | return 0; |
| 2441 | 2441 | ||
| 2442 | out_put_subsystem: | ||
| 2443 | nvme_put_subsystem(subsys); | ||
| 2442 | out_unlock: | 2444 | out_unlock: |
| 2443 | mutex_unlock(&nvme_subsystems_lock); | 2445 | mutex_unlock(&nvme_subsystems_lock); |
| 2444 | put_device(&subsys->dev); | 2446 | put_device(&subsys->dev); |
| @@ -3605,19 +3607,18 @@ static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result) | |||
| 3605 | { | 3607 | { |
| 3606 | u32 aer_notice_type = (result & 0xff00) >> 8; | 3608 | u32 aer_notice_type = (result & 0xff00) >> 8; |
| 3607 | 3609 | ||
| 3610 | trace_nvme_async_event(ctrl, aer_notice_type); | ||
| 3611 | |||
| 3608 | switch (aer_notice_type) { | 3612 | switch (aer_notice_type) { |
| 3609 | case NVME_AER_NOTICE_NS_CHANGED: | 3613 | case NVME_AER_NOTICE_NS_CHANGED: |
| 3610 | trace_nvme_async_event(ctrl, aer_notice_type); | ||
| 3611 | set_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events); | 3614 | set_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events); |
| 3612 | nvme_queue_scan(ctrl); | 3615 | nvme_queue_scan(ctrl); |
| 3613 | break; | 3616 | break; |
| 3614 | case NVME_AER_NOTICE_FW_ACT_STARTING: | 3617 | case NVME_AER_NOTICE_FW_ACT_STARTING: |
| 3615 | trace_nvme_async_event(ctrl, aer_notice_type); | ||
| 3616 | queue_work(nvme_wq, &ctrl->fw_act_work); | 3618 | queue_work(nvme_wq, &ctrl->fw_act_work); |
| 3617 | break; | 3619 | break; |
| 3618 | #ifdef CONFIG_NVME_MULTIPATH | 3620 | #ifdef CONFIG_NVME_MULTIPATH |
| 3619 | case NVME_AER_NOTICE_ANA: | 3621 | case NVME_AER_NOTICE_ANA: |
| 3620 | trace_nvme_async_event(ctrl, aer_notice_type); | ||
| 3621 | if (!ctrl->ana_log_buf) | 3622 | if (!ctrl->ana_log_buf) |
| 3622 | break; | 3623 | break; |
| 3623 | queue_work(nvme_wq, &ctrl->ana_work); | 3624 | queue_work(nvme_wq, &ctrl->ana_work); |
| @@ -3696,10 +3697,10 @@ static void nvme_free_ctrl(struct device *dev) | |||
| 3696 | __free_page(ctrl->discard_page); | 3697 | __free_page(ctrl->discard_page); |
| 3697 | 3698 | ||
| 3698 | if (subsys) { | 3699 | if (subsys) { |
| 3699 | mutex_lock(&subsys->lock); | 3700 | mutex_lock(&nvme_subsystems_lock); |
| 3700 | list_del(&ctrl->subsys_entry); | 3701 | list_del(&ctrl->subsys_entry); |
| 3701 | mutex_unlock(&subsys->lock); | ||
| 3702 | sysfs_remove_link(&subsys->dev.kobj, dev_name(ctrl->device)); | 3702 | sysfs_remove_link(&subsys->dev.kobj, dev_name(ctrl->device)); |
| 3703 | mutex_unlock(&nvme_subsystems_lock); | ||
| 3703 | } | 3704 | } |
| 3704 | 3705 | ||
| 3705 | ctrl->ops->free_ctrl(ctrl); | 3706 | ctrl->ops->free_ctrl(ctrl); |
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index 592d1e61ef7e..5838f7cd53ac 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c | |||
| @@ -978,7 +978,7 @@ EXPORT_SYMBOL_GPL(nvmf_free_options); | |||
| 978 | NVMF_OPT_DISABLE_SQFLOW) | 978 | NVMF_OPT_DISABLE_SQFLOW) |
| 979 | 979 | ||
| 980 | static struct nvme_ctrl * | 980 | static struct nvme_ctrl * |
| 981 | nvmf_create_ctrl(struct device *dev, const char *buf, size_t count) | 981 | nvmf_create_ctrl(struct device *dev, const char *buf) |
| 982 | { | 982 | { |
| 983 | struct nvmf_ctrl_options *opts; | 983 | struct nvmf_ctrl_options *opts; |
| 984 | struct nvmf_transport_ops *ops; | 984 | struct nvmf_transport_ops *ops; |
| @@ -1073,7 +1073,7 @@ static ssize_t nvmf_dev_write(struct file *file, const char __user *ubuf, | |||
| 1073 | goto out_unlock; | 1073 | goto out_unlock; |
| 1074 | } | 1074 | } |
| 1075 | 1075 | ||
| 1076 | ctrl = nvmf_create_ctrl(nvmf_device, buf, count); | 1076 | ctrl = nvmf_create_ctrl(nvmf_device, buf); |
| 1077 | if (IS_ERR(ctrl)) { | 1077 | if (IS_ERR(ctrl)) { |
| 1078 | ret = PTR_ERR(ctrl); | 1078 | ret = PTR_ERR(ctrl); |
| 1079 | goto out_unlock; | 1079 | goto out_unlock; |
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index 6d8451356eac..c17c887f2148 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c | |||
| @@ -202,7 +202,7 @@ static LIST_HEAD(nvme_fc_lport_list); | |||
| 202 | static DEFINE_IDA(nvme_fc_local_port_cnt); | 202 | static DEFINE_IDA(nvme_fc_local_port_cnt); |
| 203 | static DEFINE_IDA(nvme_fc_ctrl_cnt); | 203 | static DEFINE_IDA(nvme_fc_ctrl_cnt); |
| 204 | 204 | ||
| 205 | 205 | static struct workqueue_struct *nvme_fc_wq; | |
| 206 | 206 | ||
| 207 | /* | 207 | /* |
| 208 | * These items are short-term. They will eventually be moved into | 208 | * These items are short-term. They will eventually be moved into |
| @@ -2054,7 +2054,7 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg) | |||
| 2054 | */ | 2054 | */ |
| 2055 | if (ctrl->ctrl.state == NVME_CTRL_CONNECTING) { | 2055 | if (ctrl->ctrl.state == NVME_CTRL_CONNECTING) { |
| 2056 | active = atomic_xchg(&ctrl->err_work_active, 1); | 2056 | active = atomic_xchg(&ctrl->err_work_active, 1); |
| 2057 | if (!active && !schedule_work(&ctrl->err_work)) { | 2057 | if (!active && !queue_work(nvme_fc_wq, &ctrl->err_work)) { |
| 2058 | atomic_set(&ctrl->err_work_active, 0); | 2058 | atomic_set(&ctrl->err_work_active, 0); |
| 2059 | WARN_ON(1); | 2059 | WARN_ON(1); |
| 2060 | } | 2060 | } |
| @@ -3399,6 +3399,10 @@ static int __init nvme_fc_init_module(void) | |||
| 3399 | { | 3399 | { |
| 3400 | int ret; | 3400 | int ret; |
| 3401 | 3401 | ||
| 3402 | nvme_fc_wq = alloc_workqueue("nvme_fc_wq", WQ_MEM_RECLAIM, 0); | ||
| 3403 | if (!nvme_fc_wq) | ||
| 3404 | return -ENOMEM; | ||
| 3405 | |||
| 3402 | /* | 3406 | /* |
| 3403 | * NOTE: | 3407 | * NOTE: |
| 3404 | * It is expected that in the future the kernel will combine | 3408 | * It is expected that in the future the kernel will combine |
| @@ -3416,7 +3420,7 @@ static int __init nvme_fc_init_module(void) | |||
| 3416 | ret = class_register(&fc_class); | 3420 | ret = class_register(&fc_class); |
| 3417 | if (ret) { | 3421 | if (ret) { |
| 3418 | pr_err("couldn't register class fc\n"); | 3422 | pr_err("couldn't register class fc\n"); |
| 3419 | return ret; | 3423 | goto out_destroy_wq; |
| 3420 | } | 3424 | } |
| 3421 | 3425 | ||
| 3422 | /* | 3426 | /* |
| @@ -3440,6 +3444,9 @@ out_destroy_device: | |||
| 3440 | device_destroy(&fc_class, MKDEV(0, 0)); | 3444 | device_destroy(&fc_class, MKDEV(0, 0)); |
| 3441 | out_destroy_class: | 3445 | out_destroy_class: |
| 3442 | class_unregister(&fc_class); | 3446 | class_unregister(&fc_class); |
| 3447 | out_destroy_wq: | ||
| 3448 | destroy_workqueue(nvme_fc_wq); | ||
| 3449 | |||
| 3443 | return ret; | 3450 | return ret; |
| 3444 | } | 3451 | } |
| 3445 | 3452 | ||
| @@ -3456,6 +3463,7 @@ static void __exit nvme_fc_exit_module(void) | |||
| 3456 | 3463 | ||
| 3457 | device_destroy(&fc_class, MKDEV(0, 0)); | 3464 | device_destroy(&fc_class, MKDEV(0, 0)); |
| 3458 | class_unregister(&fc_class); | 3465 | class_unregister(&fc_class); |
| 3466 | destroy_workqueue(nvme_fc_wq); | ||
| 3459 | } | 3467 | } |
| 3460 | 3468 | ||
| 3461 | module_init(nvme_fc_init_module); | 3469 | module_init(nvme_fc_init_module); |
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 5c9429d41120..499acf07d61a 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c | |||
| @@ -31,7 +31,7 @@ void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns, | |||
| 31 | sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance); | 31 | sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance); |
| 32 | } else if (ns->head->disk) { | 32 | } else if (ns->head->disk) { |
| 33 | sprintf(disk_name, "nvme%dc%dn%d", ctrl->subsys->instance, | 33 | sprintf(disk_name, "nvme%dc%dn%d", ctrl->subsys->instance, |
| 34 | ctrl->cntlid, ns->head->instance); | 34 | ctrl->instance, ns->head->instance); |
| 35 | *flags = GENHD_FL_HIDDEN; | 35 | *flags = GENHD_FL_HIDDEN; |
| 36 | } else { | 36 | } else { |
| 37 | sprintf(disk_name, "nvme%dn%d", ctrl->subsys->instance, | 37 | sprintf(disk_name, "nvme%dn%d", ctrl->subsys->instance, |
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 3e4fb891a95a..2a8708c9ac18 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c | |||
| @@ -1296,6 +1296,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) | |||
| 1296 | switch (dev->ctrl.state) { | 1296 | switch (dev->ctrl.state) { |
| 1297 | case NVME_CTRL_DELETING: | 1297 | case NVME_CTRL_DELETING: |
| 1298 | shutdown = true; | 1298 | shutdown = true; |
| 1299 | /* fall through */ | ||
| 1299 | case NVME_CTRL_CONNECTING: | 1300 | case NVME_CTRL_CONNECTING: |
| 1300 | case NVME_CTRL_RESETTING: | 1301 | case NVME_CTRL_RESETTING: |
| 1301 | dev_warn_ratelimited(dev->ctrl.device, | 1302 | dev_warn_ratelimited(dev->ctrl.device, |
| @@ -2280,8 +2281,6 @@ static int nvme_dev_add(struct nvme_dev *dev) | |||
| 2280 | return ret; | 2281 | return ret; |
| 2281 | } | 2282 | } |
| 2282 | dev->ctrl.tagset = &dev->tagset; | 2283 | dev->ctrl.tagset = &dev->tagset; |
| 2283 | |||
| 2284 | nvme_dbbuf_set(dev); | ||
| 2285 | } else { | 2284 | } else { |
| 2286 | blk_mq_update_nr_hw_queues(&dev->tagset, dev->online_queues - 1); | 2285 | blk_mq_update_nr_hw_queues(&dev->tagset, dev->online_queues - 1); |
| 2287 | 2286 | ||
| @@ -2289,6 +2288,7 @@ static int nvme_dev_add(struct nvme_dev *dev) | |||
| 2289 | nvme_free_queues(dev, dev->online_queues); | 2288 | nvme_free_queues(dev, dev->online_queues); |
| 2290 | } | 2289 | } |
| 2291 | 2290 | ||
| 2291 | nvme_dbbuf_set(dev); | ||
| 2292 | return 0; | 2292 | return 0; |
| 2293 | } | 2293 | } |
| 2294 | 2294 | ||
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index e1824c2e0a1c..f383146e7d0f 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c | |||
| @@ -697,15 +697,6 @@ out_free_queues: | |||
| 697 | return ret; | 697 | return ret; |
| 698 | } | 698 | } |
| 699 | 699 | ||
| 700 | static void nvme_rdma_free_tagset(struct nvme_ctrl *nctrl, | ||
| 701 | struct blk_mq_tag_set *set) | ||
| 702 | { | ||
| 703 | struct nvme_rdma_ctrl *ctrl = to_rdma_ctrl(nctrl); | ||
| 704 | |||
| 705 | blk_mq_free_tag_set(set); | ||
| 706 | nvme_rdma_dev_put(ctrl->device); | ||
| 707 | } | ||
| 708 | |||
| 709 | static struct blk_mq_tag_set *nvme_rdma_alloc_tagset(struct nvme_ctrl *nctrl, | 700 | static struct blk_mq_tag_set *nvme_rdma_alloc_tagset(struct nvme_ctrl *nctrl, |
| 710 | bool admin) | 701 | bool admin) |
| 711 | { | 702 | { |
| @@ -744,24 +735,9 @@ static struct blk_mq_tag_set *nvme_rdma_alloc_tagset(struct nvme_ctrl *nctrl, | |||
| 744 | 735 | ||
| 745 | ret = blk_mq_alloc_tag_set(set); | 736 | ret = blk_mq_alloc_tag_set(set); |
| 746 | if (ret) | 737 | if (ret) |
| 747 | goto out; | 738 | return ERR_PTR(ret); |
| 748 | |||
| 749 | /* | ||
| 750 | * We need a reference on the device as long as the tag_set is alive, | ||
| 751 | * as the MRs in the request structures need a valid ib_device. | ||
| 752 | */ | ||
| 753 | ret = nvme_rdma_dev_get(ctrl->device); | ||
| 754 | if (!ret) { | ||
| 755 | ret = -EINVAL; | ||
| 756 | goto out_free_tagset; | ||
| 757 | } | ||
| 758 | 739 | ||
| 759 | return set; | 740 | return set; |
| 760 | |||
| 761 | out_free_tagset: | ||
| 762 | blk_mq_free_tag_set(set); | ||
| 763 | out: | ||
| 764 | return ERR_PTR(ret); | ||
| 765 | } | 741 | } |
| 766 | 742 | ||
| 767 | static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl, | 743 | static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl, |
| @@ -769,7 +745,7 @@ static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl, | |||
| 769 | { | 745 | { |
| 770 | if (remove) { | 746 | if (remove) { |
| 771 | blk_cleanup_queue(ctrl->ctrl.admin_q); | 747 | blk_cleanup_queue(ctrl->ctrl.admin_q); |
| 772 | nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.admin_tagset); | 748 | blk_mq_free_tag_set(ctrl->ctrl.admin_tagset); |
| 773 | } | 749 | } |
| 774 | if (ctrl->async_event_sqe.data) { | 750 | if (ctrl->async_event_sqe.data) { |
| 775 | nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, | 751 | nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, |
| @@ -847,7 +823,7 @@ out_cleanup_queue: | |||
| 847 | blk_cleanup_queue(ctrl->ctrl.admin_q); | 823 | blk_cleanup_queue(ctrl->ctrl.admin_q); |
| 848 | out_free_tagset: | 824 | out_free_tagset: |
| 849 | if (new) | 825 | if (new) |
| 850 | nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.admin_tagset); | 826 | blk_mq_free_tag_set(ctrl->ctrl.admin_tagset); |
| 851 | out_free_async_qe: | 827 | out_free_async_qe: |
| 852 | nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, | 828 | nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, |
| 853 | sizeof(struct nvme_command), DMA_TO_DEVICE); | 829 | sizeof(struct nvme_command), DMA_TO_DEVICE); |
| @@ -862,7 +838,7 @@ static void nvme_rdma_destroy_io_queues(struct nvme_rdma_ctrl *ctrl, | |||
| 862 | { | 838 | { |
| 863 | if (remove) { | 839 | if (remove) { |
| 864 | blk_cleanup_queue(ctrl->ctrl.connect_q); | 840 | blk_cleanup_queue(ctrl->ctrl.connect_q); |
| 865 | nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.tagset); | 841 | blk_mq_free_tag_set(ctrl->ctrl.tagset); |
| 866 | } | 842 | } |
| 867 | nvme_rdma_free_io_queues(ctrl); | 843 | nvme_rdma_free_io_queues(ctrl); |
| 868 | } | 844 | } |
| @@ -903,7 +879,7 @@ out_cleanup_connect_q: | |||
| 903 | blk_cleanup_queue(ctrl->ctrl.connect_q); | 879 | blk_cleanup_queue(ctrl->ctrl.connect_q); |
| 904 | out_free_tag_set: | 880 | out_free_tag_set: |
| 905 | if (new) | 881 | if (new) |
| 906 | nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.tagset); | 882 | blk_mq_free_tag_set(ctrl->ctrl.tagset); |
| 907 | out_free_io_queues: | 883 | out_free_io_queues: |
| 908 | nvme_rdma_free_io_queues(ctrl); | 884 | nvme_rdma_free_io_queues(ctrl); |
| 909 | return ret; | 885 | return ret; |
diff --git a/drivers/nvme/host/trace.h b/drivers/nvme/host/trace.h index 97d3c77365b8..e71502d141ed 100644 --- a/drivers/nvme/host/trace.h +++ b/drivers/nvme/host/trace.h | |||
| @@ -167,6 +167,7 @@ TRACE_EVENT(nvme_async_event, | |||
| 167 | aer_name(NVME_AER_NOTICE_NS_CHANGED), | 167 | aer_name(NVME_AER_NOTICE_NS_CHANGED), |
| 168 | aer_name(NVME_AER_NOTICE_ANA), | 168 | aer_name(NVME_AER_NOTICE_ANA), |
| 169 | aer_name(NVME_AER_NOTICE_FW_ACT_STARTING), | 169 | aer_name(NVME_AER_NOTICE_FW_ACT_STARTING), |
| 170 | aer_name(NVME_AER_NOTICE_DISC_CHANGED), | ||
| 170 | aer_name(NVME_AER_ERROR), | 171 | aer_name(NVME_AER_ERROR), |
| 171 | aer_name(NVME_AER_SMART), | 172 | aer_name(NVME_AER_SMART), |
| 172 | aer_name(NVME_AER_CSS), | 173 | aer_name(NVME_AER_CSS), |
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index c40720cb59ac..8028adacaff3 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
| @@ -1246,9 +1246,9 @@ enum { | |||
| 1246 | NVME_SC_FW_NEEDS_SUBSYS_RESET = 0x110, | 1246 | NVME_SC_FW_NEEDS_SUBSYS_RESET = 0x110, |
| 1247 | NVME_SC_FW_NEEDS_RESET = 0x111, | 1247 | NVME_SC_FW_NEEDS_RESET = 0x111, |
| 1248 | NVME_SC_FW_NEEDS_MAX_TIME = 0x112, | 1248 | NVME_SC_FW_NEEDS_MAX_TIME = 0x112, |
| 1249 | NVME_SC_FW_ACIVATE_PROHIBITED = 0x113, | 1249 | NVME_SC_FW_ACTIVATE_PROHIBITED = 0x113, |
| 1250 | NVME_SC_OVERLAPPING_RANGE = 0x114, | 1250 | NVME_SC_OVERLAPPING_RANGE = 0x114, |
| 1251 | NVME_SC_NS_INSUFFICENT_CAP = 0x115, | 1251 | NVME_SC_NS_INSUFFICIENT_CAP = 0x115, |
| 1252 | NVME_SC_NS_ID_UNAVAILABLE = 0x116, | 1252 | NVME_SC_NS_ID_UNAVAILABLE = 0x116, |
| 1253 | NVME_SC_NS_ALREADY_ATTACHED = 0x118, | 1253 | NVME_SC_NS_ALREADY_ATTACHED = 0x118, |
| 1254 | NVME_SC_NS_IS_PRIVATE = 0x119, | 1254 | NVME_SC_NS_IS_PRIVATE = 0x119, |
