From: adam radford Date: Sat, 7 Jan 2012 01:02:26 +0000 (-0800) Subject: [SCSI] megaraid_sas: Fix reglockFlags for degraded raid5/6 X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=0d4c24cc1bf62e75fdb31e73c68daa50e0877564;p=deliverable%2Flinux.git [SCSI] megaraid_sas: Fix reglockFlags for degraded raid5/6 The following patch for megaraid_sas fixes the reglockFlags field for degraded raid5/6 for MR9360/9380, which will result in a performance improvement. Signed-off-by: Adam Radford Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c index 5255dd688aca..294abb0defa6 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fp.c +++ b/drivers/scsi/megaraid/megaraid_sas_fp.c @@ -282,7 +282,9 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow, else { *pDevHandle = MR_PD_INVALID; /* set dev handle as invalid. */ if ((raid->level >= 5) && - (instance->pdev->device != PCI_DEVICE_ID_LSI_INVADER)) + ((instance->pdev->device != PCI_DEVICE_ID_LSI_INVADER) || + (instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER && + raid->regTypeReqOnRead != REGION_TYPE_UNUSED))) pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE; else if (raid->level == 1) { /* Get alternate Pd. */