Sumit.Saxena | 22 May 2013 09:06

[PATCH 12/12] megaraid_sas : Changelog and driver version update

This patch updates the megaraid_sas driver version and updates Documentation/scsi/ChangeLog.megaraid_sas.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> lsi.com>
---
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas
index 09673c7..cc92ca8 100644
--- a/Documentation/scsi/ChangeLog.megaraid_sas
+++ b/Documentation/scsi/ChangeLog.megaraid_sas
 <at>  <at>  -1,3 +1,25  <at>  <at> 
+Release Date    : Wed. May 15, 2013 17:00:00 PST 2013 -
+			(emaild-id:megaraidlinux <at> lsi.com)
+			Adam Radford
+			Kashyap Desai
+			Sumit Saxena
+Current Version : 06.600.18.00-rc1
+Old Version     : 06.506.00.00-rc1
+    1. Return DID_ERROR for scsi io, when controller is in critical h/w error.
+    2. Fix the interrupt mask for Gen2 controller.
+    3. Update balance count in driver to be in sync of firmware.
+    4. Free event detail memory without device ID check.
+    5. Set IO request timeout value provided by OS timeout for Tape devices.
+    6. Add support for MegaRAID Fury (device ID-0x005f) 12Gb/s controllers.
+    7. Add support to display Customer branding details in syslog.
+    8. Set IoFlags to enable Fast Path for JBODs for Invader/Fury(12 Gb/s)
+    controllers.
+    9. Add support for Extended MSI-x vectors for Invader and Fury(12Gb/s
+    HBA).
+    10.Add support for Uneven Span PRL11.
+    11.Add support to differentiate between iMR and MR Firmware.
(Continue reading)

Sumit.Saxena | 22 May 2013 09:05

[PATCH 11/12] megaraid_sas : Add support to differentiate between iMR vs MR Firmware

Add support to differentiate between iMR(no external memory) and MR(with external memory) controllers.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> lsi.com>
---
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index dab46c2..1c2b1b9 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
 <at>  <at>  -1533,6 +1533,7  <at>  <at>  struct megasas_instance {
 	struct mutex reset_mutex;
 	int throttlequeuedepth;
 	u8 mask_interrupts;
+	u8 is_imr;
 };

 enum {
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 21f0434..adb3911 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
 <at>  <at>  -1641,10 +1641,7  <at>  <at>  megasas_check_and_restore_queue_depth(struct megasas_instance *instance)

 		spin_lock_irqsave(instance->host->host_lock, flags);
 		instance->flag &= ~MEGASAS_FW_BUSY;
-		if ((instance->pdev->device ==
-			PCI_DEVICE_ID_LSI_SAS0073SKINNY) ||
-			(instance->pdev->device ==
-			PCI_DEVICE_ID_LSI_SAS0071SKINNY)) {
+		if (instance->is_imr) {
(Continue reading)

Sumit.Saxena | 22 May 2013 09:05

[PATCH 10/12] megaraid_sas : Add support for Uneven Span PRL11

Add support for Uneven Span PRL11.

MegaRAID older Firmware does not support uneven span configuration for PRL11.
E.g User wants to create 34 Driver PRL11 config, it was not possible using old firmware,
since it was not supported configuration in old firmware

Old Firmware expect even number of Drives in each span and same number of physical drives at each span.
Considering above design, 17 Drives at Span-0 and 17 drives at span-1 was not possible.

Now, using this new feature Firmware and Driver both required changes.
New Firmware can allow user to create 16 Drives at span-0 and 18 Drives at span-1. This will allow user to
create 34 Drives Uneven span PRL11. 

RAID map is interface between Driver and FW to fetch all required fields(attributes) for each Virtual Drives.
Since legacy RAID map consider Even Span design, there was no place to keep Uneven span information in
existing Raid map.
Because of this limitation, for Uneven span VD, driver can not use RAID map.

This patch address the changes required in Driver to support Uneven span PRL11 support.
1. Driver will find if Firmware has UnevenSpanSupport or not by reading Controller Info.
2. If Firmware has UnvenSpan PRL11 support, then Driver will inform about its capability of handling
UnevenSpan PRL11 to the firmware.
3. Driver will update its copy of span info on each time Raid map update is called.
4. Follow different IO path if it is Uneven Span. (For Uneven Span, Driver uses Span Set info to find relavent
fields for that particular
   Virtual Disk)

More verbose prints will be available by setting "SPAN_DEBUG" to 1 at compilation time.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
(Continue reading)

Sumit.Saxena | 22 May 2013 09:04

[PATCH 09/12] megaraid_sas : Add support for Extended MSI-x vectors for 12Gb/s controller

Add support for Extended MSI-x vectors for Invader and Fury(12Gb/s HBA).

This Driver will use more than 8 MSI-x support provided by Invader/Fury max upto 128 MSI-x.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> lsi.com>
---
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 474f79f..d430618 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
 <at>  <at>  -786,7 +786,7  <at>  <at>  struct megasas_ctrl_info {
 #define MEGASAS_INT_CMDS			32
 #define MEGASAS_SKINNY_INT_CMDS			5

-#define MEGASAS_MAX_MSIX_QUEUES			16
+#define MEGASAS_MAX_MSIX_QUEUES			128
 /*
  * FW can accept both 32 and 64 bit SGLs. We want to allocate 32/64 bit
  * SGLs based on the size of dma_addr_t
 <at>  <at>  -811,6 +811,11  <at>  <at>  struct megasas_ctrl_info {
 #define MFI_1068_PCSR_OFFSET			0x84
 #define MFI_1068_FW_HANDSHAKE_OFFSET		0x64
 #define MFI_1068_FW_READY			0xDDDD0000
+
+#define MR_MAX_REPLY_QUEUES_OFFSET              0X0000001F
+#define MR_MAX_REPLY_QUEUES_EXT_OFFSET          0X003FC000
+#define MR_MAX_REPLY_QUEUES_EXT_OFFSET_SHIFT    14
+#define MR_MAX_MSIX_REG_ARRAY                   16
 /*
(Continue reading)

Sumit.Saxena | 22 May 2013 09:03

[PATCH 08/12] megaraid_sas : Set IoFlags to enable Fast Path for JBODs for 12 Gb/s controllers

Set IoFlags to enable Fast Path for JBODs for Invader/Fury(12 Gb/s) controllers.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> lsi.com>
---
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 73aa68e..c60f478 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
 <at>  <at>  -1592,6 +1592,10  <at>  <at>  megasas_build_dcdb_fusion(struct megasas_instance *instance,
 		io_request->RaidContext.RAIDFlags =
 			MR_RAID_FLAGS_IO_SUB_TYPE_SYSTEM_PD <<
 			MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT;
+		if ((instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER) ||
+			(instance->pdev->device == PCI_DEVICE_ID_LSI_FURY))
+			io_request->IoFlags |=
+				MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH;
 		cmd->request_desc->SCSIIO.RequestFlags =
 			(MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY <<
 			 MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Sumit.Saxena | 22 May 2013 09:02

[PATCH 07/12] megaraid_sas : Add support to display Customer branding details in syslog

Add support to display Customer branding details in syslog.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> lsi.com>
---
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 64cc4d4..474f79f 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
 <at>  <at>  -52,6 +52,32  <at>  <at> 
 #define PCI_DEVICE_ID_LSI_FURY			0x005f

 /*
+ * Intel HBA SSDIDs
+ */
+#define MEGARAID_INTEL_RS3DC080_SSDID		0x9360
+#define MEGARAID_INTEL_RS3DC040_SSDID		0x9362
+#define MEGARAID_INTEL_RS3SC008_SSDID		0x9380
+#define MEGARAID_INTEL_RS3MC044_SSDID		0x9381
+#define MEGARAID_INTEL_RS3WC080_SSDID		0x9341
+#define MEGARAID_INTEL_RS3WC040_SSDID		0x9343
+
+/*
+ * Intel HBA branding
+ */
+#define MEGARAID_INTEL_RS3DC080_BRANDING	\
+	"Intel(R) RAID Controller RS3DC080"
+#define MEGARAID_INTEL_RS3DC040_BRANDING	\
+	"Intel(R) RAID Controller RS3DC040"
+#define MEGARAID_INTEL_RS3SC008_BRANDING	\
(Continue reading)

Sumit.Saxena | 22 May 2013 09:01

[PATCH 06/12] megaraid_sas : Add support for MegaRAID Fury (device ID-0x005f) 12Gb/s controllers

Add support for MegaRAID Fury (device ID-0x005f) 12Gb/s controllers.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> lsi.com>
---
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 408d254..64cc4d4 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
 <at>  <at>  -49,6 +49,7  <at>  <at> 
 #define	PCI_DEVICE_ID_LSI_SAS0071SKINNY		0x0071
 #define	PCI_DEVICE_ID_LSI_FUSION		0x005b
 #define PCI_DEVICE_ID_LSI_INVADER		0x005d
+#define PCI_DEVICE_ID_LSI_FURY			0x005f

 /*
  * =====================================
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 5beea2f..07dbeb8 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
 <at>  <at>  -122,6 +122,8  <at>  <at>  static struct pci_device_id megasas_pci_table[] = {
 	/* Fusion */
 	{PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_INVADER)},
 	/* Invader */
+	{PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FURY)},
+	/* Fury */
 	{}
 };

(Continue reading)

Sumit.Saxena | 22 May 2013 09:01

[PATCH 05/12] megaraid_sas : Set IO request timeout value provided by OS timeout for Tape devices

Set IO request timeout value provided by OS timeout for Tape devices.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> lsi.com>
---
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index a7d5668..750cbdf 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
 <at>  <at>  -1527,6 +1527,18  <at>  <at>  megasas_build_dcdb_fusion(struct megasas_instance *instance,
 			 MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
 		cmd->request_desc->SCSIIO.DevHandle =
 			local_map_ptr->raidMap.devHndlInfo[device_id].curDevHdl;
+		/*
+		 * If the command is for the tape device, set the
+		 * FP timeout to the os layer timeout value.
+		 */
+		if (scmd->device->type == TYPE_TAPE) {
+			if ((scmd->request->timeout / HZ) > 0xFFFF)
+				io_request->RaidContext.timeoutValue =
+					0xFFFF;
+			else
+				io_request->RaidContext.timeoutValue =
+					scmd->request->timeout / HZ;
+		}
 	} else {
 		io_request->Function  = MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST;
 		io_request->DevHandle = device_id;

--
(Continue reading)

Sumit.Saxena | 22 May 2013 09:00

[PATCH 04/12] megaraid_sas : Free event detail memory without device ID check

Free event detail memory from more common place, instead of doing it for limited device types.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
Signed-off-by: Adam Radford <aradford <at> gmail.com>
---
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index c79daf5..5beea2f 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
 <at>  <at>  -4599,10 +4599,6  <at>  <at>  static void megasas_detach_one(struct pci_dev *pdev)
 		break;
 	default:
 		megasas_release_mfi(instance);
-		pci_free_consistent(pdev,
-				    sizeof(struct megasas_evt_detail),
-				    instance->evt_detail,
-				    instance->evt_detail_h);
 		pci_free_consistent(pdev, sizeof(u32),
 				    instance->producer,
 				    instance->producer_h);
 <at>  <at>  -4612,6 +4608,9  <at>  <at>  static void megasas_detach_one(struct pci_dev *pdev)
 		break;
 	}

+	if (instance->evt_detail)
+		pci_free_consistent(pdev, sizeof(struct megasas_evt_detail),
+				instance->evt_detail, instance->evt_detail_h);
 	scsi_host_put(host);

 	pci_set_drvdata(pdev, NULL);
(Continue reading)

Sumit.Saxena | 22 May 2013 09:00

[PATCH 03/12] megaraid_sas : Update balance count in driver to be in sync of firmware

Update balance count in driver to be in sync of firmware.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> lsi.com>
---
diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c
index a11df82..b06a240 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
 <at>  <at>  -503,8 +503,9  <at>  <at>  u8 megasas_get_best_arm(struct LD_LOAD_BALANCE_INFO *lbInfo, u8 arm, u64 block,
 	diff1 = ABS_DIFF(block, lbInfo->last_accessed_block[1]);
 	bestArm = (diff0 <= diff1 ? 0 : 1);

-	if ((bestArm == arm && pend0 > pend1 + 16)  ||
-	    (bestArm != arm && pend1 > pend0 + 16))
+	/*Make balance count from 16 to 4 to keep driver in sync with Firmware*/
+	if ((bestArm == arm && pend0 > pend1 + 4)  ||
+	    (bestArm != arm && pend1 > pend0 + 4))
 		bestArm ^= 1;

 	/* Update the last accessed block on the correct pd */

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Sumit.Saxena | 22 May 2013 08:59

[PATCH 02/12] megaraid_sas : Fix the interrupt mask for Gen2 controller

Fix the interrupt mask for Gen2 controller.

Signed-off-by: Sumit Saxena <sumit.saxena <at> lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> lsi.com>
---
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 758ea2e..c79daf5 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
 <at>  <at>  -711,7 +711,7  <at>  <at>  megasas_clear_intr_gen2(struct megasas_register_set __iomem *regs)
 	 */
 	status = readl(&regs->outbound_intr_status);

-	if (status & MFI_GEN2_ENABLE_INTERRUPT_MASK) {
+	if (status & MFI_INTR_FLAG_REPLY_MESSAGE) {
 		mfiStatus = MFI_INTR_FLAG_REPLY_MESSAGE;
 	}
 	if (status & MFI_G2_OUTBOUND_DOORBELL_CHANGE_INTERRUPT) {

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane