All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] megaraid_sas: Fix reglockFlags for degraded raid5/6
@ 2012-01-07  1:02 adam radford
  0 siblings, 0 replies; only message in thread
From: adam radford @ 2012-01-07  1:02 UTC (permalink / raw)
  To: linux-scsi, Bo.Yang

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

James/linux-scsi,

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>

diff -Naur scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_fp.c
scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_fp.c
--- scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_fp.c	2012-02-06
12:50:20.000000000 -0800
+++ scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_fp.c	2012-01-06
14:58:15.364307850 -0800
@@ -282,7 +282,9 @@
 	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. */

[-- Attachment #2: megaraid_sas.patch1 --]
[-- Type: application/octet-stream, Size: 803 bytes --]

diff -Naur scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_fp.c scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_fp.c
--- scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_fp.c	2012-02-06 12:50:20.000000000 -0800
+++ scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_fp.c	2012-01-06 14:58:15.364307850 -0800
@@ -282,7 +282,9 @@
 	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. */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-07  1:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-07  1:02 [PATCH 1/4] megaraid_sas: Fix reglockFlags for degraded raid5/6 adam radford

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.