Skip to content

Commit db3ba97

Browse files
committed
Merge tag 'nvme-6.2-2023-01-26' of git://git.infradead.org/nvme into block-6.2
Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.2 - flush initial scan_work for async probe (Keith Busch) - fix passthrough csi check (Keith Busch) - fix nvme-fc initialization order (Ross Lagerwall)" * tag 'nvme-6.2-2023-01-26' of git://git.infradead.org/nvme: nvme: fix passthrough csi check nvme-pci: flush initial scan_work for async probe nvme-fc: fix initialization order
2 parents 8e4ff68 + 85eee63 commit db3ba97

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

drivers/nvme/host/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ u32 nvme_command_effects(struct nvme_ctrl *ctrl, struct nvme_ns *ns, u8 opcode)
10931093
if (ns) {
10941094
if (ns->head->effects)
10951095
effects = le32_to_cpu(ns->head->effects->iocs[opcode]);
1096-
if (ns->head->ids.csi == NVME_CAP_CSS_NVM)
1096+
if (ns->head->ids.csi == NVME_CSI_NVM)
10971097
effects |= nvme_known_nvm_effects(opcode);
10981098
if (effects & ~(NVME_CMD_EFFECTS_CSUPP | NVME_CMD_EFFECTS_LBCC))
10991099
dev_warn_once(ctrl->device,

drivers/nvme/host/fc.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3521,13 +3521,6 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
35213521

35223522
nvme_fc_init_queue(ctrl, 0);
35233523

3524-
ret = nvme_alloc_admin_tag_set(&ctrl->ctrl, &ctrl->admin_tag_set,
3525-
&nvme_fc_admin_mq_ops,
3526-
struct_size((struct nvme_fcp_op_w_sgl *)NULL, priv,
3527-
ctrl->lport->ops->fcprqst_priv_sz));
3528-
if (ret)
3529-
goto out_free_queues;
3530-
35313524
/*
35323525
* Would have been nice to init io queues tag set as well.
35333526
* However, we require interaction from the controller
@@ -3537,10 +3530,17 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
35373530

35383531
ret = nvme_init_ctrl(&ctrl->ctrl, dev, &nvme_fc_ctrl_ops, 0);
35393532
if (ret)
3540-
goto out_cleanup_tagset;
3533+
goto out_free_queues;
35413534

35423535
/* at this point, teardown path changes to ref counting on nvme ctrl */
35433536

3537+
ret = nvme_alloc_admin_tag_set(&ctrl->ctrl, &ctrl->admin_tag_set,
3538+
&nvme_fc_admin_mq_ops,
3539+
struct_size((struct nvme_fcp_op_w_sgl *)NULL, priv,
3540+
ctrl->lport->ops->fcprqst_priv_sz));
3541+
if (ret)
3542+
goto fail_ctrl;
3543+
35443544
spin_lock_irqsave(&rport->lock, flags);
35453545
list_add_tail(&ctrl->ctrl_list, &rport->ctrl_list);
35463546
spin_unlock_irqrestore(&rport->lock, flags);
@@ -3592,8 +3592,6 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
35923592

35933593
return ERR_PTR(-EIO);
35943594

3595-
out_cleanup_tagset:
3596-
nvme_remove_admin_tag_set(&ctrl->ctrl);
35973595
out_free_queues:
35983596
kfree(ctrl->queues);
35993597
out_free_ida:

drivers/nvme/host/pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,6 +3102,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
31023102

31033103
nvme_start_ctrl(&dev->ctrl);
31043104
nvme_put_ctrl(&dev->ctrl);
3105+
flush_work(&dev->ctrl.scan_work);
31053106
return 0;
31063107

31073108
out_disable:

0 commit comments

Comments
 (0)