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

Commit 1ba981fd authored by James Smart's avatar James Smart Committed by James Bottomley
Browse files

[SCSI] lpfc 8.3.45: Incorporated support of a low-latency io path

parent 2a2719d3
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -722,6 +722,20 @@ struct lpfc_hba {
	uint32_t cfg_hba_queue_depth;
	uint32_t cfg_enable_hba_reset;
	uint32_t cfg_enable_hba_heartbeat;
	uint32_t cfg_fof;
	uint32_t cfg_EnableXLane;
	uint8_t cfg_oas_tgt_wwpn[8];
	uint8_t cfg_oas_vpt_wwpn[8];
	uint32_t cfg_oas_lun_state;
#define OAS_LUN_ENABLE	1
#define OAS_LUN_DISABLE	0
	uint32_t cfg_oas_lun_status;
#define OAS_LUN_STATUS_EXISTS	0x01
	uint32_t cfg_oas_flags;
#define OAS_FIND_ANY_VPORT	0x01
#define OAS_FIND_ANY_TARGET	0x02
#define OAS_LUN_VALID	0x04
	uint32_t cfg_XLanePriority;
	uint32_t cfg_enable_bg;
	uint32_t cfg_hostmem_hgp;
	uint32_t cfg_log_verbose;
@@ -973,6 +987,9 @@ struct lpfc_hba {
	atomic_t sdev_cnt;
	uint8_t fips_spec_rev;
	uint8_t fips_level;
	spinlock_t devicelock;	/* lock for luns list */
	mempool_t *device_data_mem_pool;
	struct list_head luns;
};

static inline struct Scsi_Host *
+551 −49

File changed.

Preview size limit exceeded, changes collapsed.

+22 −0
Original line number Diff line number Diff line
@@ -187,6 +187,11 @@ void lpfc_offline_prep(struct lpfc_hba *, int);
void lpfc_offline(struct lpfc_hba *);
void lpfc_reset_hba(struct lpfc_hba *);

int lpfc_fof_queue_create(struct lpfc_hba *);
int lpfc_fof_queue_setup(struct lpfc_hba *);
int lpfc_fof_queue_destroy(struct lpfc_hba *);
irqreturn_t lpfc_sli4_fof_intr_handler(int, void *);

int lpfc_sli_setup(struct lpfc_hba *);
int lpfc_sli_queue_setup(struct lpfc_hba *);

@@ -472,3 +477,20 @@ void lpfc_free_sgl_list(struct lpfc_hba *, struct list_head *);
uint32_t lpfc_sli_port_speed_get(struct lpfc_hba *);
int lpfc_sli4_request_firmware_update(struct lpfc_hba *, uint8_t);
void lpfc_sli4_offline_eratt(struct lpfc_hba *);

struct lpfc_device_data *lpfc_create_device_data(struct lpfc_hba *,
						struct lpfc_name *,
						struct lpfc_name *,
						uint64_t, bool);
void lpfc_delete_device_data(struct lpfc_hba *, struct lpfc_device_data*);
struct lpfc_device_data *__lpfc_get_device_data(struct lpfc_hba *,
					struct list_head *list,
					struct lpfc_name *,
					struct lpfc_name *, uint64_t);
bool lpfc_enable_oas_lun(struct lpfc_hba *, struct lpfc_name *,
			 struct lpfc_name *, uint64_t);
bool lpfc_disable_oas_lun(struct lpfc_hba *, struct lpfc_name *,
			  struct lpfc_name *, uint64_t);
bool lpfc_find_next_oas_lun(struct lpfc_hba *, struct lpfc_name *,
			    struct lpfc_name *, uint64_t *, struct lpfc_name *,
			    struct lpfc_name *, uint64_t *, uint32_t *);
+98 −0
Original line number Diff line number Diff line
@@ -2280,6 +2280,104 @@ lpfc_idiag_queinfo_read(struct file *file, char __user *buf, size_t nbytes,
		}
	}

	if (phba->cfg_fof) {
		/* FOF EQ */
		qp = phba->sli4_hba.fof_eq;
		if (!qp)
			goto out;

		len += snprintf(pbuffer+len,
			LPFC_QUE_INFO_GET_BUF_SIZE-len,
			"\nFOF EQ info: "
			"EQ-STAT[max:x%x noE:x%x "
			"bs:x%x proc:x%llx]\n",
			qp->q_cnt_1, qp->q_cnt_2,
			qp->q_cnt_3, (unsigned long long)qp->q_cnt_4);

		len += snprintf(pbuffer+len,
			LPFC_QUE_INFO_GET_BUF_SIZE-len,
			"EQID[%02d], "
			"QE-CNT[%04d], QE-SIZE[%04d], "
			"HOST-IDX[%04d], PORT-IDX[%04d]",
			qp->queue_id,
			qp->entry_count,
			qp->entry_size,
			qp->host_index,
			qp->hba_index);

		/* Reset max counter */
		qp->EQ_max_eqe = 0;

		len +=  snprintf(pbuffer+len,
			LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n");
		if (len >= max_cnt)
			goto too_big;
	}

	if (phba->cfg_EnableXLane) {

		/* OAS CQ */
		qp = phba->sli4_hba.oas_cq;
		if (qp) {
			len += snprintf(pbuffer+len,
				LPFC_QUE_INFO_GET_BUF_SIZE-len,
				"\tOAS CQ info: ");
			len += snprintf(pbuffer+len,
				LPFC_QUE_INFO_GET_BUF_SIZE-len,
				"AssocEQID[%02d]: "
				"CQ STAT[max:x%x relw:x%x "
				"xabt:x%x wq:x%llx]\n",
				qp->assoc_qid,
				qp->q_cnt_1, qp->q_cnt_2,
				qp->q_cnt_3, (unsigned long long)qp->q_cnt_4);
			len += snprintf(pbuffer+len,
				LPFC_QUE_INFO_GET_BUF_SIZE-len,
				"\tCQID[%02d], "
				"QE-CNT[%04d], QE-SIZE[%04d], "
				"HOST-IDX[%04d], PORT-IDX[%04d]",
				qp->queue_id, qp->entry_count,
				qp->entry_size, qp->host_index,
				qp->hba_index);

			/* Reset max counter */
			qp->CQ_max_cqe = 0;

			len +=  snprintf(pbuffer+len,
				LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n");
			if (len >= max_cnt)
				goto too_big;
		}

		/* OAS WQ */
		qp = phba->sli4_hba.oas_wq;
		if (qp) {
			len += snprintf(pbuffer+len,
				LPFC_QUE_INFO_GET_BUF_SIZE-len,
				"\t\tOAS WQ info: ");
			len += snprintf(pbuffer+len,
				LPFC_QUE_INFO_GET_BUF_SIZE-len,
				"AssocCQID[%02d]: "
				"WQ-STAT[oflow:x%x posted:x%llx]\n",
				qp->assoc_qid,
				qp->q_cnt_1, (unsigned long long)qp->q_cnt_4);
			len += snprintf(pbuffer+len,
				LPFC_QUE_INFO_GET_BUF_SIZE-len,
				"\t\tWQID[%02d], "
				"QE-CNT[%04d], QE-SIZE[%04d], "
				"HOST-IDX[%04d], PORT-IDX[%04d]",
				qp->queue_id,
				qp->entry_count,
				qp->entry_size,
				qp->host_index,
				qp->hba_index);

			len +=  snprintf(pbuffer+len,
				LPFC_QUE_INFO_GET_BUF_SIZE-len, "\n");
			if (len >= max_cnt)
				goto too_big;
		}
	}
out:
	spin_unlock_irq(&phba->hbalock);
	return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len);

+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#define LPFC_EXTRA_RING          1	/* ring 1 for other protocols */
#define LPFC_ELS_RING            2	/* ring 2 for ELS commands */
#define LPFC_FCP_NEXT_RING       3
#define LPFC_FCP_OAS_RING        3

#define SLI2_IOCB_CMD_R0_ENTRIES    172	/* SLI-2 FCP command ring entries */
#define SLI2_IOCB_RSP_R0_ENTRIES    134	/* SLI-2 FCP response ring entries */
Loading