Commit 530e86c7 authored by Martin K. Petersen's avatar Martin K. Petersen
Browse files

Merge patch series "qla2xxx driver misc features"

Nilesh Javali <njavali@marvell.com> says:

Martin,

Please apply the qla2xxx driver miscellaneous features and bug fixes
to the scsi tree at your earliest convenience.

Link: https://lore.kernel.org/r/20230821130045.34850-1-njavali@marvell.com


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parents 749652a1 659d36cc
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -3093,8 +3093,6 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable)
			vha->flags.difdix_supported = 1;
			ql_dbg(ql_dbg_user, vha, 0x7082,
			    "Registered for DIF/DIX type 1 and 3 protection.\n");
			if (ql2xenabledif == 1)
				prot = SHOST_DIX_TYPE0_PROTECTION;
			scsi_host_set_prot(vha->host,
			    prot | SHOST_DIF_TYPE1_PROTECTION
			    | SHOST_DIF_TYPE2_PROTECTION
+3 −4
Original line number Diff line number Diff line
@@ -12,13 +12,12 @@
 * ----------------------------------------------------------------------
 * | Module Init and Probe        |       0x0199       |                |
 * | Mailbox commands             |       0x1206       | 0x11a5-0x11ff	|
 * | Device Discovery             |       0x2134       | 0x210e-0x2115  |
 * |                              |                    | 0x211c-0x2128  |
 * |                              |                    | 0x212c-0x2134  |
 * | Device Discovery             |       0x2134       | 0x2112-0x2115  |
 * |                              |                    | 0x2127-0x2128  |
 * | Queue Command and IO tracing |       0x3074       | 0x300b         |
 * |                              |                    | 0x3027-0x3028  |
 * |                              |                    | 0x303d-0x3041  |
 * |                              |                    | 0x302d,0x3033  |
 * |                              |                    | 0x302e,0x3033  |
 * |                              |                    | 0x3036,0x3038  |
 * |                              |                    | 0x303a		|
 * | DPC Thread                   |       0x4023       | 0x4002,0x4013  |
+1 −0
Original line number Diff line number Diff line
@@ -368,6 +368,7 @@ ql_log_qp(uint32_t, struct qla_qpair *, int32_t, const char *fmt, ...);
#define ql_dbg_tgt_tmr	0x00001000 /* Target mode task management */
#define ql_dbg_tgt_dif  0x00000800 /* Target mode dif */
#define ql_dbg_edif	0x00000400 /* edif and purex debug */
#define ql_dbg_unsol	0x00000100 /* Unsolicited path debug */

extern int qla27xx_dump_mpi_ram(struct qla_hw_data *, uint32_t, uint32_t *,
	uint32_t, void **);
+49 −8
Original line number Diff line number Diff line
@@ -346,6 +346,12 @@ struct name_list_extended {
	u8			sent;
};

struct qla_nvme_fc_rjt {
	struct fcnvme_ls_rjt *c;
	dma_addr_t  cdma;
	u16 size;
};

struct els_reject {
	struct fc_els_ls_rjt *c;
	dma_addr_t  cdma;
@@ -503,6 +509,20 @@ struct ct_arg {
	port_id_t	id;
};

struct qla_nvme_lsrjt_pt_arg {
	struct fc_port *fcport;
	u8 opcode;
	u8 vp_idx;
	u8 reason;
	u8 explanation;
	__le16 nport_handle;
	u16 control_flags;
	__le16 ox_id;
	__le32 xchg_address;
	u32 tx_byte_count, rx_byte_count;
	dma_addr_t tx_addr, rx_addr;
};

/*
 * SRB extensions.
 */
@@ -611,13 +631,16 @@ struct srb_iocb {
			void *desc;

			/* These are only used with ls4 requests */
			int cmd_len;
			int rsp_len;
			__le32 cmd_len;
			__le32 rsp_len;
			dma_addr_t cmd_dma;
			dma_addr_t rsp_dma;
			enum nvmefc_fcp_datadir dir;
			uint32_t dl;
			uint32_t timeout_sec;
			__le32 exchange_address;
			__le16 nport_handle;
			__le16 ox_id;
			struct	list_head   entry;
		} nvme;
		struct {
@@ -707,6 +730,10 @@ typedef struct srb {
	struct fc_port *fcport;
	struct scsi_qla_host *vha;
	unsigned int start_timer:1;
	unsigned int abort:1;
	unsigned int aborted:1;
	unsigned int completed:1;
	unsigned int unsol_rsp:1;

	uint32_t handle;
	uint16_t flags;
@@ -2542,6 +2569,7 @@ enum rscn_addr_format {
typedef struct fc_port {
	struct list_head list;
	struct scsi_qla_host *vha;
	struct list_head unsol_ctx_head;

	unsigned int conf_compl_supported:1;
	unsigned int deleted:2;
@@ -3742,6 +3770,16 @@ struct qla_fw_resources {
	u16 pad;
};

struct qla_fw_res {
	u16      iocb_total;
	u16      iocb_limit;
	atomic_t iocb_used;

	u16      exch_total;
	u16      exch_limit;
	atomic_t exch_used;
};

#define QLA_IOCB_PCT_LIMIT 95

struct  qla_buf_pool {
@@ -3787,6 +3825,12 @@ struct qla_qpair {

	uint16_t id;			/* qp number used with FW */
	uint16_t vp_idx;		/* vport ID */

	uint16_t dsd_inuse;
	uint16_t dsd_avail;
	struct list_head dsd_list;
#define NUM_DSD_CHAIN 4096

	mempool_t *srb_mempool;

	struct pci_dev  *pdev;
@@ -4384,7 +4428,6 @@ struct qla_hw_data {
	uint8_t		aen_mbx_count;
	atomic_t	num_pend_mbx_stage1;
	atomic_t	num_pend_mbx_stage2;
	atomic_t	num_pend_mbx_stage3;
	uint16_t	frame_payload_size;

	uint32_t	login_retry_count;
@@ -4715,11 +4758,6 @@ struct qla_hw_data {
	struct fw_blob	*hablob;
	struct qla82xx_legacy_intr_set nx_legacy_intr;

	uint16_t	gbl_dsd_inuse;
	uint16_t	gbl_dsd_avail;
	struct list_head gbl_dsd_list;
#define NUM_DSD_CHAIN 4096

	uint8_t fw_type;
	uint32_t file_prd_off;	/* File firmware product offset */

@@ -4801,6 +4839,8 @@ struct qla_hw_data {
	struct els_reject elsrej;
	u8 edif_post_stop_cnt_down;
	struct qla_vp_map *vp_map;
	struct qla_nvme_fc_rjt lsrjt;
	struct qla_fw_res fwres ____cacheline_aligned;
};

#define RX_ELS_SIZE (roundup(sizeof(struct enode) + ELS_MAX_PAYLOAD, SMP_CACHE_BYTES))
@@ -4833,6 +4873,7 @@ struct active_regions {
 * is variable) starting at "iocb".
 */
struct purex_item {
	void *purls_context;
	struct list_head list;
	struct scsi_qla_host *vha;
	void (*process_item)(struct scsi_qla_host *vha,
+10 −0
Original line number Diff line number Diff line
@@ -276,6 +276,16 @@ qla_dfs_fw_resource_cnt_show(struct seq_file *s, void *unused)

		seq_printf(s, "estimate exchange used[%d] high water limit [%d] n",
			   exch_used, ha->base_qpair->fwres.exch_limit);

		if (ql2xenforce_iocb_limit == 2) {
			iocbs_used = atomic_read(&ha->fwres.iocb_used);
			exch_used  = atomic_read(&ha->fwres.exch_used);
			seq_printf(s, "        estimate iocb2 used [%d] high water limit [%d]\n",
					iocbs_used, ha->fwres.iocb_limit);

			seq_printf(s, "        estimate exchange2 used[%d] high water limit [%d] \n",
					exch_used, ha->fwres.exch_limit);
		}
	}

	return 0;
Loading