Linux-SCSI Archive on lore.kernel.org
 help / color / Atom feed
From: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
To: martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, sreekanth.reddy@broadcom.com,
	sathya.prakash@broadcom.com,
	Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Subject: [PATCH 1/7] mpt3sas: Memset config_cmds.reply buffer with zeros
Date: Thu, 30 Jul 2020 13:33:43 +0530
Message-ID: <1596096229-3341-2-git-send-email-suganath-prabu.subramani@broadcom.com> (raw)
In-Reply-To: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com>

Currently config_cmds.reply buffer is not memset to zero before
posting config page request message.
In some cases, for the current config request, the previous config
reply is getting processed and we will observe PageType mismatch
between request to reply buffer. It will be difficult to debug this
type of issue and it confuses by thinking that HBA Firmware itself
posted the wrong config reply.
So it is better to memset the config_cmds.reply buffer with zeros
before issuing the config request.

Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
---
 drivers/scsi/mpt3sas/mpt3sas_config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c b/drivers/scsi/mpt3sas/mpt3sas_config.c
index 62ddf53..17c7abf 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_config.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_config.c
@@ -372,7 +372,7 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
 	}
 
 	r = 0;
-	memset(mpi_reply, 0, sizeof(Mpi2ConfigReply_t));
+	memset(ioc->config_cmds.reply, 0, sizeof(Mpi2ConfigReply_t));
 	ioc->config_cmds.status = MPT3_CMD_PENDING;
 	config_request = mpt3sas_base_get_msg_frame(ioc, smid);
 	ioc->config_cmds.smid = smid;
-- 
2.26.2


  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30  8:03 [PATCH 0/7] mpt3sas: Enhancements and bug fixes Suganath Prabu S
2020-07-30  8:03 ` Suganath Prabu S [this message]
2020-07-30  8:03 ` [PATCH 2/7] mpt3sas: Dump system registers for debugging Suganath Prabu S
2020-07-30  8:03 ` [PATCH 3/7] mpt3sas: Cancel the running work during host reset Suganath Prabu S
2020-07-30  8:03 ` [PATCH 4/7] mpt3sas: Rename and export interrupt mask/unmask fn's Suganath Prabu S
2020-07-30  8:03 ` [PATCH 5/7] mpt3sas: Added helper functions to check any cmd is outstanding on Target and LUN Suganath Prabu S
2020-07-30  8:03 ` [PATCH 6/7] mpt3sas: Postprocessing of target and LUN reset Suganath Prabu S
2020-07-30  8:03 ` [PATCH 7/7] mpt3sas: Update driver version to 35.100.00.00 Suganath Prabu S
2020-08-13  2:36 ` [PATCH 0/7] mpt3sas: Enhancements and bug fixes Martin K. Petersen
2020-08-18  3:11 ` Martin K. Petersen

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=1596096229-3341-2-git-send-email-suganath-prabu.subramani@broadcom.com \
    --to=suganath-prabu.subramani@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.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

Linux-SCSI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-scsi/0 linux-scsi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-scsi linux-scsi/ https://lore.kernel.org/linux-scsi \
		linux-scsi@vger.kernel.org
	public-inbox-index linux-scsi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-scsi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git