]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: megaraid_sas: set pd_after_lb from MR_BuildRaidContext and initialize pDevHandl...
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Fri, 10 Feb 2017 08:59:24 +0000 (00:59 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 21:06:06 +0000 (14:06 -0700)
Orabug: 26096381

Issue is limited for Syncro firmware where pd_after_lb is not set but is
accidentally used.  Not a functional issue, but results in low
performance due to improper load balancing between two LUNs.

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit b41c0a4aa7c0fc1f98648c020358598498d48f06)
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
Reviewed-by: Dhaval Giani <dhaval.giani@oracle.com>
Conflicts:
drivers/scsi/megaraid/megaraid_sas_fp.c

drivers/scsi/megaraid/megaraid_sas_fp.c

index 7e32590652ee3c8ee78dcf111e99efdc47d2bd39..37efebc25b092509e252f3eb37b54a1a30d644ac 100644 (file)
@@ -942,6 +942,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
        struct fusion_context *fusion;
 
        fusion = instance->ctrl_context;
+       *pDevHandle = cpu_to_le16(MR_DEVHANDLE_INVALID);
 
        /*Get row and span from io_info for Uneven Span IO.*/
        row         = io_info->start_row;
@@ -977,7 +978,6 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
                                MR_PdDevHandleGet(r1_alt_pd, map);
                }
        } else {
-               *pDevHandle = cpu_to_le16(MR_PD_INVALID);
                if ((raid->level >= 5) &&
                        ((fusion->adapter_type == THUNDERBOLT_SERIES)  ||
                        ((fusion->adapter_type == INVADER_SERIES) &&
@@ -1002,6 +1002,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
                        (span << RAID_CTX_SPANARM_SPAN_SHIFT) | physArm;
                io_info->span_arm = pRAID_Context->span_arm;
        }
+       io_info->pd_after_lb = pd;
        return retval;
 }
 
@@ -1037,7 +1038,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
        struct fusion_context *fusion;
 
        fusion = instance->ctrl_context;
-
+       *pDevHandle = cpu_to_le16(MR_DEVHANDLE_INVALID);
 
        row =  mega_div64_32(stripRow, raid->rowDataSize);
 
@@ -1087,8 +1088,6 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
                                MR_PdDevHandleGet(r1_alt_pd, map);
                }
        } else {
-               /* set dev handle as invalid. */
-               *pDevHandle = cpu_to_le16(MR_PD_INVALID);
                if ((raid->level >= 5) &&
                        ((fusion->adapter_type == THUNDERBOLT_SERIES)  ||
                        ((fusion->adapter_type == INVADER_SERIES) &&
@@ -1115,6 +1114,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
                        (span << RAID_CTX_SPANARM_SPAN_SHIFT) | physArm;
                io_info->span_arm = pRAID_Context->span_arm;
        }
+       io_info->pd_after_lb = pd;
        return retval;
 }