Commit 0f45353d authored by Jens Axboe's avatar Jens Axboe
Browse files

Merge tag 'nvme-6.19-2025-12-04' of git://git.infradead.org/nvme into block-6.19

Pull NVMe updates from Keith:

"- Subsystem usage cleanups (Max)
 - Endpoint device fixes (Shin'ichiro)
 - Debug statements (Gerd)
 - FC fabrics cleanups and fixes (Daniel)
 - Consistent alloc API usages (Israel)
 - Code comment updates (Chu)
 - Authentication retry fix (Justin)"

* tag 'nvme-6.19-2025-12-04' of git://git.infradead.org/nvme:
  nvme-fabrics: add ENOKEY to no retry criteria for authentication failures
  nvme-auth: use kvfree() for memory allocated with kvcalloc()
  nvmet-tcp: use kvcalloc for commands array
  nvmet-rdma: use kvcalloc for commands and responses arrays
  nvme: fix typo error in nvme target
  nvmet-fc: use pr_* print macros instead of dev_*
  nvmet-fcloop: remove unused lsdir member.
  nvmet-fcloop: check all request and response have been processed
  nvme-fc: check all request and response have been processed
  nvme-fc: don't hold rport lock when putting ctrl
  nvme-pci: add debug message on fail to read CSTS
  nvme-pci: print error message on failure in nvme_probe
  nvmet: pci-epf: fix DMA channel debug print
  nvmet: pci-epf: move DMA initialization to EPC init callback
  nvmet: remove redundant subsysnqn field from ctrl
  nvmet: add sanity checks when freeing subsystem
parents f7e3f852 13989207
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1122,7 +1122,7 @@ void nvme_auth_free(struct nvme_ctrl *ctrl)
	if (ctrl->dhchap_ctxs) {
		for (i = 0; i < ctrl_max_dhchaps(ctrl); i++)
			nvme_auth_free_dhchap(&ctrl->dhchap_ctxs[i]);
		kfree(ctrl->dhchap_ctxs);
		kvfree(ctrl->dhchap_ctxs);
	}
	if (ctrl->host_key) {
		nvme_auth_free_key(ctrl->host_key);
+1 −1
Original line number Diff line number Diff line
@@ -592,7 +592,7 @@ bool nvmf_should_reconnect(struct nvme_ctrl *ctrl, int status)
	if (status > 0 && (status & NVME_STATUS_DNR))
		return false;

	if (status == -EKEYREJECTED)
	if (status == -EKEYREJECTED || status == -ENOKEY)
		return false;

	if (ctrl->opts->max_reconnects == -1 ||
+6 −2
Original line number Diff line number Diff line
@@ -520,6 +520,8 @@ nvme_fc_free_rport(struct kref *ref)

	WARN_ON(rport->remoteport.port_state != FC_OBJSTATE_DELETED);
	WARN_ON(!list_empty(&rport->ctrl_list));
	WARN_ON(!list_empty(&rport->ls_req_list));
	WARN_ON(!list_empty(&rport->ls_rcv_list));

	/* remove from lport list */
	spin_lock_irqsave(&nvme_fc_lock, flags);
@@ -1468,14 +1470,14 @@ nvme_fc_match_disconn_ls(struct nvme_fc_rport *rport,
{
	struct fcnvme_ls_disconnect_assoc_rqst *rqst =
					&lsop->rqstbuf->rq_dis_assoc;
	struct nvme_fc_ctrl *ctrl, *ret = NULL;
	struct nvme_fc_ctrl *ctrl, *tmp, *ret = NULL;
	struct nvmefc_ls_rcv_op *oldls = NULL;
	u64 association_id = be64_to_cpu(rqst->associd.association_id);
	unsigned long flags;

	spin_lock_irqsave(&rport->lock, flags);

	list_for_each_entry(ctrl, &rport->ctrl_list, ctrl_list) {
	list_for_each_entry_safe(ctrl, tmp, &rport->ctrl_list, ctrl_list) {
		if (!nvme_fc_ctrl_get(ctrl))
			continue;
		spin_lock(&ctrl->lock);
@@ -1488,7 +1490,9 @@ nvme_fc_match_disconn_ls(struct nvme_fc_rport *rport,
		if (ret)
			/* leave the ctrl get reference */
			break;
		spin_unlock_irqrestore(&rport->lock, flags);
		nvme_fc_ctrl_put(ctrl);
		spin_lock_irqsave(&rport->lock, flags);
	}

	spin_unlock_irqrestore(&rport->lock, flags);
+2 −0
Original line number Diff line number Diff line
@@ -2984,6 +2984,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
	pci_set_master(pdev);

	if (readl(dev->bar + NVME_REG_CSTS) == -1) {
		dev_dbg(dev->ctrl.device, "reading CSTS register failed\n");
		result = -ENODEV;
		goto disable;
	}
@@ -3609,6 +3610,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
	nvme_uninit_ctrl(&dev->ctrl);
out_put_ctrl:
	nvme_put_ctrl(&dev->ctrl);
	dev_err_probe(&pdev->dev, result, "probe failed\n");
	return result;
}

+1 −1
Original line number Diff line number Diff line
@@ -708,7 +708,7 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)

	/*
	 * We don't really have a practical limit on the number of abort
	 * comands.  But we don't do anything useful for abort either, so
	 * commands.  But we don't do anything useful for abort either, so
	 * no point in allowing more abort commands than the spec requires.
	 */
	id->acl = 3;
Loading