All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kashyap Desai <kashyap.desai@broadcom.com>
To: linux-scsi@vger.kernel.org
Cc: martin.petersen@oracle.com, thenzl@redhat.com,
	jejb@linux.vnet.ibm.com, sumit.saxena@broadcom.com,
	Kiran Kumar Kasturi <kiran-kumar.kasturi@broadcom.com>
Subject: [PATCH v3 2/8] megaraid_sas: Send correct PhysArm to FW for R1 VD downgrade
Date: Fri, 21 Oct 2016 06:33:30 -0700	[thread overview]
Message-ID: <1477056816-7058-3-git-send-email-kashyap.desai@broadcom.com> (raw)
In-Reply-To: <1477056816-7058-1-git-send-email-kashyap.desai@broadcom.com>

This patch fixes the issue of wrong PhysArm was sent to firmware for R1
VD downgrade.

Signed-off-by: Kiran Kumar Kasturi <kiran-kumar.kasturi@broadcom.com>
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
---
 drivers/scsi/megaraid/megaraid_sas_fp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c
index e413113..f237d00 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
@@ -782,7 +782,8 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
 			(raid->regTypeReqOnRead != REGION_TYPE_UNUSED))))
 			pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE;
 		else if (raid->level == 1) {
-			pd = MR_ArPdGet(arRef, physArm + 1, map);
+			physArm = physArm + 1;
+			pd = MR_ArPdGet(arRef, physArm, map);
 			if (pd != MR_PD_INVALID)
 				*pDevHandle = MR_PdDevHandleGet(pd, map);
 		}
@@ -879,7 +880,8 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
 			pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE;
 		else if (raid->level == 1) {
 			/* Get alternate Pd. */
-			pd = MR_ArPdGet(arRef, physArm + 1, map);
+			physArm = physArm + 1;
+			pd = MR_ArPdGet(arRef, physArm, map);
 			if (pd != MR_PD_INVALID)
 				/* Get dev handle from Pd */
 				*pDevHandle = MR_PdDevHandleGet(pd, map);
-- 
2.4.11


  parent reply	other threads:[~2016-10-21 13:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 13:33 [PATCH v3 0/7] megaraid_sas: Updates for scsi-next Kashyap Desai
2016-10-21 13:33 ` [PATCH v3 1/8] megaraid_sas: For SRIOV enabled firmware, ensure VF driver waits for 30secs before reset Kashyap Desai
2016-10-21 13:33 ` Kashyap Desai [this message]
2016-10-21 13:33 ` [PATCH v3 3/8] megaraid_sas: Do not fire DCMDs during PCI shutdown/detach Kashyap Desai
2016-10-24 14:34   ` Hannes Reinecke
2016-10-21 13:33 ` [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware Kashyap Desai
2016-10-21 16:02   ` Tomas Henzl
2016-10-24 14:35   ` Hannes Reinecke
2016-10-24 14:35     ` Hannes Reinecke
2016-10-24 16:00   ` Ewan D. Milne
2016-10-25  1:33   ` Martin K. Petersen
2016-10-21 13:33 ` [PATCH v3 5/8] megaraid_sas: Send SYNCHRONIZE_CACHE for VD " Kashyap Desai
2016-10-21 15:59   ` Tomas Henzl
2016-10-24 14:36   ` Hannes Reinecke
2016-10-24 16:00   ` Ewan D. Milne
2016-10-21 13:33 ` [PATCH v3 6/8] MAINTAINERS: Update megaraid maintainers list Kashyap Desai
2016-11-08 14:50   ` Tomas Henzl
2016-10-21 13:33 ` [PATCH v3 7/8] megaraid_sas: Do not set MPI2_TYPE_CUDA for JBOD FP path for FW which does not support JBOD sequence map Kashyap Desai
2016-10-21 13:33 ` [PATCH v3 8/8] megaraid_sas: driver version upgrade Kashyap Desai
2016-10-24 14:36   ` Hannes Reinecke
2016-11-08 23:05   ` Martin K. Petersen
2016-10-25  2:01 ` [PATCH v3 0/7] megaraid_sas: Updates for scsi-next 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=1477056816-7058-3-git-send-email-kashyap.desai@broadcom.com \
    --to=kashyap.desai@broadcom.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kiran-kumar.kasturi@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sumit.saxena@broadcom.com \
    --cc=thenzl@redhat.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.