sumit.saxena | 31 Aug 13:54 2015

[PATCH v3 9/10] megaraid_sas : Code refactor for use of requestorId

Some of the code changes was proposed by David Binderman

Removed redudant check of requestorId. Redundant condition: instance.requestorId. 
Check for plasma firmware 1.11 or new restructured to support only for specific device id

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c |   35 +++++++++++++++--------------
 1 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 3a824cb..d2ebcdd 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
 <at>  <at>  -4842,18 +4842,22  <at>  <at>  static int megasas_init_fw(struct megasas_instance *instance)

 	}
 	if (ctrl_info->host_interface.SRIOV) {
-		if (!ctrl_info->adapterOperations2.activePassive)
-			instance->PlasmaFW111 = 1;
-
-		if (!instance->PlasmaFW111)
-			instance->requestorId =
-				ctrl_info->iov.requestorId;
-		else {
-			iovPtr = (struct IOV_111 *)((unsigned char *)ctrl_info + IOV_111_OFFSET);
-			instance->requestorId = iovPtr->requestorId;
+		instance->requestorId = ctrl_info->iov.requestorId;
+		if (instance->pdev->device == PCI_DEVICE_ID_LSI_PLASMA) {
(Continue reading)

sumit.saxena | 31 Aug 13:54 2015

[PATCH v3 10/10] megaraid_sas : Version upgrade

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
---
 drivers/scsi/megaraid/megaraid_sas.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index ccda60d..fc58ba3 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
 <at>  <at>  -35,8 +35,8  <at>  <at> 
 /*
  * MegaRAID SAS Driver meta data
  */
-#define MEGASAS_VERSION				"06.807.10.00-rc1"
-#define MEGASAS_RELDATE				"March 6, 2015"
+#define MEGASAS_VERSION				"06.808.14.00-rc1"
+#define MEGASAS_RELDATE				"Jul 31, 2015"

 /*
  * Device IDs
--

-- 
1.7.1

--
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

(Continue reading)

sumit.saxena | 31 Aug 13:54 2015

[PATCH v3 8/10] megaraid_sas : Fix validHandles check in io path

Syncro firmware supports round robin IO switch on dual path. For this driver 
use validHandles as a check for dual path. This check suppose to be > 1 (not > 2)

Without this patch, earlier driver code does not use dual path functionality.

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 1d73d30..1398950 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
 <at>  <at>  -1684,7 +1684,7  <at>  <at>  megasas_build_ldio_fusion(struct megasas_instance *instance,
 			scp->SCp.Status &= ~MEGASAS_LOAD_BALANCE_FLAG;

 		if ((raidLUN[0] == 1) &&
-			(local_map_ptr->raidMap.devHndlInfo[io_info.pd_after_lb].validHandles > 2)) {
+			(local_map_ptr->raidMap.devHndlInfo[io_info.pd_after_lb].validHandles > 1)) {
 			instance->dev_handle = !(instance->dev_handle);
 			io_info.devHandle =
 				local_map_ptr->raidMap.devHndlInfo[io_info.pd_after_lb].devHandle[instance->dev_handle];
--

-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
(Continue reading)

sumit.saxena | 31 Aug 13:53 2015

[PATCH v3 7/10] megaraid_sas : Print critical fw event message

Print firmware event in readable format. This will help user to track any
critical firmware event without any application support.

sample syslogd output -

megaraid_sas 0000:02:00.0: 8619 (491648347s/0x0020/WARN) - Controller temperature threshold
exceeded. This may indicate inadequate system cooling. Switching to low performance mode

Format of print is - "<pci_dev_id>: <sequence_number> (<timestamp>/<locale>/<class>) - <description>"

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
---
 drivers/scsi/megaraid/megaraid_sas.h      |   10 +++++
 drivers/scsi/megaraid/megaraid_sas_base.c |   61 +++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 5db31c6..ccda60d 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
 <at>  <at>  -273,6 +273,16  <at>  <at>  enum MFI_STAT {
 	MFI_STAT_INVALID_STATUS = 0xFF
 };

+enum mfi_evt_class {
+	MFI_EVT_CLASS_DEBUG =		-2,
+	MFI_EVT_CLASS_PROGRESS =	-1,
+	MFI_EVT_CLASS_INFO =		0,
+	MFI_EVT_CLASS_WARNING =		1,
(Continue reading)

sumit.saxena | 31 Aug 13:53 2015

[PATCH v3 6/10] megaraid_sas : Chip reset if driver fail to bring ioc ready

Patch which fix the issue reported as below.

http://marc.info/?l=linux-scsi&m=143694494104544&w=2

This patch will try to do chip reset from driver load time.
Driver load time, if firmware is not comming to ready state, driver try chip reset calling
adp_reset() callback. For fusion adapter, that call back was void, so it will not do any chip reset.

Now, using this patch megasas_adp_reset_fusion() will have chip reset logic for Fusion adapter.

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c |  145 +++++++++++++--------------
 1 files changed, 69 insertions(+), 76 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 78e252a..1d73d30 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
 <at>  <at>  -2509,6 +2509,70  <at>  <at>  static int
 megasas_adp_reset_fusion(struct megasas_instance *instance,
 			 struct megasas_register_set __iomem *regs)
 {
+	u32 host_diag, abs_state, retry;
+
+	/* Now try to reset the chip */
+	writel(MPI2_WRSEQ_FLUSH_KEY_VALUE, &instance->reg_set->fusion_seq_offset);
+	writel(MPI2_WRSEQ_1ST_KEY_VALUE, &instance->reg_set->fusion_seq_offset);
+	writel(MPI2_WRSEQ_2ND_KEY_VALUE, &instance->reg_set->fusion_seq_offset);
(Continue reading)

sumit.saxena | 31 Aug 13:52 2015

[PATCH v3 01/10] megaraid_sas : Synchronize driver headers with firmware APIs

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
Reviewed-by: Martin Petersen <martin.petersen <at> oracle.com>
---
 drivers/scsi/megaraid/megaraid_sas.h        |   18 ++++++++++++++----
 drivers/scsi/megaraid/megaraid_sas_fusion.h |    3 ++-
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 20c3754..b0d373d 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
 <at>  <at>  -973,7 +973,11  <at>  <at>  struct megasas_ctrl_info {

 	struct {
 #if defined(__BIG_ENDIAN_BITFIELD)
-		u32     reserved:12;
+		u32     reserved:8;
+		u32     supportExtendedSSCSize:1;
+		u32     supportDiskCacheSettingForSysPDs:1;
+		u32     supportCPLDUpdate:1;
+		u32     supportTTYLogCompression:1;
 		u32     discardCacheDuringLDDelete:1;
 		u32     supportSecurityonJBOD:1;
 		u32     supportCacheBypassModes:1;
 <at>  <at>  -1013,7 +1017,11  <at>  <at>  struct megasas_ctrl_info {
 		u32     supportCacheBypassModes:1;
 		u32     supportSecurityonJBOD:1;
 		u32     discardCacheDuringLDDelete:1;
-		u32     reserved:12;
(Continue reading)

sumit.saxena | 31 Aug 13:53 2015

[PATCH v3 04/10] megaraid_sas : Code cleanup-use local variable drv_ops inside megasas_ioc_init_fusion

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
Reviewed-by: Martin Petersen <martin.petersen <at> oracle.com>
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 016b245..2038aae 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
 <at>  <at>  -605,6 +605,7  <at>  <at>  megasas_ioc_init_fusion(struct megasas_instance *instance)
 	int i;
 	struct megasas_header *frame_hdr;
 	const char *sys_info;
+	MFI_CAPABILITIES *drv_ops;

 	fusion = instance->ctrl_context;

 <at>  <at>  -652,20 +653,19  <at>  <at>  megasas_ioc_init_fusion(struct megasas_instance *instance)
 	init_frame->cmd	= MFI_CMD_INIT;
 	init_frame->cmd_status = 0xFF;

+	drv_ops = (MFI_CAPABILITIES *) &(init_frame->driver_operations);
+
 	/* driver support Extended MSIX */
 	if ((instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER) ||
 		(instance->pdev->device == PCI_DEVICE_ID_LSI_FURY))
-		init_frame->driver_operations.
-			mfi_capabilities.support_additional_msix = 1;
(Continue reading)

sumit.saxena | 31 Aug 13:53 2015

[PATCH v3 5/10] megaraid_sas : Support for max_io_size 1MB

Driver will expose max sge = 256 (earlier it was 64), if firmware support 
extended IO size upto 1M. 

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
Reviewed-by: Martin Petersen <martin.petersen <at> oracle.com>
---
 drivers/scsi/megaraid/megaraid_sas.h        |    7 ++-
 drivers/scsi/megaraid/megaraid_sas_fusion.c |   61 ++++++++++++++++++++-------
 drivers/scsi/megaraid/megaraid_sas_fusion.h |   10 ++++-
 3 files changed, 58 insertions(+), 20 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 811fc4a..5db31c6 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
 <at>  <at>  -1239,7 +1239,8  <at>  <at>  union megasas_sgl_frame {
 typedef union _MFI_CAPABILITIES {
 	struct {
 #if   defined(__BIG_ENDIAN_BITFIELD)
-		u32     reserved:24;
+		u32     reserved:23;
+		u32     support_ext_io_size:1;
 		u32	support_ext_queue_depth:1;
 		u32     security_protocol_cmds_fw:1;
 		u32     support_core_affinity:1;
 <at>  <at>  -1257,7 +1258,8  <at>  <at>  typedef union _MFI_CAPABILITIES {
 		u32     support_core_affinity:1;
 		u32     security_protocol_cmds_fw:1;
 		u32	support_ext_queue_depth:1;
(Continue reading)

sumit.saxena | 31 Aug 13:53 2015

[PATCH v3 3/10] megaraid_sas : Jbod sequence number support

Implemented JBOD map which will provide quick access for JBOD path and also provide sequence number.
This will help hardware to fail command to the FW in case of any sequence mismatch.

Fast Path IO for JBOD will refer JBOD map (which has sequence number per JBOD devices) 
instead of Raid map.  Earlier, driver use Raid map to get device handle for fast path IO,
which does not have sequence number information. Now, driver will use JBOD map for the same purpose.
As part of error handling, if JBOD map is failed/not supported by firmware; driver will continue legacy behavior.

Now there will be three IO path for JBOD (syspd)

JBOD map with sequence number (Fast Path)
Raid map without sequence number (Fast Path)
FW path via h/w exceptional queue deliberately setup devhandle 0xFFFF (FW path).

Relevant data structures:
-Driver send new DCMD MR_DCMD_SYSTEM_PD_MAP_GET_INFO for this purpose.
-struct MR_PD_CFG_SEQ- This structure represent map of single physical device.
-struct MR_PD_CFG_SEQ_NUM_SYNC- This structure represent whole JBOD map in general(size, count of
sysPDs configured,
 struct MR_PD_CFG_SEQ of syspD with 0 index).

-JBOD sequnce map size is: sizeof(struct MR_PD_CFG_SEQ_NUM_SYNC) + (sizeof(struct MR_PD_CFG_SEQ) *
(MAX_PHYSICAL_DEVICES - 1))
 which is allocated while setting up JBOD map at driver load time.

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
Reviewed-by: Martin Petersen <martin.petersen <at> oracle.com>
---
 drivers/scsi/megaraid/megaraid_sas.h        |   13 +++-
(Continue reading)

sumit.saxena | 31 Aug 13:53 2015

[PATCH v3 02/10] megaraid_sas : Increase timeout to 60 secs for abort frames during shutdown

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
Reviewed-by: Martin Petersen <martin.petersen <at> oracle.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index eaa81e5..1bcb59a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
 <at>  <at>  -5506,10 +5506,10  <at>  <at>  static void megasas_shutdown_controller(struct megasas_instance *instance,

 	if (instance->aen_cmd)
 		megasas_issue_blocked_abort_cmd(instance,
-			instance->aen_cmd, 30);
+			instance->aen_cmd, MEGASAS_BLOCKED_CMD_TIMEOUT);
 	if (instance->map_update_cmd)
 		megasas_issue_blocked_abort_cmd(instance,
-			instance->map_update_cmd, 30);
+			instance->map_update_cmd, MEGASAS_BLOCKED_CMD_TIMEOUT);
 	dcmd = &cmd->frame->dcmd;

 	memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE);
--

-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
(Continue reading)

sumit.saxena | 31 Aug 13:52 2015

[PATCH v3 0/10] megaraid_sas : Updates for scsi for-next

MegaRaid driver changes. This patch set is rebased on top of below commit-

commit da0dc9fb4e6b0ad5a947c27a3c48985f6a2377eb
Author: Bjorn Helgaas <bhelgaas <at> google.com>
Date:   Tue Jul 7 15:52:45 2015 -0500

    megaraid_sas: fix whitespace errors

Please consider this patch set for next kernel release.

Signed-off-by: Sumit Saxena <sumit.saxena <at> avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai <at> avagotech.com>
---
[PATCH v3 00/10] megaraid_sas : Updates for scsi for-next.
[PATCH v3 01/10] megaraid_sas : Synchronize driver headers with firmware APIs.
[PATCH v3 02/10] megaraid_sas : Increase timeout to 60 secs for abort frames during shutdown.
[PATCH v3 03/10] megaraid_sas : Jbod sequence number support.
[PATCH v3 04/10] megaraid_sas : Code cleanup-use local variable drv_ops inside megasas_ioc_init_fusion.
[PATCH v3 05/10] megaraid_sas : Support for max_io_size 1MB.
[PATCH v3 06/10] megaraid_sas : Chip reset if driver fail to bring ioc ready.
[PATCH v3 07/10] megaraid_sas : Print critical fw event message.
[PATCH v3 08/10] megaraid_sas : Fix validHandles check in io path.
[PATCH v3 09/10] megaraid_sas : Code refactor for use of requestorId.
[PATCH v3 10/10] megaraid_sas : Version upgrade.

--
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

(Continue reading)


Gmane