summaryrefslogtreecommitdiff
path: root/drivers/scsi/megaraid/megaraid_sas_fp.c
diff options
context:
space:
mode:
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>2017-02-10 00:59:03 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2017-02-13 07:26:21 -0500
commit8bf7c65d379a6d923dfebb50eb04c2407e4762ed (patch)
treec0b42c6c57a398a1a541c9c802d2c770dfd5bbf4 /drivers/scsi/megaraid/megaraid_sas_fp.c
parentf6c0d55c5b91c0d626d65aebee1a0d6b0a61851d (diff)
downloadlwn-8bf7c65d379a6d923dfebb50eb04c2407e4762ed.tar.gz
lwn-8bf7c65d379a6d923dfebb50eb04c2407e4762ed.zip
scsi: megaraid_sas: raid 1 fast path code optimize
No functional change. Code refactor. Remove function megasas_fpio_to_ldio as we never require to convert fpio to ldio because of frame unavailability. Grab extra frame of raid 1 write fast path before it creates first frame as Fast Path. Removed is_raid_1_fp_write flag as raid 1 write fast path command is decided using r1_alt_dev_handle only. Move resetting megasas_cmd_fusion fields at common function megasas_return_cmd_fusion. Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.desai@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>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_fp.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fp.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c
index f1384b01b3d3..24258afb207f 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
@@ -1338,20 +1338,8 @@ MR_BuildRaidContext(struct megasas_instance *instance,
ref_in_start_stripe, io_info,
pRAID_Context, map);
/* If IO on an invalid Pd, then FP is not possible.*/
- if (io_info->devHandle == cpu_to_le16(MR_PD_INVALID))
+ if (io_info->devHandle == MR_DEVHANDLE_INVALID)
io_info->fpOkForIo = FALSE;
- /* if FP possible, set the SLUD bit in
- * regLockFlags for ventura
- */
- else if ((instance->is_ventura) && (!isRead) &&
- (raid->writeMode == MR_RL_WRITE_BACK_MODE) &&
- (raid->capability.fp_cache_bypass_capable))
- ((struct RAID_CONTEXT_G35 *) pRAID_Context)->routing_flags.bits.sld = 1;
- /* set raid 1/10 fast path write capable bit in io_info */
- if (io_info->fpOkForIo &&
- (io_info->r1_alt_dev_handle != MR_PD_INVALID) &&
- (raid->level == 1) && !isRead)
- io_info->is_raid_1_fp_write = 1;
return retval;
} else if (isRead) {
uint stripIdx;