All of lore.kernel.org
 help / color / mirror / Atom feed
From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: Nilesh Javali <njavali@marvell.com>
Cc: Martin Petersen <martin.petersen@oracle.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	"GR-QLogic-Storage-Upstream@marvell.com" 
	<GR-QLogic-Storage-Upstream@marvell.com>
Subject: Re: [PATCH 14/16] qla2xxx: Add devid's and conditionals for 28xx
Date: Mon, 3 Jan 2022 00:52:06 +0000	[thread overview]
Message-ID: <46AAF253-04F5-4B3D-AD45-FFAE1FD43D4F@oracle.com> (raw)
In-Reply-To: <20211224070712.17905-15-njavali@marvell.com>



> On Dec 23, 2021, at 11:07 PM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> From: Arun Easi <aeasi@marvell.com>
> 
> 28XX adapters are capable of detecting both T10 PI tag escape values
> as well as IP guard. This was missed due to the adapter type missed
> in the corresponding macros. Fix this by adding support for 28xx in
> those macros.
> 

This patch seems to fix more than just IP guard macros. 
Can you please seperate T10 PI fix with other fixes from this patch.

> Cc: stable@vger.kernel.org
> Signed-off-by: Arun Easi <aeasi@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
> drivers/scsi/qla2xxx/qla_attr.c   |  7 ++-----
> drivers/scsi/qla2xxx/qla_init.c   | 17 +++++++++++------
> drivers/scsi/qla2xxx/qla_mbx.c    | 17 ++++++++++++++---
> drivers/scsi/qla2xxx/qla_os.c     |  3 +--
> drivers/scsi/qla2xxx/qla_sup.c    |  4 ++--
> drivers/scsi/qla2xxx/qla_target.c |  3 +--
> 6 files changed, 31 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
> index db55737000ab..3b3e4234f37a 100644
> --- a/drivers/scsi/qla2xxx/qla_attr.c
> +++ b/drivers/scsi/qla2xxx/qla_attr.c
> @@ -555,7 +555,7 @@ qla2x00_sysfs_read_vpd(struct file *filp, struct kobject *kobj,
> 	if (!capable(CAP_SYS_ADMIN))
> 		return -EINVAL;
> 
> -	if (IS_NOCACHE_VPD_TYPE(ha))
> +	if (!IS_NOCACHE_VPD_TYPE(ha))
> 		goto skip;
> 
> 	faddr = ha->flt_region_vpd << 2;
> @@ -745,7 +745,7 @@ qla2x00_sysfs_write_reset(struct file *filp, struct kobject *kobj,
> 		ql_log(ql_log_info, vha, 0x706f,
> 		    "Issuing MPI reset.\n");
> 
> -		if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
> +		if (IS_QLA83XX(ha)) {
> 			uint32_t idc_control;
> 
> 			qla83xx_idc_lock(vha, 0);
> @@ -1056,9 +1056,6 @@ qla2x00_free_sysfs_attr(scsi_qla_host_t *vha, bool stop_beacon)
> 			continue;
> 		if (iter->type == 3 && !(IS_CNA_CAPABLE(ha)))
> 			continue;
> -		if (iter->type == 0x27 &&
> -		    (!IS_QLA27XX(ha) || !IS_QLA28XX(ha)))
> -			continue;
> 
> 		sysfs_remove_bin_file(&host->shost_gendev.kobj,
> 		    iter->attr);
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index 24322eb01571..87382477ff85 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -3482,6 +3482,14 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
> 	struct rsp_que *rsp = ha->rsp_q_map[0];
> 	struct qla2xxx_fw_dump *fw_dump;
> 
> +	if (ha->fw_dump) {
> +		ql_dbg(ql_dbg_init, vha, 0x00bd,
> +		    "Firmware dump already allocated.\n");
> +		return;
> +	}
> +
> +	ha->fw_dumped = 0;
> +	ha->fw_dump_cap_flags = 0;
> 	dump_size = fixed_size = mem_size = eft_size = fce_size = mq_size = 0;
> 	req_q_size = rsp_q_size = 0;
> 
> @@ -3492,7 +3500,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
> 		mem_size = (ha->fw_memory_size - 0x11000 + 1) *
> 		    sizeof(uint16_t);
> 	} else if (IS_FWI2_CAPABLE(ha)) {
> -		if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha))
> +		if (IS_QLA83XX(ha))
> 			fixed_size = offsetof(struct qla83xx_fw_dump, ext_mem);
> 		else if (IS_QLA81XX(ha))
> 			fixed_size = offsetof(struct qla81xx_fw_dump, ext_mem);
> @@ -3504,8 +3512,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
> 		mem_size = (ha->fw_memory_size - 0x100000 + 1) *
> 		    sizeof(uint32_t);
> 		if (ha->mqenable) {
> -			if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha) &&
> -			    !IS_QLA28XX(ha))
> +			if (!IS_QLA83XX(ha))
> 				mq_size = sizeof(struct qla2xxx_mq_chain);
> 			/*
> 			 * Allocate maximum buffer size for all queues - Q0.
> @@ -4065,9 +4072,7 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)
> 			    "Unsupported FAC firmware (%d.%02d.%02d).\n",
> 			    ha->fw_major_version, ha->fw_minor_version,
> 			    ha->fw_subminor_version);
> -
> -			if (IS_QLA83XX(ha) || IS_QLA27XX(ha) ||
> -			    IS_QLA28XX(ha)) {
> +			if (IS_QLA83XX(ha)) {
> 				ha->flags.fac_supported = 0;
> 				rval = QLA_SUCCESS;
> 			}
> diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
> index c4bd8a16d78c..826303f53f77 100644
> --- a/drivers/scsi/qla2xxx/qla_mbx.c
> +++ b/drivers/scsi/qla2xxx/qla_mbx.c
> @@ -9,6 +9,12 @@
> #include <linux/delay.h>
> #include <linux/gfp.h>
> 
> +#ifdef CONFIG_PPC
> +#define IS_PPCARCH      true
> +#else
> +#define IS_PPCARCH      false
> +#endif
> +
> static struct mb_cmd_name {
> 	uint16_t cmd;
> 	const char *str;
> @@ -728,6 +734,12 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr)
> 				vha->min_supported_speed =
> 				    nv->min_supported_speed;
> 			}
> +
> +			if (IS_PPCARCH)
> +				mcp->mb[11] |= BIT_4;
> +
> +			if (ql2xnvmeenable)
> +				mcp->mb[4] |= NVME_ENABLE_FLAG;
> 		}
> 
> 		if (ha->flags.exlogins_enabled)
> @@ -3035,8 +3047,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *vha)
> 		ha->orig_fw_iocb_count = mcp->mb[10];
> 		if (ha->flags.npiv_supported)
> 			ha->max_npiv_vports = mcp->mb[11];
> -		if (IS_QLA81XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha) ||
> -		    IS_QLA28XX(ha))
> +		if (IS_QLA81XX(ha) || IS_QLA83XX(ha))
> 			ha->fw_max_fcf_count = mcp->mb[12];
> 	}
> 
> @@ -5627,7 +5638,7 @@ qla2x00_get_data_rate(scsi_qla_host_t *vha)
> 	mcp->out_mb = MBX_1|MBX_0;
> 	mcp->in_mb = MBX_2|MBX_1|MBX_0;
> 	if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha))
> -		mcp->in_mb |= MBX_3;
> +		mcp->in_mb |= MBX_4|MBX_3;
> 	mcp->tov = MBX_TOV_SECONDS;
> 	mcp->flags = 0;
> 	rval = qla2x00_mailbox_command(vha, mcp);
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index 88bff825aa5e..cff5e4a710d1 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -3762,8 +3762,7 @@ qla2x00_unmap_iobases(struct qla_hw_data *ha)
> 		if (ha->mqiobase)
> 			iounmap(ha->mqiobase);
> 
> -		if ((IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) &&
> -		    ha->msixbase)
> +		if (ha->msixbase)
> 			iounmap(ha->msixbase);
> 	}
> }
> diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
> index a0aeba69513d..c092a6b1ced4 100644
> --- a/drivers/scsi/qla2xxx/qla_sup.c
> +++ b/drivers/scsi/qla2xxx/qla_sup.c
> @@ -844,7 +844,7 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr)
> 				ha->flt_region_nvram = start;
> 			break;
> 		case FLT_REG_IMG_PRI_27XX:
> -			if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
> +			if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
> 				ha->flt_region_img_status_pri = start;
> 			break;
> 		case FLT_REG_IMG_SEC_27XX:
> @@ -1356,7 +1356,7 @@ qla24xx_write_flash_data(scsi_qla_host_t *vha, __le32 *dwptr, uint32_t faddr,
> 		    flash_data_addr(ha, faddr), le32_to_cpu(*dwptr));
> 		if (ret) {
> 			ql_dbg(ql_dbg_user, vha, 0x7006,
> -			    "Failed slopw write %x (%x)\n", faddr, *dwptr);
> +			    "Failed slow write %x (%x)\n", faddr, *dwptr);
> 			break;
> 		}
> 	}
> diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
> index feb054c688a3..b109716d44fb 100644
> --- a/drivers/scsi/qla2xxx/qla_target.c
> +++ b/drivers/scsi/qla2xxx/qla_target.c
> @@ -7220,8 +7220,7 @@ qlt_probe_one_stage1(struct scsi_qla_host *base_vha, struct qla_hw_data *ha)
> 	if (!QLA_TGT_MODE_ENABLED())
> 		return;
> 
> -	if  ((ql2xenablemsix == 0) || IS_QLA83XX(ha) || IS_QLA27XX(ha) ||
> -	    IS_QLA28XX(ha)) {
> +	if  (ha->mqenable || IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
> 		ISP_ATIO_Q_IN(base_vha) = &ha->mqiobase->isp25mq.atio_q_in;
> 		ISP_ATIO_Q_OUT(base_vha) = &ha->mqiobase->isp25mq.atio_q_out;
> 	} else {
> -- 
> 2.23.1
> 

--
Himanshu Madhani	 Oracle Linux Engineering


  reply	other threads:[~2022-01-03  0:52 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24  7:06 [PATCH 00/16] qla2xxx misc bug fixes and features Nilesh Javali
2021-12-24  7:06 ` [PATCH 01/16] qla2xxx: Refactor asynchronous command initialization Nilesh Javali
2022-01-03  0:32   ` Himanshu Madhani
2021-12-24  7:06 ` [PATCH 02/16] qla2xxx: Implement ref count for srb Nilesh Javali
2021-12-28 11:12   ` Daniel Wagner
2021-12-28 11:31     ` Saurav Kashyap
2022-01-03  0:32   ` Himanshu Madhani
2022-01-03  3:56     ` Saurav Kashyap
2022-01-04 12:32       ` Daniel Wagner
2022-01-05  1:55         ` Himanshu Madhani
2022-01-05  4:28           ` Saurav Kashyap
2021-12-24  7:06 ` [PATCH 03/16] qla2xxx: fix stuck session in gpdb Nilesh Javali
2022-01-03  0:34   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 04/16] qla2xxx: Fix warning message due to adisc is being flush Nilesh Javali
2022-01-03  0:37   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 05/16] qla2xxx: Fix premature hw access after pci error Nilesh Javali
2022-01-03  0:39   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 06/16] qla2xxx: Fix scheduling while atomic Nilesh Javali
2022-01-03  0:41   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 07/16] qla2xxx: add retry for exec fw Nilesh Javali
2022-01-03  0:42   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 08/16] qla2xxx: Show wrong FDMI data for 64G adaptor Nilesh Javali
2022-01-03  0:43   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 09/16] qla2xxx: Add ql2xnvme_queues module param to configure number of NVME queues Nilesh Javali
2022-01-03  0:44   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 10/16] qla2xxx: Fix device reconnect in loop topology Nilesh Javali
2022-01-03  0:46   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 11/16] qla2xxx: fix warning for missing error code Nilesh Javali
2022-01-03  0:46   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 12/16] qla2xxx: edif: Fix clang warning Nilesh Javali
2022-01-03  0:47   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 13/16] qla2xxx: Fix T10 PI tag escape and IP guard options for 28XX adapters Nilesh Javali
2022-01-03  0:48   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 14/16] qla2xxx: Add devid's and conditionals for 28xx Nilesh Javali
2022-01-03  0:52   ` Himanshu Madhani [this message]
2022-01-03 16:02     ` Nilesh Javali
2022-01-06  0:55     ` Arun Easi
2021-12-24  7:07 ` [PATCH 15/16] qla2xxx: Suppress a kernel complaint in qla_create_qpair() Nilesh Javali
2022-01-03  0:52   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 16/16] qla2xxx: Update version to 10.02.07.300-k Nilesh Javali
2022-01-03  0:53   ` Himanshu Madhani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46AAF253-04F5-4B3D-AD45-FFAE1FD43D4F@oracle.com \
    --to=himanshu.madhani@oracle.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.