Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecad0d2c authored by James Smart's avatar James Smart Committed by Christoph Hellwig
Browse files

nvme-fc: remove NVME_FC_MAX_SEGMENTS



The define is an arbitrary limit to the io size on the initiator,
capping the io to 1MB-4KB.

Remove the define from the transport. I/O size will solely be limited
by the LLDD sg limits.

Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 56d5f4f1
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -2435,7 +2435,6 @@ static int
nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
{
	struct nvmf_ctrl_options *opts = ctrl->ctrl.opts;
	u32 segs;
	int ret;
	bool changed;

@@ -2486,9 +2485,8 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
	if (ret)
		goto out_disconnect_admin_queue;

	segs = min_t(u32, NVME_FC_MAX_SEGMENTS,
			ctrl->lport->ops->max_sgl_segments);
	ctrl->ctrl.max_hw_sectors = (segs - 1) << (PAGE_SHIFT - 9);
	ctrl->ctrl.max_hw_sectors =
		(ctrl->lport->ops->max_sgl_segments - 1) << (PAGE_SHIFT - 9);

	ret = nvme_init_identify(&ctrl->ctrl);
	if (ret)
+0 −2
Original line number Diff line number Diff line
@@ -102,8 +102,6 @@ enum nvmefc_fcp_datadir {
};


#define NVME_FC_MAX_SEGMENTS		256

/**
 * struct nvmefc_fcp_req - Request structure passed from NVME-FC transport
 *                         to LLDD in order to perform a NVME FCP IO operation.