summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradam radford <aradford@gmail.com>2012-01-06 17:02:26 -0800
committerJames Bottomley <JBottomley@Parallels.com>2012-01-16 11:26:49 +0400
commit0d4c24cc1bf62e75fdb31e73c68daa50e0877564 (patch)
tree6c141d870914d01bba1557bf10785528f41aa13b
parent775bf2773858c50d2acfcdf71889984be94e7037 (diff)
downloadop-kernel-dev-0d4c24cc1bf62e75fdb31e73c68daa50e0877564.zip
op-kernel-dev-0d4c24cc1bf62e75fdb31e73c68daa50e0877564.tar.gz
[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 <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c
index 5255dd6..294abb0 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. */
OpenPOWER on IntegriCloud