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 01/14] qla2xxx: Add host attribute to trigger MPI hang
Date: Thu, 5 Aug 2021 15:21:05 +0000	[thread overview]
Message-ID: <D4B29795-29A3-4DFD-82DF-9FFEE8BCDB59@oracle.com> (raw)
In-Reply-To: <20210805102005.20183-2-njavali@marvell.com>



> On Aug 5, 2021, at 5:19 AM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> From: Arun Easi <aeasi@marvell.com>
> 
> Add a mechanism to trigger MPI pause for debugging purpose.
> 
> Signed-off-by: Arun Easi <aeasi@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
> drivers/scsi/qla2xxx/qla_attr.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
> index 22191e9a04a0..4a0a5b4e688d 100644
> --- a/drivers/scsi/qla2xxx/qla_attr.c
> +++ b/drivers/scsi/qla2xxx/qla_attr.c
> @@ -1887,6 +1887,30 @@ qla2x00_port_speed_show(struct device *dev, struct device_attribute *attr,
> 	return scnprintf(buf, PAGE_SIZE, "%s\n", spd[ha->link_data_rate]);
> }
> 
> +static ssize_t
> +qla2x00_mpi_pause_store(struct device *dev,
> +	struct device_attribute *attr, const char *buf, size_t count)
> +{
> +	scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
> +	int rval = 0;
> +
> +	if (sscanf(buf, "%d", &rval) != 1)
> +		return -EINVAL;
> +
> +	ql_log(ql_log_warn, vha, 0x7089, "Pausing MPI...\n");
> +
> +	rval = qla83xx_wr_reg(vha, 0x002012d4, 0x30000001);
> +
> +	if (rval != QLA_SUCCESS) {
> +		ql_log(ql_log_warn, vha, 0x708a, "Unable to pause MPI.\n");
> +		count = 0;
> +	}
> +
> +	return count;
> +}
> +
> +static DEVICE_ATTR(mpi_pause, S_IWUSR, NULL, qla2x00_mpi_pause_store);
> +
> /* ----- */
> 
> static ssize_t
> @@ -2482,6 +2506,7 @@ struct device_attribute *qla2x00_host_attrs[] = {
> 	&dev_attr_fw_attr,
> 	&dev_attr_dport_diagnostics,
> 	&dev_attr_edif_doorbell,
> +	&dev_attr_mpi_pause,
> 	NULL, /* reserve for qlini_mode */
> 	NULL, /* reserve for ql2xiniexchg */
> 	NULL, /* reserve for ql2xexchoffld */
> -- 
> 2.19.0.rc0
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


  reply	other threads:[~2021-08-05 15:21 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 10:19 [PATCH 00/14] qla2xxx driver bug fixes Nilesh Javali
2021-08-05 10:19 ` [PATCH 01/14] qla2xxx: Add host attribute to trigger MPI hang Nilesh Javali
2021-08-05 15:21   ` Himanshu Madhani [this message]
2021-08-05 10:19 ` [PATCH 02/14] qla2xxx: Change %p to %px in the log messages Nilesh Javali
2021-08-05 15:21   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 03/14] qla2xxx: adjust request/response queue size for 28xx Nilesh Javali
2021-08-05 15:21   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 04/14] qla2xxx: Changes to support FCP2 Target Nilesh Javali
2021-08-05 15:24   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 05/14] qla2xxx: Show OS name and version in FDMI-1 Nilesh Javali
2021-08-05 15:25   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 06/14] qla2xxx: fix debug print of 64G link speed Nilesh Javali
2021-08-05 15:28   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 07/14] qla2xxx: fix port type info Nilesh Javali
2021-08-05 15:34   ` Himanshu Madhani
2021-08-05 10:19 ` [PATCH 08/14] qla2xxx: fix unsafe removal from link list Nilesh Javali
2021-08-05 15:38   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 09/14] qla2xxx: fix npiv create erroneous error Nilesh Javali
2021-08-05 15:42   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 10/14] qla2xxx: suppress unnecessary log messages during login Nilesh Javali
2021-08-05 15:43   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 11/14] qla2xxx: Changes to support kdump kernel Nilesh Javali
2021-08-05 15:52   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 12/14] qla2xxx: Changes to support kdump kernel for NVMe BFS Nilesh Javali
2021-08-05 15:52   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 13/14] qla2xxx: Sync queue idx with queue_pair_map idx Nilesh Javali
2021-08-05 15:56   ` Himanshu Madhani
2021-08-05 10:20 ` [PATCH 14/14] qla2xxx: Update version to 10.02.06.100-k Nilesh Javali
2021-08-05 15:58   ` Himanshu Madhani
2021-08-05 16:22     ` Nilesh Javali

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=D4B29795-29A3-4DFD-82DF-9FFEE8BCDB59@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.