LKML Archive mirror
 help / color / mirror / Atom feed
From: Suganath prabu Subaramani <suganath-prabu.subramani@avagotech.com>
To: JBottomley@Parallels.com, jejb@kernel.org, hch@infradead.org
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	Sathya.Prakash@avagotech.com, kashyap.desai@avagotech.com,
	krishnaraddi.mankani@avagotech.com, linux-kernel@vger.kernel.org,
	suganath-prabu.subramani@avagotech.com,
	chaitra.basappa@avagotech.com, sreekanth.reddy@avagotech.com
Subject: [mpt3sas driver 02/10] mpt3sas: Used IEEE SGL instead of MPI SGL while framing a SMP Passthrough request message.
Date: Thu, 28 Jan 2016 12:06:59 +0530	[thread overview]
Message-ID: <1453963027-19770-3-git-send-email-suganath-prabu.subramani@avagotech.com> (raw)
In-Reply-To: <1453963027-19770-1-git-send-email-suganath-prabu.subramani@avagotech.com>

From: Suganath prabu Subramani <suganath-prabu.subramani@avagotech.com>

As driver was using MPI SGL while framing the SMP Passthrough request
message due to which firmware unable to post the Reply Data in the host
memory and timeout is observed for this SMP Passthrough request message
and so unable to perform phy disable operation.

Signed-off-by: Suganath prabu Subramani <suganath-prabu.subramani@avagotech.com>
Signed-off-by: Chaitra P B <chaitra.basappa@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_transport.c | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_transport.c b/drivers/scsi/mpt3sas/mpt3sas_transport.c
index ca36d7e..df08aeb 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_transport.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_transport.c
@@ -1418,7 +1418,6 @@ _transport_expander_phy_control(struct MPT3SAS_ADAPTER *ioc,
 	u32 ioc_state;
 	unsigned long timeleft;
 	void *psge;
-	u32 sgl_flags;
 	u8 issue_reset = 0;
 	void *data_out = NULL;
 	dma_addr_t data_out_dma;
@@ -1507,24 +1506,10 @@ _transport_expander_phy_control(struct MPT3SAS_ADAPTER *ioc,
 	    cpu_to_le16(sizeof(struct phy_error_log_request));
 	psge = &mpi_request->SGL;
 
-	/* WRITE sgel first */
-	sgl_flags = (MPI2_SGE_FLAGS_SIMPLE_ELEMENT |
-	    MPI2_SGE_FLAGS_END_OF_BUFFER | MPI2_SGE_FLAGS_HOST_TO_IOC);
-	sgl_flags = sgl_flags << MPI2_SGE_FLAGS_SHIFT;
-	ioc->base_add_sg_single(psge, sgl_flags |
-	    sizeof(struct phy_control_request), data_out_dma);
-
-	/* incr sgel */
-	psge += ioc->sge_size;
-
-	/* READ sgel last */
-	sgl_flags = (MPI2_SGE_FLAGS_SIMPLE_ELEMENT |
-	    MPI2_SGE_FLAGS_LAST_ELEMENT | MPI2_SGE_FLAGS_END_OF_BUFFER |
-	    MPI2_SGE_FLAGS_END_OF_LIST);
-	sgl_flags = sgl_flags << MPI2_SGE_FLAGS_SHIFT;
-	ioc->base_add_sg_single(psge, sgl_flags |
-	    sizeof(struct phy_control_reply), data_out_dma +
-	    sizeof(struct phy_control_request));
+	ioc->build_sg(ioc, psge, data_out_dma,
+			    sizeof(struct phy_control_request),
+	    data_out_dma + sizeof(struct phy_control_request),
+	    sizeof(struct phy_control_reply));
 
 	dtransportprintk(ioc, pr_info(MPT3SAS_FMT
 		"phy_control - send to sas_addr(0x%016llx), phy(%d), opcode(%d)\n",
-- 
1.8.3.1

  parent reply	other threads:[~2016-01-28  6:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28  6:36 [mpt3sas driver patches 00/10] mpt3sas driver enhancements and Suganath prabu Subaramani
2016-01-28  6:36 ` [mpt3sas driver 01/10] mpt3sas: Added support for high port count HBA variants Suganath prabu Subaramani
2016-02-04 14:14   ` Tomas Henzl
2016-01-28  6:36 ` Suganath prabu Subaramani [this message]
2016-01-28  9:16   ` [mpt3sas driver 02/10] mpt3sas: Used IEEE SGL instead of MPI SGL while framing a SMP Passthrough request message Christoph Hellwig
2016-02-04 14:18   ` Tomas Henzl
2016-01-28  6:37 ` [mpt3sas driver 03/10] mpt3sas: Fix static analyzer(coverity) tool identified defects Suganath prabu Subaramani
2016-02-04 14:18   ` Tomas Henzl
2016-01-28  6:37 ` [mpt3sas driver 04/10] mpt3sas: Never block the Enclosure device Suganath prabu Subaramani
2016-02-04 14:19   ` Tomas Henzl
2016-01-28  6:37 ` [mpt3sas driver 05/10] mpt3sas: Make use of additional HighPriority credit message frames for sending SCSI IO's Suganath prabu Subaramani
2016-02-04 14:24   ` Tomas Henzl
2016-01-28  6:37 ` [mpt3sas driver 06/10] mpt3sas: Added smp_affinity_enable module parameter Suganath prabu Subaramani
2016-02-04 15:01   ` Tomas Henzl
2016-02-08  6:01     ` Suganath Prabu Subramani
2016-02-08 12:38       ` Tomas Henzl
2016-01-28  6:37 ` [mpt3sas driver 07/10] mpt3sas: Add support for configurable Chain Frame Size Suganath prabu Subaramani
2016-02-04 15:05   ` Tomas Henzl
2016-02-05  7:56     ` Sreekanth Reddy
2016-02-08 13:55       ` Tomas Henzl
2016-01-28  6:37 ` [mpt3sas driver 08/10] mpt3sas: Updated MPI Header to 2.00.42 Suganath prabu Subaramani
2016-02-04 15:06   ` Tomas Henzl
2016-01-28  6:37 ` [mpt3sas driver 09/10] mpt3sas: Fix for Asynchronous completion of timedout IO and task abort of timedout IO Suganath prabu Subaramani
2016-02-04 15:07   ` Tomas Henzl
2016-01-28  6:37 ` [mpt3sas driver 10/10] mpt3sas: Updating mpt3sas driver version to 12.100.00.00 Suganath prabu Subaramani
2016-02-04 15:08   ` Tomas Henzl
2016-02-05  2:04 ` [mpt3sas driver patches 00/10] mpt3sas driver enhancements and Martin K. Petersen
2016-02-10 17:20 ` 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=1453963027-19770-3-git-send-email-suganath-prabu.subramani@avagotech.com \
    --to=suganath-prabu.subramani@avagotech.com \
    --cc=JBottomley@Parallels.com \
    --cc=Sathya.Prakash@avagotech.com \
    --cc=chaitra.basappa@avagotech.com \
    --cc=hch@infradead.org \
    --cc=jejb@kernel.org \
    --cc=kashyap.desai@avagotech.com \
    --cc=krishnaraddi.mankani@avagotech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sreekanth.reddy@avagotech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).