linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes:
@ 2017-01-23  9:56 Chaitra P B
  2017-01-23  9:56 ` [PATCH v3 1/4] mpt3sas: Added print to notify cable running at a degraded speed Chaitra P B
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Chaitra P B @ 2017-01-23  9:56 UTC (permalink / raw)
  To: JBottomley, jejb, hch
  Cc: martin.petersen, linux-scsi, Sathya.Prakash, kashyap.desai,
	krishnaraddi.mankani, linux-kernel, suganath-prabu.subramani,
	chaitra.basappa, sreekanth.reddy

Here is the change list:
Posting 4 patches for mpt3sas driver enhancement and defect fixes.
  * Handle cable event for notifying degraded speed.
  * Performance improvement for Crusader.
  * Fix Firmware fault state 0x2100 during heavy 4K RR
    FIO stress test.
  * Updated driver version to 15.100.00.00

Chaitra P B (4):
  mpt3sas: Added print to notify cable running at a degraded
    speed.
  mpt3sas: Fix for Crusader to achieve product targets with SAS
    devices.
  mpt3sas: Fix Firmware fault state 0x2100 during heavy 4K RR       
    FIO stress test.
  mpt3sas: Updating driver version to v15.100.00.00

 drivers/scsi/mpt3sas/mpi/mpi2_ioc.h  |    2 +
 drivers/scsi/mpt3sas/mpt3sas_base.c  |   20 ++++++++++++
 drivers/scsi/mpt3sas/mpt3sas_base.h  |    7 ++--
 drivers/scsi/mpt3sas/mpt3sas_ctl.c   |    4 ++-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c |   56 +++++++++++++++++++++++++++-------
 5 files changed, 74 insertions(+), 15 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 1/4] mpt3sas: Added print to notify cable running at a degraded speed.
  2017-01-23  9:56 [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Chaitra P B
@ 2017-01-23  9:56 ` Chaitra P B
  2017-01-26  8:23   ` Johannes Thumshirn
  2017-01-23  9:56 ` [PATCH v3 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices Chaitra P B
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Chaitra P B @ 2017-01-23  9:56 UTC (permalink / raw)
  To: JBottomley, jejb, hch
  Cc: martin.petersen, linux-scsi, Sathya.Prakash, kashyap.desai,
	krishnaraddi.mankani, linux-kernel, suganath-prabu.subramani,
	chaitra.basappa, sreekanth.reddy

Driver processes the event MPI26_EVENT_ACTIVE_CABLE_DEGRADED
when a cable is present and is running at a degraded speed
(below the SAS3 12 Gb/s rate). Prints added
to inform the user that the cable is not running at
optimal speed.

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
---
 drivers/scsi/mpt3sas/mpi/mpi2_ioc.h  |    2 ++
 drivers/scsi/mpt3sas/mpt3sas_scsih.c |   25 +++++++++++++++++--------
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h b/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h
index 8bae305..af4be40 100644
--- a/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h
+++ b/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h
@@ -624,6 +624,8 @@ typedef struct _MPI26_EVENT_DATA_ACTIVE_CABLE_EXCEPT {
 
 /* defines for ReasonCode field */
 #define MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER     (0x00)
+#define MPI26_EVENT_ACTIVE_CABLE_PRESENT                (0x01)
+#define MPI26_EVENT_ACTIVE_CABLE_DEGRADED               (0x02)
 
 /*Hard Reset Received Event data */
 
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 75f3fce..2c6a689 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -8028,15 +8028,24 @@ mpt3sas_scsih_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index,
 	case MPI2_EVENT_ACTIVE_CABLE_EXCEPTION:
 		ActiveCableEventData =
 		    (Mpi26EventDataActiveCableExcept_t *) mpi_reply->EventData;
-		if (ActiveCableEventData->ReasonCode ==
-				MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER) {
-			pr_info(MPT3SAS_FMT "Currently an active cable with ReceptacleID %d",
-			    ioc->name, ActiveCableEventData->ReceptacleID);
-			pr_info("cannot be powered and devices connected to this active cable");
-			pr_info("will not be seen. This active cable");
-			pr_info("requires %d mW of power",
-			    ActiveCableEventData->ActiveCablePowerRequirement);
+		switch (ActiveCableEventData->ReasonCode) {
+		case MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER:
+			pr_notice(MPT3SAS_FMT "Receptacle ID %d: This active cable"
+				  " requires %d mW of power\n", ioc->name,
+			     ActiveCableEventData->ReceptacleID,
+			     ActiveCableEventData->ActiveCablePowerRequirement);
+			pr_notice(MPT3SAS_FMT "Receptacle ID %d: Devices connected"
+				  " to this active cable will not be seen\n",
+			     ioc->name, ActiveCableEventData->ReceptacleID);
+			break;
+
+		case MPI26_EVENT_ACTIVE_CABLE_DEGRADED:
+			pr_notice(MPT3SAS_FMT "ReceptacleID %d: This cable",
+				ioc->name, ActiveCableEventData->ReceptacleID);
+			pr_notice(" is not running at an optimal speed(12 Gb/s)\n");
+			break;
 		}
+
 		break;
 
 	default: /* ignore the rest */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices.
  2017-01-23  9:56 [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Chaitra P B
  2017-01-23  9:56 ` [PATCH v3 1/4] mpt3sas: Added print to notify cable running at a degraded speed Chaitra P B
@ 2017-01-23  9:56 ` Chaitra P B
  2017-01-24 12:02   ` Johannes Thumshirn
  2017-01-26  8:23   ` Johannes Thumshirn
  2017-01-23  9:56 ` [PATCH v3 3/4] mpt3sas: Fix Firmware fault state 0x2100 during heavy 4K RR FIO stress test Chaitra P B
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 10+ messages in thread
From: Chaitra P B @ 2017-01-23  9:56 UTC (permalink / raw)
  To: JBottomley, jejb, hch
  Cc: martin.petersen, linux-scsi, Sathya.Prakash, kashyap.desai,
	krishnaraddi.mankani, linux-kernel, suganath-prabu.subramani,
	chaitra.basappa, sreekanth.reddy

Small glitch/degraded performance in Crusader is improved with SAS
drives by removing unnecessary spinlocks while clearing scsi command
in drivers internal lookup table.

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c  |    1 +
 drivers/scsi/mpt3sas/mpt3sas_base.h  |    1 +
 drivers/scsi/mpt3sas/mpt3sas_ctl.c   |    4 +++-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c |   31 ++++++++++++++++++++++++++++---
 4 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index f00ef88..722fab9 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -5522,6 +5522,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
 		goto out_free_resources;
 
 	ioc->non_operational_loop = 0;
+	ioc->got_task_abort_from_ioctl = 0;
 	return 0;
 
  out_free_resources:
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index dcb33f4..83cfa16 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -1000,6 +1000,7 @@ struct MPT3SAS_ADAPTER {
 	u8		broadcast_aen_busy;
 	u16		broadcast_aen_pending;
 	u8		shost_recovery;
+	u8		got_task_abort_from_ioctl;
 
 	struct mutex	reset_in_progress_mutex;
 	spinlock_t	ioc_reset_in_progress_lock;
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index 95f0f24..02fe1c4 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -826,16 +826,18 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
 			"TASK_MGMT: handle(0x%04x), task_type(0x%02x)\n",
 			ioc->name,
 		    le16_to_cpu(tm_request->DevHandle), tm_request->TaskType));
-
+		ioc->got_task_abort_from_ioctl = 1;
 		if (tm_request->TaskType ==
 		    MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK ||
 		    tm_request->TaskType ==
 		    MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK) {
 			if (_ctl_set_task_mid(ioc, &karg, tm_request)) {
 				mpt3sas_base_free_smid(ioc, smid);
+				ioc->got_task_abort_from_ioctl = 0;
 				goto out;
 			}
 		}
+		ioc->got_task_abort_from_ioctl = 0;
 
 		if (test_bit(device_handle, ioc->device_remove_in_progress)) {
 			dtmprintk(ioc, pr_info(MPT3SAS_FMT
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 2c6a689..cc05e4f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -1074,6 +1074,26 @@ _scsih_scsi_lookup_get(struct MPT3SAS_ADAPTER *ioc, u16 smid)
 }
 
 /**
+ * __scsih_scsi_lookup_get_clear - returns scmd entry without
+ *						holding any lock.
+ * @ioc: per adapter object
+ * @smid: system request message index
+ *
+ * Returns the smid stored scmd pointer.
+ * Then will dereference the stored scmd pointer.
+ */
+static inline struct scsi_cmnd *
+__scsih_scsi_lookup_get_clear(struct MPT3SAS_ADAPTER *ioc,
+		u16 smid)
+{
+	struct scsi_cmnd *scmd = NULL;
+
+	swap(scmd, ioc->scsi_lookup[smid - 1].scmd);
+
+	return scmd;
+}
+
+/**
  * _scsih_scsi_lookup_get_clear - returns scmd entry
  * @ioc: per adapter object
  * @smid: system request message index
@@ -1088,8 +1108,7 @@ _scsih_scsi_lookup_get_clear(struct MPT3SAS_ADAPTER *ioc, u16 smid)
 	struct scsi_cmnd *scmd;
 
 	spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
-	scmd = ioc->scsi_lookup[smid - 1].scmd;
-	ioc->scsi_lookup[smid - 1].scmd = NULL;
+	scmd = __scsih_scsi_lookup_get_clear(ioc, smid);
 	spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);
 
 	return scmd;
@@ -4659,7 +4678,13 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
 	unsigned long flags;
 
 	mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply);
-	scmd = _scsih_scsi_lookup_get_clear(ioc, smid);
+
+	if (ioc->broadcast_aen_busy || ioc->pci_error_recovery ||
+			ioc->got_task_abort_from_ioctl)
+		scmd = _scsih_scsi_lookup_get_clear(ioc, smid);
+	else
+		scmd = __scsih_scsi_lookup_get_clear(ioc, smid);
+
 	if (scmd == NULL)
 		return 1;
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 3/4] mpt3sas: Fix Firmware fault state 0x2100 during heavy 4K RR FIO stress test.
  2017-01-23  9:56 [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Chaitra P B
  2017-01-23  9:56 ` [PATCH v3 1/4] mpt3sas: Added print to notify cable running at a degraded speed Chaitra P B
  2017-01-23  9:56 ` [PATCH v3 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices Chaitra P B
@ 2017-01-23  9:56 ` Chaitra P B
  2017-01-24 12:06   ` Johannes Thumshirn
  2017-01-23  9:56 ` [PATCH v3 4/4] mpt3sas: Updating driver version to v15.100.00.00 Chaitra P B
  2017-02-01  3:04 ` [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Martin K. Petersen
  4 siblings, 1 reply; 10+ messages in thread
From: Chaitra P B @ 2017-01-23  9:56 UTC (permalink / raw)
  To: JBottomley, jejb, hch
  Cc: martin.petersen, linux-scsi, Sathya.Prakash, kashyap.desai,
	krishnaraddi.mankani, linux-kernel, suganath-prabu.subramani,
	chaitra.basappa, sreekanth.reddy

Due existence of loop in the IO path our HBA will receive heavy IOs and
also as driver is not updating the Reply Post Host Index frequently, So
there will be a high chance that our Firmware unable to find any free entry
in the Reply Post Descriptor Queue (i.e. Queue overflow occurs) and can
observe 0x2100 firmware fault.
So to fix this, we have defined a thresh hold value. After continuously
processing this thresh hold number of reply descriptors driver will update
the Reply Descriptor Host Index so that this thresh hold number of reply
descriptors entries will be freed and these entries will be available for
firmware and we won't observe this Firmware fault. We have defined this
threshold value as 1/3rd of the hba queue depth.

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 722fab9..a3fe1fb 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1040,6 +1040,25 @@ _base_interrupt(int irq, void *bus_id)
 		    reply_q->reply_post_free[reply_q->reply_post_host_index].
 		    Default.ReplyFlags & MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK;
 		completed_cmds++;
+		/* Update the reply post host index after continuously
+		 * processing the threshold number of Reply Descriptors.
+		 * So that FW can find enough entries to post the Reply
+		 * Descriptors in the reply descriptor post queue.
+		 */
+		if (completed_cmds > ioc->hba_queue_depth/3) {
+			if (ioc->combined_reply_queue) {
+				writel(reply_q->reply_post_host_index |
+						((msix_index  & 7) <<
+						 MPI2_RPHI_MSIX_INDEX_SHIFT),
+				    ioc->replyPostRegisterIndex[msix_index/8]);
+			} else {
+				writel(reply_q->reply_post_host_index |
+						(msix_index <<
+						 MPI2_RPHI_MSIX_INDEX_SHIFT),
+						&ioc->chip->ReplyPostHostIndex);
+			}
+			completed_cmds = 1;
+		}
 		if (request_desript_type == MPI2_RPY_DESCRIPT_FLAGS_UNUSED)
 			goto out;
 		if (!reply_q->reply_post_host_index)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 4/4] mpt3sas: Updating driver version to v15.100.00.00
  2017-01-23  9:56 [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Chaitra P B
                   ` (2 preceding siblings ...)
  2017-01-23  9:56 ` [PATCH v3 3/4] mpt3sas: Fix Firmware fault state 0x2100 during heavy 4K RR FIO stress test Chaitra P B
@ 2017-01-23  9:56 ` Chaitra P B
  2017-02-01  3:04 ` [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Martin K. Petersen
  4 siblings, 0 replies; 10+ messages in thread
From: Chaitra P B @ 2017-01-23  9:56 UTC (permalink / raw)
  To: JBottomley, jejb, hch
  Cc: martin.petersen, linux-scsi, Sathya.Prakash, kashyap.desai,
	krishnaraddi.mankani, linux-kernel, suganath-prabu.subramani,
	chaitra.basappa, sreekanth.reddy

Updated driver version to "15.100.00.00"

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/mpt3sas/mpt3sas_base.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index 83cfa16..4ab634f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -73,9 +73,9 @@
 #define MPT3SAS_DRIVER_NAME		"mpt3sas"
 #define MPT3SAS_AUTHOR "Avago Technologies <MPT-FusionLinux.pdl@avagotech.com>"
 #define MPT3SAS_DESCRIPTION	"LSI MPT Fusion SAS 3.0 Device Driver"
-#define MPT3SAS_DRIVER_VERSION		"14.101.00.00"
-#define MPT3SAS_MAJOR_VERSION		14
-#define MPT3SAS_MINOR_VERSION		101
+#define MPT3SAS_DRIVER_VERSION		"15.100.00.00"
+#define MPT3SAS_MAJOR_VERSION		15
+#define MPT3SAS_MINOR_VERSION		100
 #define MPT3SAS_BUILD_VERSION		0
 #define MPT3SAS_RELEASE_VERSION	00
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices.
  2017-01-23  9:56 ` [PATCH v3 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices Chaitra P B
@ 2017-01-24 12:02   ` Johannes Thumshirn
  2017-01-26  8:23   ` Johannes Thumshirn
  1 sibling, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2017-01-24 12:02 UTC (permalink / raw)
  To: Chaitra P B
  Cc: JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, suganath-prabu.subramani, sreekanth.reddy

On Mon, Jan 23, 2017 at 03:26:08PM +0530, Chaitra P B wrote:
> Small glitch/degraded performance in Crusader is improved with SAS
> drives by removing unnecessary spinlocks while clearing scsi command
> in drivers internal lookup table.
> 
> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
> Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c  |    1 +
>  drivers/scsi/mpt3sas/mpt3sas_base.h  |    1 +
>  drivers/scsi/mpt3sas/mpt3sas_ctl.c   |    4 +++-
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c |   31 ++++++++++++++++++++++++++++---
>  4 files changed, 33 insertions(+), 4 deletions(-)

[...]

> + * __scsih_scsi_lookup_get_clear - returns scmd entry without
> + *						holding any lock.
> + * @ioc: per adapter object
> + * @smid: system request message index
> + *
> + * Returns the smid stored scmd pointer.
> + * Then will dereference the stored scmd pointer.
> + */
> +static inline struct scsi_cmnd *
> +__scsih_scsi_lookup_get_clear(struct MPT3SAS_ADAPTER *ioc,
> +		u16 smid)
> +{
> +	struct scsi_cmnd *scmd = NULL;
> +
> +	swap(scmd, ioc->scsi_lookup[smid - 1].scmd);
> +
> +	return scmd;
> +}
> +
> +/**
>   * _scsih_scsi_lookup_get_clear - returns scmd entry

That's only 50% of what I've meant:

static inline struct scsi_cmnd *
_scsih_scsi_lookup_get_clear(struct MPT3SAS_ADAPTER *ioc, u16 smid)
{
	unsigned long flags;
	struct scsi_cmnd *scmnd;

	spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
-	scmd = ioc->scsi_lookup[smid - 1].scmd;
-	ioc->scsi_lookup[smid - 1].scmd = NULL;
+	scmnd = __scsih_scsi_lookup_get_clear(ioc, smid);
	spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);

	return scmnd;
}


[...]

Byte,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 3/4] mpt3sas: Fix Firmware fault state 0x2100 during heavy 4K RR FIO stress test.
  2017-01-23  9:56 ` [PATCH v3 3/4] mpt3sas: Fix Firmware fault state 0x2100 during heavy 4K RR FIO stress test Chaitra P B
@ 2017-01-24 12:06   ` Johannes Thumshirn
  0 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2017-01-24 12:06 UTC (permalink / raw)
  To: Chaitra P B
  Cc: JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, suganath-prabu.subramani, sreekanth.reddy

On Mon, Jan 23, 2017 at 03:26:09PM +0530, Chaitra P B wrote:
> Due existence of loop in the IO path our HBA will receive heavy IOs and
> also as driver is not updating the Reply Post Host Index frequently, So
> there will be a high chance that our Firmware unable to find any free entry
> in the Reply Post Descriptor Queue (i.e. Queue overflow occurs) and can
> observe 0x2100 firmware fault.
> So to fix this, we have defined a thresh hold value. After continuously
> processing this thresh hold number of reply descriptors driver will update
> the Reply Descriptor Host Index so that this thresh hold number of reply
> descriptors entries will be freed and these entries will be available for
> firmware and we won't observe this Firmware fault. We have defined this
> threshold value as 1/3rd of the hba queue depth.
> 
> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
> Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c |   19 +++++++++++++++++++
>  1 files changed, 19 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 722fab9..a3fe1fb 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -1040,6 +1040,25 @@ _base_interrupt(int irq, void *bus_id)
>  		    reply_q->reply_post_free[reply_q->reply_post_host_index].
>  		    Default.ReplyFlags & MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK;
>  		completed_cmds++;
> +		/* Update the reply post host index after continuously
> +		 * processing the threshold number of Reply Descriptors.
> +		 * So that FW can find enough entries to post the Reply
> +		 * Descriptors in the reply descriptor post queue.
> +		 */
> +		if (completed_cmds > ioc->hba_queue_depth/3) {
> +			if (ioc->combined_reply_queue) {
> +				writel(reply_q->reply_post_host_index |
> +						((msix_index  & 7) <<
> +						 MPI2_RPHI_MSIX_INDEX_SHIFT),
> +				    ioc->replyPostRegisterIndex[msix_index/8]);
> +			} else {
> +				writel(reply_q->reply_post_host_index |
> +						(msix_index <<
> +						 MPI2_RPHI_MSIX_INDEX_SHIFT),
> +						&ioc->chip->ReplyPostHostIndex);
> +			}
> +			completed_cmds = 1;
> +		}
>  		if (request_desript_type == MPI2_RPY_DESCRIPT_FLAGS_UNUSED)
>  			goto out;
>  		if (!reply_q->reply_post_host_index)

Appart from the fact, that you're trying to get as far to the right of
the screen as possible,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices.
  2017-01-23  9:56 ` [PATCH v3 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices Chaitra P B
  2017-01-24 12:02   ` Johannes Thumshirn
@ 2017-01-26  8:23   ` Johannes Thumshirn
  1 sibling, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2017-01-26  8:23 UTC (permalink / raw)
  To: Chaitra P B
  Cc: JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, suganath-prabu.subramani, sreekanth.reddy

On Mon, Jan 23, 2017 at 03:26:08PM +0530, Chaitra P B wrote:
> Small glitch/degraded performance in Crusader is improved with SAS
> drives by removing unnecessary spinlocks while clearing scsi command
> in drivers internal lookup table.
> 
> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
> Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
> ---


Sorry for misreading the patch, it's exactly what I've requestd.

Therefore:
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/4] mpt3sas: Added print to notify cable running at a degraded speed.
  2017-01-23  9:56 ` [PATCH v3 1/4] mpt3sas: Added print to notify cable running at a degraded speed Chaitra P B
@ 2017-01-26  8:23   ` Johannes Thumshirn
  0 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2017-01-26  8:23 UTC (permalink / raw)
  To: Chaitra P B
  Cc: JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, suganath-prabu.subramani, sreekanth.reddy

On Mon, Jan 23, 2017 at 03:26:07PM +0530, Chaitra P B wrote:
> Driver processes the event MPI26_EVENT_ACTIVE_CABLE_DEGRADED
> when a cable is present and is running at a degraded speed
> (below the SAS3 12 Gb/s rate). Prints added
> to inform the user that the cable is not running at
> optimal speed.
> 
> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
> Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
> ---


Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes:
  2017-01-23  9:56 [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Chaitra P B
                   ` (3 preceding siblings ...)
  2017-01-23  9:56 ` [PATCH v3 4/4] mpt3sas: Updating driver version to v15.100.00.00 Chaitra P B
@ 2017-02-01  3:04 ` Martin K. Petersen
  4 siblings, 0 replies; 10+ messages in thread
From: Martin K. Petersen @ 2017-02-01  3:04 UTC (permalink / raw)
  To: Chaitra P B
  Cc: JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, suganath-prabu.subramani, sreekanth.reddy

>>>>> "Chaitra" == Chaitra P B <chaitra.basappa@broadcom.com> writes:

Chaitra> Here is the change list: Posting 4 patches for mpt3sas driver
Chaitra> enhancement and defect fixes.  * Handle cable event for
Chaitra> notifying degraded speed.  * Performance improvement for
Chaitra> Crusader.  * Fix Firmware fault state 0x2100 during heavy 4K RR
Chaitra> FIO stress test.  * Updated driver version to 15.100.00.00

Applied to 4.11/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-02-01  3:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23  9:56 [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Chaitra P B
2017-01-23  9:56 ` [PATCH v3 1/4] mpt3sas: Added print to notify cable running at a degraded speed Chaitra P B
2017-01-26  8:23   ` Johannes Thumshirn
2017-01-23  9:56 ` [PATCH v3 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices Chaitra P B
2017-01-24 12:02   ` Johannes Thumshirn
2017-01-26  8:23   ` Johannes Thumshirn
2017-01-23  9:56 ` [PATCH v3 3/4] mpt3sas: Fix Firmware fault state 0x2100 during heavy 4K RR FIO stress test Chaitra P B
2017-01-24 12:06   ` Johannes Thumshirn
2017-01-23  9:56 ` [PATCH v3 4/4] mpt3sas: Updating driver version to v15.100.00.00 Chaitra P B
2017-02-01  3:04 ` [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).