All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/20] mpt3sas: driver update
@ 2015-06-12  9:42 Sreekanth Reddy
  2015-06-12  9:42 ` [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support Sreekanth Reddy
                   ` (19 more replies)
  0 siblings, 20 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

This patch set contains all the features and defect fixes from Phase4 to Phase8.
Please review this patch set and consider these patches for next kernel release.

Sreekanth Reddy (20):
  [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96
    MSIX vector support
  [SCSI] mpt3sas: Get IOC_FACTS information using handshake protocol
    only after HBA card gets into READY or Operational state.
  [SCSI] mpt3sas: Don't block the drive when drive addition under the
    control of SML
  [SCSI] mpt3sas: Remove redundancy code while freeing the controller
    resources.
  [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.
  [SCSI] mpt3sas: Provides the physical location of sas drives
  [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00
  [SCSI] mpt3sas: Update MPI2 strings to MPI2.5
  [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header
    files
  [SCSI] mpt3sas: Add branding string support for OEM's HBA
  [SCSI] mpt3sas: Add branding string support for OEM custom HBA
  [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00
  [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
  [SCSI] mpt3sas: Complete the SCSI command with  DID_RESET status for
    log_info value 0x0x32010081
  [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping
    of scatter gather list fails for a SCSI command
  [SCSI] mpt3sas: Added support for customer specific branding
  [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of
    create_singlethread_workqueue() API
  [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address
    with dma_map_single() API
  [SCSI] mpt3sas: When device is blocked followed by unblock fails,
    unfreeze the I/Os
  [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00

 drivers/scsi/mpt3sas/mpi/mpi2.h          |   8 +-
 drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h     |  52 ++++-
 drivers/scsi/mpt3sas/mpi/mpi2_ioc.h      |   4 +-
 drivers/scsi/mpt3sas/mpi/mpi2_tool.h     |   4 +-
 drivers/scsi/mpt3sas/mpt3sas_base.c      | 284 ++++++++++++++++++++++---
 drivers/scsi/mpt3sas/mpt3sas_base.h      |  48 ++++-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c     | 344 ++++++++++++++++++++++++++-----
 drivers/scsi/mpt3sas/mpt3sas_transport.c |  22 +-
 8 files changed, 662 insertions(+), 104 deletions(-)

-- 
2.0.2


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

* [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-12 11:09   ` Johannes Thumshirn
  2015-06-12  9:42 ` [PATCH 02/20] [SCSI] mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state Sreekanth Reddy
                   ` (18 subsequent siblings)
  19 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

In this patch, increased the number of MSIX vector support for SAS3 C0 HBAs to up-to 96.

Following are changes that are done in this patch
1. Support this feature only for SAS3 C0 cards and also only when reply post free queue count is greater than 8.
2. Instead of using single ReplyPostHostIndex system interface, here 12 ReplyPostHostIndex system interfaces are used. reply post free queues numbered from 0 to 7 use the first ReplyPostHostIndex system interface to update its corresponding ReplyPostHostIndex values, reply post free queues numbered from 8 to 15 will use the second ReplyPostHostIndex system interface and so on. These 12 ReplyPostHostIndex system interfaces address are saved in the array replyPostRegisterIndex[].
3. Update the ReplyPostHostIndex value of corresponding reply post free queue in the (its msix_index/8)th entry of replyPostRegisterIndex[] array after processing the reply post descriptor.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 70 +++++++++++++++++++++++++++++++++----
 drivers/scsi/mpt3sas/mpt3sas_base.h |  7 +++-
 2 files changed, 69 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 14a781b..c13a365 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -83,7 +83,7 @@ static int msix_disable = -1;
 module_param(msix_disable, int, 0);
 MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
 
-static int max_msix_vectors = 8;
+static int max_msix_vectors = -1;
 module_param(max_msix_vectors, int, 0);
 MODULE_PARM_DESC(max_msix_vectors,
 	" max msix vectors - (default=8)");
@@ -1009,8 +1009,15 @@ _base_interrupt(int irq, void *bus_id)
 	}
 
 	wmb();
-	writel(reply_q->reply_post_host_index | (msix_index <<
-	    MPI2_RPHI_MSIX_INDEX_SHIFT), &ioc->chip->ReplyPostHostIndex);
+	if (ioc->msix96_vector) {
+		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);
+	}
 	atomic_dec(&reply_q->busy);
 	return IRQ_HANDLED;
 }
@@ -1560,8 +1567,6 @@ _base_check_enable_msix(struct MPT3SAS_ADAPTER *ioc)
 
 	pci_read_config_word(ioc->pdev, base + 2, &message_control);
 	ioc->msix_vector_count = (message_control & 0x3FF) + 1;
-	if (ioc->msix_vector_count > 8)
-		ioc->msix_vector_count = 8;
 	dinitprintk(ioc, pr_info(MPT3SAS_FMT
 		"msix is supported, vector_count(%d)\n",
 		ioc->name, ioc->msix_vector_count));
@@ -1880,6 +1885,31 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
 	if (r)
 		goto out_fail;
 
+	/* Use the Combined reply queue feature only for SAS3 C0 HBAs and
+	 * also only when reply queue count is greater than 8
+	 */
+	if (ioc->msix96_vector && ioc->reply_queue_count > 8) {
+		/* If this is an 96 vector supported device,
+		set up ReplyPostIndex addresses */
+		ioc->replyPostRegisterIndex = kcalloc(12,
+			sizeof(resource_size_t *), GFP_KERNEL);
+		if (!ioc->replyPostRegisterIndex) {
+			dfailprintk(ioc, printk(MPT3SAS_FMT
+			"allocation for reply Post Register Index failed!!!\n",
+								   ioc->name));
+			r = -ENOMEM;
+			goto out_fail;
+		}
+
+		for (i = 0; i < 12; i++) {
+			ioc->replyPostRegisterIndex[i] = (resource_size_t *)
+				((u8 *)&ioc->chip->Doorbell +
+				MPI25_SUP_REPLY_POST_HOST_INDEX_OFFSET +
+				(i * 0x10));
+		}
+	} else
+		ioc->msix96_vector = 0;
+
 	list_for_each_entry(reply_q, &ioc->reply_queue_list, list)
 		pr_info(MPT3SAS_FMT "%s: IRQ %d\n",
 		    reply_q->name,  ((ioc->msix_enable) ? "PCI-MSI-X enabled" :
@@ -1901,6 +1931,8 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
 	pci_release_selected_regions(ioc->pdev, ioc->bars);
 	pci_disable_pcie_error_reporting(pdev);
 	pci_disable_device(pdev);
+	if (ioc->msix96_vector)
+		kfree(ioc->replyPostRegisterIndex);
 	return r;
 }
 
@@ -4522,8 +4554,16 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
 
 	/* initialize reply post host index */
 	list_for_each_entry(reply_q, &ioc->reply_queue_list, list) {
-		writel(reply_q->msix_index << MPI2_RPHI_MSIX_INDEX_SHIFT,
-		    &ioc->chip->ReplyPostHostIndex);
+		if (ioc->msix96_vector) {
+			writel((reply_q->msix_index & 7)<<
+			   MPI2_RPHI_MSIX_INDEX_SHIFT,
+			   ioc->replyPostRegisterIndex[reply_q->msix_index/8]);
+		} else {
+			writel(reply_q->msix_index <<
+				MPI2_RPHI_MSIX_INDEX_SHIFT,
+					&ioc->chip->ReplyPostHostIndex);
+		}
+
 		if (!_base_is_controller_msix_enabled(ioc))
 			goto skip_init_reply_post_host_index;
 	}
@@ -4577,6 +4617,9 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
 	_base_free_irq(ioc);
 	_base_disable_msix(ioc);
 
+	if (ioc->msix96_vector)
+		kfree(ioc->replyPostRegisterIndex);
+
 	if (ioc->chip_phys && ioc->chip)
 		iounmap(ioc->chip);
 	ioc->chip_phys = 0;
@@ -4600,6 +4643,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
 {
 	int r, i;
 	int cpu_id, last_cpu_id = 0;
+	u8 revision;
 
 	dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
 	    __func__));
@@ -4618,6 +4662,18 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
 		r = -ENOMEM;
 		goto out_free_resources;
 	}
+	/* Check whether the controller revision is C0 or above.
+	    C0 and above revision controllers support 96 vectors */
+	revision = ioc->pdev->revision;
+
+	if ((ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3004 ||
+	     ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3008 ||
+	     ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_1 ||
+	     ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_2 ||
+	     ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_5 ||
+	     ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_6) &&
+	     (revision >= 0x02))
+		ioc->msix96_vector = 1;
 
 	ioc->rdpq_array_enable_assigned = 0;
 	ioc->dma_mask = 0;
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index afa8816..6b8d8f1 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -728,7 +728,8 @@ typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc);
  *				is assigned only ones
  * @reply_queue_count: number of reply queue's
  * @reply_queue_list: link list contaning the reply queue info
- * @reply_post_host_index: head index in the pool where FW completes IO
+ * @msix96_vector: 96 MSI-X vector support
+ * @replyPostRegisterIndex: index of next position in Reply Desc Post Queue
  * @delayed_tr_list: target reset link list
  * @delayed_tr_volume_list: volume target reset link list
  * @@temp_sensors_count: flag to carry the number of temperature sensors
@@ -937,6 +938,10 @@ struct MPT3SAS_ADAPTER {
 	u8		reply_queue_count;
 	struct list_head reply_queue_list;
 
+	u8		msix96_vector;
+	/* reply post register index */
+	resource_size_t	**replyPostRegisterIndex;
+
 	struct list_head delayed_tr_list;
 	struct list_head delayed_tr_volume_list;
 	u8		temp_sensors_count;
-- 
2.0.2


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

* [PATCH 02/20] [SCSI] mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state.
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
  2015-06-12  9:42 ` [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-16 15:59   ` Tomas Henzl
  2015-06-12  9:42 ` [PATCH 03/20] [SCSI] mpt3sas: Don't block the drive when drive addition under the control of SML Sreekanth Reddy
                   ` (17 subsequent siblings)
  19 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Driver initialization fails if driver tries to send IOC facts request message when the IOC is in reset or in a fault state.

This patch will make sure that
 1.Driver to send IOC facts request message only if HBA is in operational or ready state.
 2.If IOC is in fault state, a diagnostic reset would be issued.
 3.If IOC is in reset state then driver will wait for 10 seconds to exit out of reset state.
   If the HBA continues to be in reset state, then the HBA wouldn't be claimed by the driver.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 65 +++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index c13a365..ce57320 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -3169,6 +3169,9 @@ _base_wait_on_iocstate(struct MPT3SAS_ADAPTER *ioc, u32 ioc_state, int timeout,
  * Notes: MPI2_HIS_IOC2SYS_DB_STATUS - set to one when IOC writes to doorbell.
  */
 static int
+_base_diag_reset(struct MPT3SAS_ADAPTER *ioc, int sleep_flag);
+
+static int
 _base_wait_for_doorbell_int(struct MPT3SAS_ADAPTER *ioc, int timeout,
 	int sleep_flag)
 {
@@ -3711,6 +3714,61 @@ _base_get_port_facts(struct MPT3SAS_ADAPTER *ioc, int port, int sleep_flag)
 }
 
 /**
+ * _base_wait_for_iocstate - Wait until the card is in READY or OPERATIONAL
+ * @ioc: per adapter object
+ * @timeout:
+ * @sleep_flag: CAN_SLEEP or NO_SLEEP
+ *
+ * Returns 0 for success, non-zero for failure.
+ */
+static int
+_base_wait_for_iocstate(struct MPT3SAS_ADAPTER *ioc, int timeout,
+	int sleep_flag)
+{
+	u32 ioc_state;
+	int rc;
+
+	dinitprintk(ioc, printk(MPT3SAS_FMT "%s\n", ioc->name,
+	    __func__));
+
+	if (ioc->pci_error_recovery)
+		return 0;
+
+	ioc_state = mpt3sas_base_get_iocstate(ioc, 0);
+	dhsprintk(ioc, printk(MPT3SAS_FMT "%s: ioc_state(0x%08x)\n",
+	    ioc->name, __func__, ioc_state));
+
+	if (((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_READY) ||
+	    (ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_OPERATIONAL)
+		return 0;
+
+	if (ioc_state & MPI2_DOORBELL_USED) {
+		dhsprintk(ioc, printk(MPT3SAS_FMT
+		    "unexpected doorbell active!\n", ioc->name));
+		goto issue_diag_reset;
+	}
+
+	if ((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_FAULT) {
+		mpt3sas_base_fault_info(ioc, ioc_state &
+		    MPI2_DOORBELL_DATA_MASK);
+		goto issue_diag_reset;
+	}
+
+	ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY,
+	    timeout, sleep_flag);
+	if (ioc_state) {
+		dfailprintk(ioc, printk(MPT3SAS_FMT
+		    "%s: failed going to ready state (ioc_state=0x%x)\n",
+		    ioc->name, __func__, ioc_state));
+		return -EFAULT;
+	}
+
+ issue_diag_reset:
+	rc = _base_diag_reset(ioc, sleep_flag);
+	return rc;
+}
+
+/**
  * _base_get_ioc_facts - obtain ioc facts reply and save in ioc
  * @ioc: per adapter object
  * @sleep_flag: CAN_SLEEP or NO_SLEEP
@@ -3728,6 +3786,13 @@ _base_get_ioc_facts(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
 	dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
 	    __func__));
 
+	r = _base_wait_for_iocstate(ioc, 10, sleep_flag);
+	if (r) {
+		dfailprintk(ioc, printk(MPT3SAS_FMT
+		    "%s: failed getting to correct state\n",
+		    ioc->name, __func__));
+		return r;
+	}
 	mpi_reply_sz = sizeof(Mpi2IOCFactsReply_t);
 	mpi_request_sz = sizeof(Mpi2IOCFactsRequest_t);
 	memset(&mpi_request, 0, mpi_request_sz);
-- 
2.0.2


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

* [PATCH 03/20] [SCSI] mpt3sas: Don't block the drive when drive addition under the control of SML
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
  2015-06-12  9:42 ` [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support Sreekanth Reddy
  2015-06-12  9:42 ` [PATCH 02/20] [SCSI] mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-19 15:05     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources Sreekanth Reddy
                   ` (16 subsequent siblings)
  19 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

During hot-plugging of a disk(having a flaky link), the disk addition
stops and any further disk addition or removal doesn't happen on that
controller.

This is because, when driver receives DELAY_NOT_RESPONDING event for a disk
while it is undergoing addition at the SCSI Transport layer, the driver
would block the I/O to that disk resulting in a deadlock. i.e the disk
addition work couldn't be completed at the SCSI Transport Layer as it
can't send any I/Os (such as Inquiry, Report LUNs etc) to the disk as
I/Os are blocked to this drive. Also any subsequent device removal
(TARGET_NOT_RESPONDING) or link update(RC_PHY_CHANGED) event couldn't be
processed as they are in the queue to get processed after disk addition
event.

Description of Change:
Don't block the drive when drive addition is under the control of SML.
So that SML won't be blocked of issuing the device dicovery commands
(such as Inquiry, Report LUNs etc).

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.h      |  4 +++-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c     |  7 +++++++
 drivers/scsi/mpt3sas/mpt3sas_transport.c | 18 ++++++++++++++++++
 3 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index 6b8d8f1..b79ad4f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -294,7 +294,8 @@ struct _internal_cmd {
  * @responding: used in _scsih_sas_device_mark_responding
  * @fast_path: fast path feature enable bit
  * @pfa_led_on: flag for PFA LED status
- *
+ * @pend_sas_rphy_add: flag to check if device is in sas_rphy_add()
+ *	addition routine.
  */
 struct _sas_device {
 	struct list_head list;
@@ -315,6 +316,7 @@ struct _sas_device {
 	u8	responding;
 	u8	fast_path;
 	u8	pfa_led_on;
+	u8	pend_sas_rphy_add;
 };
 
 /**
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 5a97e32..d457dba 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -2644,6 +2644,11 @@ _scsih_block_io_device(struct MPT3SAS_ADAPTER *ioc, u16 handle)
 {
 	struct MPT3SAS_DEVICE *sas_device_priv_data;
 	struct scsi_device *sdev;
+	struct _sas_device *sas_device;
+
+	sas_device = _scsih_sas_device_find_by_handle(ioc, handle);
+	if (!sas_device)
+		return;
 
 	shost_for_each_device(sdev, ioc->shost) {
 		sas_device_priv_data = sdev->hostdata;
@@ -2653,6 +2658,8 @@ _scsih_block_io_device(struct MPT3SAS_ADAPTER *ioc, u16 handle)
 			continue;
 		if (sas_device_priv_data->block)
 			continue;
+		if (sas_device->pend_sas_rphy_add)
+			continue;
 		sas_device_priv_data->block = 1;
 		scsi_internal_device_block(sdev);
 		sdev_printk(KERN_INFO, sdev,
diff --git a/drivers/scsi/mpt3sas/mpt3sas_transport.c b/drivers/scsi/mpt3sas/mpt3sas_transport.c
index efb98af..7a7aa68 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_transport.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_transport.c
@@ -649,6 +649,7 @@ mpt3sas_transport_port_add(struct MPT3SAS_ADAPTER *ioc, u16 handle,
 	unsigned long flags;
 	struct _sas_node *sas_node;
 	struct sas_rphy *rphy;
+	struct _sas_device *sas_device = NULL;
 	int i;
 	struct sas_port *port;
 
@@ -731,10 +732,27 @@ mpt3sas_transport_port_add(struct MPT3SAS_ADAPTER *ioc, u16 handle,
 		    mpt3sas_port->remote_identify.device_type);
 
 	rphy->identify = mpt3sas_port->remote_identify;
+
+	if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE) {
+		sas_device = mpt3sas_scsih_sas_device_find_by_sas_address(ioc,
+				    mpt3sas_port->remote_identify.sas_address);
+		if (!sas_device) {
+			dfailprintk(ioc, printk(MPT3SAS_FMT
+				"failure at %s:%d/%s()!\n",
+				ioc->name, __FILE__, __LINE__, __func__));
+			goto out_fail;
+		}
+		sas_device->pend_sas_rphy_add = 1;
+	}
+
 	if ((sas_rphy_add(rphy))) {
 		pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n",
 		    ioc->name, __FILE__, __LINE__, __func__);
 	}
+
+	if (mpt3sas_port->remote_identify.device_type == SAS_END_DEVICE)
+		sas_device->pend_sas_rphy_add = 0;
+
 	if ((ioc->logging_level & MPT_DEBUG_TRANSPORT))
 		dev_printk(KERN_INFO, &rphy->dev,
 			"add: handle(0x%04x), sas_addr(0x%016llx)\n",
-- 
2.0.2


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

* [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (2 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 03/20] [SCSI] mpt3sas: Don't block the drive when drive addition under the control of SML Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-12 11:28   ` Johannes Thumshirn
                     ` (2 more replies)
  2015-06-12  9:42 ` [PATCH 05/20] [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications Sreekanth Reddy
                   ` (15 subsequent siblings)
  19 siblings, 3 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Removed the redundancy code while freeing the controller resources.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
 1 file changed, 32 insertions(+), 25 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index ce57320..32b86bf 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1798,6 +1798,36 @@ _base_enable_msix(struct MPT3SAS_ADAPTER *ioc)
 }
 
 /**
+ * mpt3sas_base_unmap_resources - free controller resources
+ * @ioc: per adapter object
+ */
+void
+mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER *ioc)
+{
+	struct pci_dev *pdev = ioc->pdev;
+
+	dexitprintk(ioc, printk(MPT3SAS_FMT "%s\n",
+		ioc->name, __func__));
+
+	_base_free_irq(ioc);
+	_base_disable_msix(ioc);
+
+	if (ioc->msix96_vector)
+		kfree(ioc->replyPostRegisterIndex);
+
+	if (ioc->chip_phys) {
+		iounmap(ioc->chip);
+		ioc->chip_phys = 0;
+	}
+
+	if (pci_is_enabled(pdev)) {
+		pci_release_selected_regions(ioc->pdev, ioc->bars);
+		pci_disable_pcie_error_reporting(pdev);
+		pci_disable_device(pdev);
+	}
+}
+
+/**
  * mpt3sas_base_map_resources - map in controller resources (io/irq/memap)
  * @ioc: per adapter object
  *
@@ -1925,14 +1955,7 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
 	return 0;
 
  out_fail:
-	if (ioc->chip_phys)
-		iounmap(ioc->chip);
-	ioc->chip_phys = 0;
-	pci_release_selected_regions(ioc->pdev, ioc->bars);
-	pci_disable_pcie_error_reporting(pdev);
-	pci_disable_device(pdev);
-	if (ioc->msix96_vector)
-		kfree(ioc->replyPostRegisterIndex);
+	mpt3sas_base_unmap_resources(ioc);
 	return r;
 }
 
@@ -4667,8 +4690,6 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
 void
 mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
 {
-	struct pci_dev *pdev = ioc->pdev;
-
 	dexitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
 	    __func__));
 
@@ -4679,21 +4700,7 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
 		ioc->shost_recovery = 0;
 	}
 
-	_base_free_irq(ioc);
-	_base_disable_msix(ioc);
-
-	if (ioc->msix96_vector)
-		kfree(ioc->replyPostRegisterIndex);
-
-	if (ioc->chip_phys && ioc->chip)
-		iounmap(ioc->chip);
-	ioc->chip_phys = 0;
-
-	if (pci_is_enabled(pdev)) {
-		pci_release_selected_regions(ioc->pdev, ioc->bars);
-		pci_disable_pcie_error_reporting(pdev);
-		pci_disable_device(pdev);
-	}
+	mpt3sas_base_unmap_resources(ioc);
 	return;
 }
 
-- 
2.0.2


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

* [PATCH 05/20] [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (3 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:51   ` Johannes Thumshirn
  2015-06-19 15:10     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives Sreekanth Reddy
                   ` (14 subsequent siblings)
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Update MPI 2.5 Release: MPI 2.5 Rev I (2.5.4) specification and 2.00.33 header files

Below is the change set from the MPI specification for I Rev

1) Added Base Enclosure Level bit to the Flags field of Manufacturing Page 7.
2) Updated description of the MaxTargetPortConnectTime field of SAS IO Unit Page 1.
3) Added EnclosureLevel and ConnectorName fields to SAS Device Page 0. Also, added EnclosureLevel and ConnectorName Valid bit to the Flags field.
4) Added EnclosureLevel field to SAS Enclosure Page 0. Also, added EnclosureLevel Valid bit to the Flags field.
5) Added value for BIOS image to HashImageType.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpi/mpi2.h      |  6 ++++--
 drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 27 +++++++++++++++++++++------
 drivers/scsi/mpt3sas/mpi/mpi2_ioc.h  |  4 +++-
 3 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpi/mpi2.h b/drivers/scsi/mpt3sas/mpi/mpi2.h
index c34c115..d730c5c 100644
--- a/drivers/scsi/mpt3sas/mpi/mpi2.h
+++ b/drivers/scsi/mpt3sas/mpi/mpi2.h
@@ -8,7 +8,7 @@
  *                 scatter/gather formats.
  * Creation Date:  June 21, 2006
  *
- * mpi2.h Version:  02.00.31
+ * mpi2.h Version:  02.00.33
  *
  * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  *       prefix are for use only on MPI v2.5 products, and must not be used
@@ -88,6 +88,8 @@
  *                     Added MPI25_SUP_REPLY_POST_HOST_INDEX_OFFSET.
  * 04-09-13  02.00.30  Bumped MPI2_HEADER_VERSION_UNIT.
  * 04-17-13  02.00.31  Bumped MPI2_HEADER_VERSION_UNIT.
+ * 08-19-13  02.00.32  Bumped MPI2_HEADER_VERSION_UNIT.
+ * 12-05-13  02.00.33  Bumped MPI2_HEADER_VERSION_UNIT.
  * --------------------------------------------------------------------------
  */
 
@@ -121,7 +123,7 @@
 #define MPI2_VERSION_02_05                  (0x0205)
 
 /*Unit and Dev versioning for this MPI header set */
-#define MPI2_HEADER_VERSION_UNIT            (0x1F)
+#define MPI2_HEADER_VERSION_UNIT            (0x21)
 #define MPI2_HEADER_VERSION_DEV             (0x00)
 #define MPI2_HEADER_VERSION_UNIT_MASK       (0xFF00)
 #define MPI2_HEADER_VERSION_UNIT_SHIFT      (8)
diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
index e261a31..62dfbf6 100644
--- a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
+++ b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
@@ -6,7 +6,7 @@
  *         Title:  MPI Configuration messages and pages
  * Creation Date:  November 10, 2006
  *
- *   mpi2_cnfg.h Version:  02.00.26
+ *   mpi2_cnfg.h Version:  02.00.27
  *
  * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  *       prefix are for use only on MPI v2.5 products, and must not be used
@@ -165,6 +165,16 @@
  *                     match the specification.
  * 08-19-13  02.00.26  Added reserved words to MPI2_CONFIG_PAGE_IO_UNIT_7 for
  *			future use.
+ * 12-05-13  02.00.27  Added MPI2_MANPAGE7_FLAG_BASE_ENCLOSURE_LEVEL for
+ *		       MPI2_CONFIG_PAGE_MAN_7.
+ *		       Added EnclosureLevel and ConnectorName fields to
+ *		       MPI2_CONFIG_PAGE_SAS_DEV_0.
+ *		       Added MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID for
+ *		       MPI2_CONFIG_PAGE_SAS_DEV_0.
+ *		       Added EnclosureLevel field to
+ *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
+ *		       Added MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID for
+ *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
  * --------------------------------------------------------------------------
  */
 
@@ -724,6 +734,7 @@ typedef struct _MPI2_CONFIG_PAGE_MAN_7 {
 #define MPI2_MANUFACTURING7_PAGEVERSION                 (0x01)
 
 /*defines for the Flags field */
+#define MPI2_MANPAGE7_FLAG_BASE_ENCLOSURE_LEVEL         (0x00000008)
 #define MPI2_MANPAGE7_FLAG_EVENTREPLAY_SLOT_ORDER       (0x00000002)
 #define MPI2_MANPAGE7_FLAG_USE_SLOT_INFO                (0x00000001)
 
@@ -2633,9 +2644,9 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 {
 	U8
 		ControlGroup;           /*0x2E */
 	U8
-		Reserved1;              /*0x2F */
+		EnclosureLevel;		/*0x2F */
 	U32
-		Reserved2;              /*0x30 */
+		ConnectorName[4];	/*0x30 */
 	U32
 		Reserved3;              /*0x34 */
 } MPI2_CONFIG_PAGE_SAS_DEV_0,
@@ -2643,7 +2654,7 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 {
 	Mpi2SasDevicePage0_t,
 	*pMpi2SasDevicePage0_t;
 
-#define MPI2_SASDEVICE0_PAGEVERSION         (0x08)
+#define MPI2_SASDEVICE0_PAGEVERSION         (0x09)
 
 /*values for SAS Device Page 0 AccessStatus field */
 #define MPI2_SAS_DEVICE0_ASTATUS_NO_ERRORS                  (0x00)
@@ -2683,6 +2694,7 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 {
 #define MPI2_SAS_DEVICE0_FLAGS_SATA_NCQ_SUPPORTED           (0x0020)
 #define MPI2_SAS_DEVICE0_FLAGS_SATA_FUA_SUPPORTED           (0x0010)
 #define MPI2_SAS_DEVICE0_FLAGS_PORT_SELECTOR_ATTACH         (0x0008)
+#define MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID             (0x0002)
 #define MPI2_SAS_DEVICE0_FLAGS_DEVICE_PRESENT               (0x0001)
 
 
@@ -3019,8 +3031,10 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 {
 		NumSlots;                   /*0x18 */
 	U16
 		StartSlot;                  /*0x1A */
-	U16
+	U8
 		Reserved2;                  /*0x1C */
+	U8
+		EnclosureLevel;		    /*0x1D */
 	U16
 		SEPDevHandle;               /*0x1E */
 	U32
@@ -3031,9 +3045,10 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 {
 	*PTR_MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
 	Mpi2SasEnclosurePage0_t, *pMpi2SasEnclosurePage0_t;
 
-#define MPI2_SASENCLOSURE0_PAGEVERSION      (0x03)
+#define MPI2_SASENCLOSURE0_PAGEVERSION      (0x04)
 
 /*values for SAS Enclosure Page 0 Flags field */
+#define MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID      (0x0010)
 #define MPI2_SAS_ENCLS0_FLAGS_MNG_MASK              (0x000F)
 #define MPI2_SAS_ENCLS0_FLAGS_MNG_UNKNOWN           (0x0000)
 #define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_SES           (0x0001)
diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h b/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h
index 4908309..d7598cc 100644
--- a/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h
+++ b/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h
@@ -6,7 +6,7 @@
  *         Title:  MPI IOC, Port, Event, FW Download, and FW Upload messages
  * Creation Date:  October 11, 2006
  *
- * mpi2_ioc.h Version:  02.00.23
+ * mpi2_ioc.h Version:  02.00.24
  *
  * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  *       prefix are for use only on MPI v2.5 products, and must not be used
@@ -132,6 +132,7 @@
  *			Added MPI2_IOCFACTS_CAPABILITY_RDPQ_ARRAY_CAPABLE.
  *			Added MPI2_FW_DOWNLOAD_ITYPE_PUBLIC_KEY.
  *			Added Encrypted Hash Extended Image.
+ * 12-05-13  02.00.24  Added MPI25_HASH_IMAGE_TYPE_BIOS.
  * --------------------------------------------------------------------------
  */
 
@@ -1598,6 +1599,7 @@ Mpi25EncryptedHashEntry_t, *pMpi25EncryptedHashEntry_t;
 /* values for HashImageType */
 #define MPI25_HASH_IMAGE_TYPE_UNUSED		(0x00)
 #define MPI25_HASH_IMAGE_TYPE_FIRMWARE		(0x01)
+#define MPI25_HASH_IMAGE_TYPE_BIOS              (0x02)
 
 /* values for HashAlgorithm */
 #define MPI25_HASH_ALGORITHM_UNUSED		(0x00)
-- 
2.0.2


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

* [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (4 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 05/20] [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-18  9:56   ` Sreekanth Reddy
  2015-06-19  9:19     ` Johannes Thumshirn
  2015-06-12  9:42 ` [PATCH 07/20] [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00 Sreekanth Reddy
                   ` (13 subsequent siblings)
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

This Patch will provide more details of the devices such as slot number, enclosure logical id, enclosure level & connector name in the following scenarios,

- When end device is added in the topology,
- When the end device is removed from the setup,
- When the SCSI mid layer issues TASK ABORT/ DEVICE RESET/ TARGET RESET during error handling,
- When any command to the device fails with Sense key Hardware error or Medium error or Unit Attention,
- When firmware returns device error or device not ready status for the end device,
- When a Predicted fault is detected on an end device.

This information can be used by the user to identify the location of the desired drive in the topology.

Driver will get these information by reading the sas device page0.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.h  |   2 +
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 238 +++++++++++++++++++++++++++++------
 2 files changed, 201 insertions(+), 39 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index b79ad4f..293ad23 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -317,6 +317,8 @@ struct _sas_device {
 	u8	fast_path;
 	u8	pfa_led_on;
 	u8	pend_sas_rphy_add;
+	u8   enclosure_level;
+	u8   connector_name[4];
 };
 
 /**
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index d457dba..64dd90b 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -585,6 +585,22 @@ _scsih_sas_device_remove(struct MPT3SAS_ADAPTER *ioc,
 
 	if (!sas_device)
 		return;
+	pr_info(MPT3SAS_FMT
+	    "removing handle(0x%04x), sas_addr(0x%016llx)\n",
+	    ioc->name, sas_device->handle,
+	    (unsigned long long) sas_device->sas_address);
+
+	if (sas_device->enclosure_handle != 0)
+		pr_info(MPT3SAS_FMT
+		   "removing enclosure logical id(0x%016llx), slot(%d)\n",
+		   ioc->name, (unsigned long long)
+		   sas_device->enclosure_logical_id, sas_device->slot);
+
+	if (sas_device->connector_name[0] != '\0')
+		pr_info(MPT3SAS_FMT
+		   "removing enclosure level(0x%04x), connector name( %s)\n",
+		   ioc->name, sas_device->enclosure_level,
+		   sas_device->connector_name);
 
 	spin_lock_irqsave(&ioc->sas_device_lock, flags);
 	list_del(&sas_device->list);
@@ -663,6 +679,18 @@ _scsih_sas_device_add(struct MPT3SAS_ADAPTER *ioc,
 		ioc->name, __func__, sas_device->handle,
 		(unsigned long long)sas_device->sas_address));
 
+	if (sas_device->enclosure_handle != 0)
+		dewtprintk(ioc, pr_info(MPT3SAS_FMT
+		    "%s: enclosure logical id(0x%016llx), slot( %d)\n",
+		    ioc->name, __func__, (unsigned long long)
+		    sas_device->enclosure_logical_id, sas_device->slot));
+
+	if (sas_device->connector_name[0] != '\0')
+		dewtprintk(ioc, pr_info(MPT3SAS_FMT
+		    "%s: enclosure level(0x%04x), connector name( %s)\n",
+		    ioc->name, __func__,
+		    sas_device->enclosure_level, sas_device->connector_name));
+
 	spin_lock_irqsave(&ioc->sas_device_lock, flags);
 	list_add_tail(&sas_device->list, &ioc->sas_device_list);
 	spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
@@ -704,6 +732,18 @@ _scsih_sas_device_init_add(struct MPT3SAS_ADAPTER *ioc,
 		__func__, sas_device->handle,
 		(unsigned long long)sas_device->sas_address));
 
+	if (sas_device->enclosure_handle != 0)
+		dewtprintk(ioc, pr_info(MPT3SAS_FMT
+		    "%s: enclosure logical id(0x%016llx), slot( %d)\n",
+		    ioc->name, __func__, (unsigned long long)
+		    sas_device->enclosure_logical_id, sas_device->slot));
+
+	if (sas_device->connector_name[0] != '\0')
+		dewtprintk(ioc, pr_info(MPT3SAS_FMT
+		    "%s: enclosure level(0x%04x), connector name( %s)\n",
+		    ioc->name, __func__, sas_device->enclosure_level,
+		    sas_device->connector_name));
+
 	spin_lock_irqsave(&ioc->sas_device_lock, flags);
 	list_add_tail(&sas_device->list, &ioc->sas_device_init_list);
 	_scsih_determine_boot_device(ioc, sas_device, 0);
@@ -1772,10 +1812,16 @@ _scsih_slave_configure(struct scsi_device *sdev)
 	    "sas_addr(0x%016llx), phy(%d), device_name(0x%016llx)\n",
 	    ds, handle, (unsigned long long)sas_device->sas_address,
 	    sas_device->phy, (unsigned long long)sas_device->device_name);
-	sdev_printk(KERN_INFO, sdev,
-		"%s: enclosure_logical_id(0x%016llx), slot(%d)\n",
-		ds, (unsigned long long)
-	    sas_device->enclosure_logical_id, sas_device->slot);
+	if (sas_device->enclosure_handle != 0)
+		sdev_printk(KERN_INFO, sdev,
+		     "%s: enclosure_logical_id(0x%016llx), slot(%d)\n",
+		     ds, (unsigned long long)
+		     sas_device->enclosure_logical_id, sas_device->slot);
+	if (sas_device->connector_name[0] != '\0')
+		sdev_printk(KERN_INFO, sdev,
+		     "%s: enclosure level(0x%04x), connector name( %s)\n",
+		     ds, sas_device->enclosure_level,
+		     sas_device->connector_name);
 
 	spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
 
@@ -2189,10 +2235,17 @@ _scsih_tm_display_info(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd)
 			    sas_device->handle,
 			    (unsigned long long)sas_device->sas_address,
 			    sas_device->phy);
-			starget_printk(KERN_INFO, starget,
-			    "enclosure_logical_id(0x%016llx), slot(%d)\n",
-			   (unsigned long long)sas_device->enclosure_logical_id,
-			    sas_device->slot);
+			if (sas_device->enclosure_handle != 0)
+				starget_printk(KERN_INFO, starget,
+				 "enclosure_logical_id(0x%016llx), slot(%d)\n",
+				 (unsigned long long)
+				 sas_device->enclosure_logical_id,
+				 sas_device->slot);
+			if (sas_device->connector_name)
+				starget_printk(KERN_INFO, starget,
+				"enclosure level(0x%04x),connector name(%s)\n",
+				 sas_device->enclosure_level,
+				 sas_device->connector_name);
 		}
 		spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
 	}
@@ -2813,6 +2866,18 @@ _scsih_tm_tr_send(struct MPT3SAS_ADAPTER *ioc, u16 handle)
 			"setting delete flag: handle(0x%04x), sas_addr(0x%016llx)\n",
 			ioc->name, handle,
 		    (unsigned long long)sas_address));
+		if (sas_device->enclosure_handle != 0)
+			dewtprintk(ioc, pr_info(MPT3SAS_FMT
+			 "setting delete flag:enclosure logical id(0x%016llx),"
+			 " slot(%d)\n", ioc->name, (unsigned long long)
+			  sas_device->enclosure_logical_id,
+			  sas_device->slot));
+		if (sas_device->connector_name)
+			dewtprintk(ioc, pr_info(MPT3SAS_FMT
+			 "setting delete flag: enclosure level(0x%04x),"
+			 " connector name( %s)\n", ioc->name,
+			  sas_device->enclosure_level,
+			  sas_device->connector_name));
 		_scsih_ublock_io_device(ioc, sas_address);
 		sas_target_priv_data->handle = MPT3SAS_INVALID_DEVICE_HANDLE;
 	}
@@ -3828,10 +3893,19 @@ _scsih_scsi_ioc_info(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
 				"\tsas_address(0x%016llx), phy(%d)\n",
 				ioc->name, (unsigned long long)
 			    sas_device->sas_address, sas_device->phy);
-			pr_warn(MPT3SAS_FMT
-			    "\tenclosure_logical_id(0x%016llx), slot(%d)\n",
-			    ioc->name, (unsigned long long)
-			    sas_device->enclosure_logical_id, sas_device->slot);
+			if (sas_device->enclosure_handle != 0)
+				pr_warn(MPT3SAS_FMT
+				  "\tenclosure_logical_id(0x%016llx),"
+				  "slot(%d)\n", ioc->name,
+				  (unsigned long long)
+				  sas_device->enclosure_logical_id,
+				  sas_device->slot);
+			if (sas_device->connector_name[0])
+				pr_warn(MPT3SAS_FMT
+				  "\tenclosure level(0x%04x),"
+				  " connector name( %s)\n", ioc->name,
+				  sas_device->enclosure_level,
+				  sas_device->connector_name);
 		}
 		spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
 	}
@@ -4006,7 +4080,16 @@ _scsih_smart_predicted_fault(struct MPT3SAS_ADAPTER *ioc, u16 handle)
 		spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
 		return;
 	}
-	starget_printk(KERN_WARNING, starget, "predicted fault\n");
+	if (sas_device->enclosure_handle != 0)
+		starget_printk(KERN_INFO, starget, "predicted fault, "
+			"enclosure logical id(0x%016llx), slot(%d)\n",
+			(unsigned long long)sas_device->enclosure_logical_id,
+			sas_device->slot);
+	if (sas_device->connector_name[0] != '\0')
+		starget_printk(KERN_WARNING, starget, "predicted fault, "
+			"enclosure level(0x%04x), connector name( %s)\n",
+			sas_device->enclosure_level,
+			sas_device->connector_name);
 	spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
 
 	if (ioc->pdev->subsystem_vendor == PCI_VENDOR_ID_IBM)
@@ -4126,8 +4209,13 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
 			_scsih_smart_predicted_fault(ioc,
 			    le16_to_cpu(mpi_reply->DevHandle));
 		mpt3sas_trigger_scsi(ioc, data.skey, data.asc, data.ascq);
-	}
 
+		if (!(ioc->logging_level & MPT_DEBUG_REPLY) &&
+		     ((scmd->sense_buffer[2] == UNIT_ATTENTION) ||
+		     (scmd->sense_buffer[2] == MEDIUM_ERROR) ||
+		     (scmd->sense_buffer[2] == HARDWARE_ERROR)))
+			_scsih_scsi_ioc_info(ioc, scmd, mpi_reply, smid);
+		}
 	switch (ioc_status) {
 	case MPI2_IOCSTATUS_BUSY:
 	case MPI2_IOCSTATUS_INSUFFICIENT_RESOURCES:
@@ -4795,6 +4883,16 @@ _scsih_check_device(struct MPT3SAS_ADAPTER *ioc,
 			sas_device->handle, handle);
 		sas_target_priv_data->handle = handle;
 		sas_device->handle = handle;
+		if (sas_device_pg0.Flags &
+		     MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID) {
+			sas_device->enclosure_level =
+				le16_to_cpu(sas_device_pg0.EnclosureLevel);
+			memcpy(&sas_device->connector_name[0],
+				&sas_device_pg0.ConnectorName[0], 4);
+		} else {
+			sas_device->enclosure_level = 0;
+			sas_device->connector_name[0] = '\0';
+		}
 	}
 
 	/* check if device is present */
@@ -4901,14 +4999,24 @@ _scsih_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phy_num,
 		    ioc->name, __FILE__, __LINE__, __func__);
 	sas_device->enclosure_handle =
 	    le16_to_cpu(sas_device_pg0.EnclosureHandle);
-	sas_device->slot =
-	    le16_to_cpu(sas_device_pg0.Slot);
+	if (sas_device->enclosure_handle != 0)
+		sas_device->slot =
+		    le16_to_cpu(sas_device_pg0.Slot);
 	sas_device->device_info = device_info;
 	sas_device->sas_address = sas_address;
 	sas_device->phy = sas_device_pg0.PhyNum;
 	sas_device->fast_path = (le16_to_cpu(sas_device_pg0.Flags) &
 	    MPI25_SAS_DEVICE0_FLAGS_FAST_PATH_CAPABLE) ? 1 : 0;
 
+	if (sas_device_pg0.Flags & MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID) {
+		sas_device->enclosure_level =
+			le16_to_cpu(sas_device_pg0.EnclosureLevel);
+		memcpy(&sas_device->connector_name[0],
+			&sas_device_pg0.ConnectorName[0], 4);
+	} else {
+		sas_device->enclosure_level = 0;
+		sas_device->connector_name[0] = '\0';
+	}
 	/* get enclosure_logical_id */
 	if (sas_device->enclosure_handle && !(mpt3sas_config_get_enclosure_pg0(
 	   ioc, &mpi_reply, &enclosure_pg0, MPI2_SAS_ENCLOS_PGAD_FORM_HANDLE,
@@ -4950,6 +5058,18 @@ _scsih_remove_device(struct MPT3SAS_ADAPTER *ioc,
 		ioc->name, __func__,
 	    sas_device->handle, (unsigned long long)
 	    sas_device->sas_address));
+	if (sas_device->enclosure_handle != 0)
+		dewtprintk(ioc, pr_info(MPT3SAS_FMT
+		    "%s: enter: enclosure logical id(0x%016llx), slot(%d)\n",
+		    ioc->name, __func__,
+		    (unsigned long long)sas_device->enclosure_logical_id,
+		    sas_device->slot));
+	if (sas_device->connector_name[0] != '\0')
+		dewtprintk(ioc, pr_info(MPT3SAS_FMT
+		  "%s: enter: enclosure level(0x%04x), connector name( %s)\n",
+		  ioc->name, __func__,
+		  sas_device->enclosure_level,
+		  sas_device->connector_name));
 
 	if (sas_device->starget && sas_device->starget->hostdata) {
 		sas_target_priv_data = sas_device->starget->hostdata;
@@ -4966,12 +5086,34 @@ _scsih_remove_device(struct MPT3SAS_ADAPTER *ioc,
 		"removing handle(0x%04x), sas_addr(0x%016llx)\n",
 		ioc->name, sas_device->handle,
 	    (unsigned long long) sas_device->sas_address);
+	if (sas_device->enclosure_handle != 0)
+		pr_info(MPT3SAS_FMT
+		  "removing : enclosure logical id(0x%016llx), slot(%d)\n",
+		  ioc->name,
+		  (unsigned long long)sas_device->enclosure_logical_id,
+		  sas_device->slot);
+	if (sas_device->connector_name[0] != '\0')
+		pr_info(MPT3SAS_FMT
+		  "removing enclosure level(0x%04x), connector name( %s)\n",
+		  ioc->name, sas_device->enclosure_level,
+		  sas_device->connector_name);
 
 	dewtprintk(ioc, pr_info(MPT3SAS_FMT
 		"%s: exit: handle(0x%04x), sas_addr(0x%016llx)\n",
 		ioc->name, __func__,
-	    sas_device->handle, (unsigned long long)
-	    sas_device->sas_address));
+		sas_device->handle, (unsigned long long)
+		sas_device->sas_address));
+	if (sas_device->enclosure_handle != 0)
+		dewtprintk(ioc, pr_info(MPT3SAS_FMT
+		    "%s: exit: enclosure logical id(0x%016llx), slot(%d)\n",
+		    ioc->name, __func__,
+		    (unsigned long long)sas_device->enclosure_logical_id,
+		    sas_device->slot));
+	if (sas_device->connector_name[0] != '\0')
+		dewtprintk(ioc, pr_info(MPT3SAS_FMT
+		    "%s: exit: enclosure level(0x%04x), connector name(%s)\n",
+		    ioc->name, __func__, sas_device->enclosure_level,
+		    sas_device->connector_name));
 
 	kfree(sas_device);
 }
@@ -6364,9 +6506,7 @@ _scsih_prep_device_scan(struct MPT3SAS_ADAPTER *ioc)
 /**
  * _scsih_mark_responding_sas_device - mark a sas_devices as responding
  * @ioc: per adapter object
- * @sas_address: sas address
- * @slot: enclosure slot id
- * @handle: device handle
+ * @sas_device_pg0: SAS Device page 0
  *
  * After host reset, find out whether devices are still responding.
  * Used in _scsih_remove_unresponsive_sas_devices.
@@ -6374,8 +6514,8 @@ _scsih_prep_device_scan(struct MPT3SAS_ADAPTER *ioc)
  * Return nothing.
  */
 static void
-_scsih_mark_responding_sas_device(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
-	u16 slot, u16 handle)
+_scsih_mark_responding_sas_device(struct MPT3SAS_ADAPTER *ioc,
+Mpi2SasDevicePage0_t *sas_device_pg0)
 {
 	struct MPT3SAS_TARGET *sas_target_priv_data = NULL;
 	struct scsi_target *starget;
@@ -6384,8 +6524,8 @@ _scsih_mark_responding_sas_device(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
 
 	spin_lock_irqsave(&ioc->sas_device_lock, flags);
 	list_for_each_entry(sas_device, &ioc->sas_device_list, list) {
-		if (sas_device->sas_address == sas_address &&
-		    sas_device->slot == slot) {
+		if ((sas_device->sas_address == sas_device_pg0->SASAddress) &&
+			(sas_device->slot == sas_device_pg0->Slot)) {
 			sas_device->responding = 1;
 			starget = sas_device->starget;
 			if (starget && starget->hostdata) {
@@ -6394,22 +6534,40 @@ _scsih_mark_responding_sas_device(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
 				sas_target_priv_data->deleted = 0;
 			} else
 				sas_target_priv_data = NULL;
-			if (starget)
+			if (starget) {
 				starget_printk(KERN_INFO, starget,
-				    "handle(0x%04x), sas_addr(0x%016llx), "
-				    "enclosure logical id(0x%016llx), "
-				    "slot(%d)\n", handle,
-				    (unsigned long long)sas_device->sas_address,
+				    "handle(0x%04x), sas_addr(0x%016llx)\n",
+				    sas_device_pg0->DevHandle,
 				    (unsigned long long)
-				    sas_device->enclosure_logical_id,
-				    sas_device->slot);
-			if (sas_device->handle == handle)
+				    sas_device->sas_address);
+
+				if (sas_device->enclosure_handle != 0)
+					starget_printk(KERN_INFO, starget,
+					 "enclosure logical id(0x%016llx),"
+					 " slot(%d)\n",
+					 (unsigned long long)
+					 sas_device->enclosure_logical_id,
+					 sas_device->slot);
+			}
+			if (sas_device_pg0->Flags &
+			      MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID) {
+				sas_device->enclosure_level =
+				   le16_to_cpu(sas_device_pg0->EnclosureLevel);
+				memcpy(&sas_device->connector_name[0],
+					&sas_device_pg0->ConnectorName[0], 4);
+			} else {
+				sas_device->enclosure_level = 0;
+				sas_device->connector_name[0] = '\0';
+			}
+
+			if (sas_device->handle == sas_device_pg0->DevHandle)
 				goto out;
 			pr_info("\thandle changed from(0x%04x)!!!\n",
 			    sas_device->handle);
-			sas_device->handle = handle;
+			sas_device->handle = sas_device_pg0->DevHandle;
 			if (sas_target_priv_data)
-				sas_target_priv_data->handle = handle;
+				sas_target_priv_data->handle =
+					sas_device_pg0->DevHandle;
 			goto out;
 		}
 	}
@@ -6448,13 +6606,15 @@ _scsih_search_responding_sas_devices(struct MPT3SAS_ADAPTER *ioc)
 		    MPI2_IOCSTATUS_MASK;
 		if (ioc_status != MPI2_IOCSTATUS_SUCCESS)
 			break;
-		handle = le16_to_cpu(sas_device_pg0.DevHandle);
+		handle = sas_device_pg0.DevHandle =
+				le16_to_cpu(sas_device_pg0.DevHandle);
 		device_info = le32_to_cpu(sas_device_pg0.DeviceInfo);
 		if (!(_scsih_is_end_device(device_info)))
 			continue;
-		_scsih_mark_responding_sas_device(ioc,
-		    le64_to_cpu(sas_device_pg0.SASAddress),
-		    le16_to_cpu(sas_device_pg0.Slot), handle);
+		sas_device_pg0.SASAddress =
+				le64_to_cpu(sas_device_pg0.SASAddress);
+		sas_device_pg0.Slot = le16_to_cpu(sas_device_pg0.Slot);
+		_scsih_mark_responding_sas_device(ioc, &sas_device_pg0);
 	}
 
  out:
-- 
2.0.2


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

* [PATCH 07/20] [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (5 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:52   ` Johannes Thumshirn
  2015-06-19 20:22     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5 Sreekanth Reddy
                   ` (12 subsequent siblings)
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Bump mpt3sas Driver version to v5.100.00.00

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index 293ad23..9396a76 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -71,8 +71,8 @@
 #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		"04.100.00.00"
-#define MPT3SAS_MAJOR_VERSION		4
+#define MPT3SAS_DRIVER_VERSION		"05.100.00.00"
+#define MPT3SAS_MAJOR_VERSION		5
 #define MPT3SAS_MINOR_VERSION		100
 #define MPT3SAS_BUILD_VERSION		0
 #define MPT3SAS_RELEASE_VERSION	00
-- 
2.0.2


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

* [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (6 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 07/20] [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00 Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:52     ` Johannes Thumshirn
  2015-06-19 20:24     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files Sreekanth Reddy
                   ` (11 subsequent siblings)
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Update MPI2 strings to MPI2.5.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +--
 drivers/scsi/mpt3sas/mpt3sas_base.h | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 32b86bf..6739c0a 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -3901,7 +3901,7 @@ _base_send_ioc_init(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
 	mpi_request.WhoInit = MPI2_WHOINIT_HOST_DRIVER;
 	mpi_request.VF_ID = 0; /* TODO */
 	mpi_request.VP_ID = 0;
-	mpi_request.MsgVersion = cpu_to_le16(MPI2_VERSION);
+	mpi_request.MsgVersion = cpu_to_le16(MPI25_VERSION);
 	mpi_request.HeaderVersion = cpu_to_le16(MPI2_HEADER_VERSION);
 
 	if (_base_is_controller_msix_enabled(ioc))
@@ -4769,7 +4769,6 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
 	ioc->build_sg_scmd = &_base_build_sg_scmd_ieee;
 	ioc->build_sg = &_base_build_sg_ieee;
 	ioc->build_zero_len_sge = &_base_build_zero_len_sge_ieee;
-	ioc->mpi25 = 1;
 	ioc->sge_size_ieee = sizeof(Mpi2IeeeSgeSimple64_t);
 
 	/*
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index 9396a76..2318ef8 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -819,7 +819,6 @@ struct MPT3SAS_ADAPTER {
 	MPT_BUILD_SG_SCMD build_sg_scmd;
 	MPT_BUILD_SG    build_sg;
 	MPT_BUILD_ZERO_LEN_SGE build_zero_len_sge;
-	u8              mpi25;
 	u16             sge_size_ieee;
 
 	/* function ptr for MPI sg elements only */
-- 
2.0.2


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

* [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (7 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5 Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:53     ` Johannes Thumshirn
  2015-06-19 20:27     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA Sreekanth Reddy
                   ` (10 subsequent siblings)
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Following is the change set,

1. Added more defines for the BiosOptions field of MPI2_CONFIG_PAGE_BIOS_1.
2. Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC definition.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpi/mpi2.h      |  5 +++--
 drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 14 ++++++++++++--
 drivers/scsi/mpt3sas/mpi/mpi2_tool.h |  4 +++-
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpi/mpi2.h b/drivers/scsi/mpt3sas/mpi/mpi2.h
index d730c5c..c2d127c 100644
--- a/drivers/scsi/mpt3sas/mpi/mpi2.h
+++ b/drivers/scsi/mpt3sas/mpi/mpi2.h
@@ -8,7 +8,7 @@
  *                 scatter/gather formats.
  * Creation Date:  June 21, 2006
  *
- * mpi2.h Version:  02.00.33
+ * mpi2.h Version:  02.00.34
  *
  * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  *       prefix are for use only on MPI v2.5 products, and must not be used
@@ -90,6 +90,7 @@
  * 04-17-13  02.00.31  Bumped MPI2_HEADER_VERSION_UNIT.
  * 08-19-13  02.00.32  Bumped MPI2_HEADER_VERSION_UNIT.
  * 12-05-13  02.00.33  Bumped MPI2_HEADER_VERSION_UNIT.
+ * 01-08-14  02.00.34  Bumped MPI2_HEADER_VERSION_UNIT
  * --------------------------------------------------------------------------
  */
 
@@ -123,7 +124,7 @@
 #define MPI2_VERSION_02_05                  (0x0205)
 
 /*Unit and Dev versioning for this MPI header set */
-#define MPI2_HEADER_VERSION_UNIT            (0x21)
+#define MPI2_HEADER_VERSION_UNIT            (0x22)
 #define MPI2_HEADER_VERSION_DEV             (0x00)
 #define MPI2_HEADER_VERSION_UNIT_MASK       (0xFF00)
 #define MPI2_HEADER_VERSION_UNIT_SHIFT      (8)
diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
index 62dfbf6..66f2cc1 100644
--- a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
+++ b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
@@ -6,7 +6,7 @@
  *         Title:  MPI Configuration messages and pages
  * Creation Date:  November 10, 2006
  *
- *   mpi2_cnfg.h Version:  02.00.27
+ *   mpi2_cnfg.h Version:  02.00.28
  *
  * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  *       prefix are for use only on MPI v2.5 products, and must not be used
@@ -175,6 +175,8 @@
  *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
  *		       Added MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID for
  *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
+ * 01-08-14  02.00.28  Added more defines for the BiosOptions field of
+ *		       MPI2_CONFIG_PAGE_BIOS_1.
  * --------------------------------------------------------------------------
  */
 
@@ -1334,9 +1336,17 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
 	*PTR_MPI2_CONFIG_PAGE_BIOS_1,
 	Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
 
-#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x05)
+#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x06)
 
 /*values for BIOS Page 1 BiosOptions field */
+#define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS		    (0x00000400)
+
+#define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD	(0x00000300)
+#define MPI2_BIOSPAGE1_OPTIONS_USE_BIT0_REGISTRATION_UEFI_BSD	(0x00000000)
+#define MPI2_BIOSPAGE1_OPTIONS_FULL_REGISTRATION_UEFI_BSD	(0x00000100)
+#define MPI2_BIOSPAGE1_OPTIONS_ADAPTER_REGISTRATION_UEFI_BSD	(0x00000200)
+#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_REGISTRATION_UEFI_BSD	(0x00000300)
+
 #define MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID                  (0x000000F0)
 #define MPI2_BIOSPAGE1_OPTIONS_LSI_OEM_ID                   (0x00000000)
 
diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_tool.h b/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
index 904910d..1629e5b 100644
--- a/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
+++ b/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
@@ -6,7 +6,7 @@
  *         Title:  MPI diagnostic tool structures and definitions
  * Creation Date:  March 26, 2007
  *
- *   mpi2_tool.h Version:  02.00.11
+ *   mpi2_tool.h Version:  02.00.12
  *
  * Version History
  * ---------------
@@ -33,6 +33,7 @@
  * 07-26-12  02.00.10  Modified MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST so that
  *                     it uses MPI Chain SGE as well as MPI Simple SGE.
  * 08-19-13  02.00.11  Added MPI2_TOOLBOX_TEXT_DISPLAY_TOOL and related info.
+ * 01-08-14  02.00.12  Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC.
  * --------------------------------------------------------------------------
  */
 
@@ -100,6 +101,7 @@ typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST {
 #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
 #define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
 #define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
+#define MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC   (0x04000000)
 #define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
 #define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
 #define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
-- 
2.0.2


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

* [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (8 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:46     ` Johannes Thumshirn
                     ` (2 more replies)
  2015-06-12  9:42 ` [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA Sreekanth Reddy
                   ` (9 subsequent siblings)
  19 siblings, 3 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Added the following Dell branding to the mpt3sas driver.

"VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++
 drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
 2 files changed, 47 insertions(+)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 6739c0a..db362cb 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc)
 
 
 /**
+ * _base_display_dell_branding - Display branding string
+ * @ioc: per adapter object
+ *
+ * Return nothing.
+ */
+static void
+_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
+{
+	if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL)
+		return;
+
+	switch (ioc->pdev->device) {
+	case MPI25_MFGPAGE_DEVID_SAS3008:
+		switch (ioc->pdev->subsystem_device) {
+		case MPT3SAS_DELL_12G_HBA_SSDID:
+			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
+				MPT3SAS_DELL_12G_HBA_BRANDING);
+			break;
+		default:
+			pr_info(MPT3SAS_FMT
+			   "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
+			   ioc->pdev->subsystem_device);
+			break;
+		}
+		break;
+	default:
+		pr_info(MPT3SAS_FMT
+			"Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
+			ioc->pdev->subsystem_device);
+		break;
+	}
+}
+
+
+/**
  * _base_display_ioc_capabilities - Disply IOC's capabilities.
  * @ioc: per adapter object
  *
@@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
 	    bios_version & 0x000000FF);
 
 	_base_display_intel_branding(ioc);
+	_base_display_dell_branding(ioc);
 
 	pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
 
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index 2318ef8..c4780c7 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -152,6 +152,17 @@
 #define MPT3SAS_INTEL_RS3UC080_SSDID    0x3524
 
 /*
+ * Dell HBA branding
+ */
+#define MPT3SAS_DELL_12G_HBA_BRANDING       \
+	"Dell 12Gbps HBA"
+
+/*
+ * Dell HBA SSDIDs
+ */
+#define MPT3SAS_DELL_12G_HBA_SSDID	0x1F46
+
+/*
  * status bits for ioc->diag_buffer_status
  */
 #define MPT3_DIAG_BUFFER_IS_REGISTERED	(0x01)
-- 
2.0.2


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

* [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (9 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-18  9:55   ` Sreekanth Reddy
  2015-06-19 20:34     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00 Sreekanth Reddy
                   ` (8 subsequent siblings)
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Add the following OEM's branding to the mpt3sas driver.

"VendorID"   "DeviceID"  "SubsystemVendor ID"   "SubsystemDevice ID"  Cisco Branding String
0x1000         0x97         SVID = 0x1137             0x014C          Cisco 9300-8E 12G SAS HBA

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 34 ++++++++++++++++++++++++++++++++++
 drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
 2 files changed, 45 insertions(+)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index db362cb..267e489 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2378,6 +2378,39 @@ _base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
 	}
 }
 
+/**
+ * _base_display_cisco_branding - Display branding string
+ * @ioc: per adapter object
+ *
+ * Return nothing.
+ */
+static void
+_base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc)
+{
+	if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_CISCO)
+		return;
+
+	switch (ioc->pdev->device) {
+	case MPI25_MFGPAGE_DEVID_SAS3008:
+		switch (ioc->pdev->subsystem_device) {
+		case MPT3SAS_CISCO_12G_HBA_SSDID:
+			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
+				MPT3SAS_CISCO_12G_HBA_BRANDING);
+			break;
+		default:
+			pr_info(MPT3SAS_FMT
+			  "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
+			  ioc->name, ioc->pdev->subsystem_device);
+			break;
+		}
+		break;
+	default:
+		 pr_info(MPT3SAS_FMT
+			"Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
+			ioc->name, ioc->pdev->subsystem_device);
+		break;
+	}
+}
 
 /**
  * _base_display_ioc_capabilities - Disply IOC's capabilities.
@@ -2410,6 +2443,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
 
 	_base_display_intel_branding(ioc);
 	_base_display_dell_branding(ioc);
+	_base_display_cisco_branding(ioc);
 
 	pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
 
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index c4780c7..7cdbc65 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -163,6 +163,17 @@
 #define MPT3SAS_DELL_12G_HBA_SSDID	0x1F46
 
 /*
+ * Cisco HBA branding
+ */
+#define MPT3SAS_CISCO_12G_HBA_BRANDING       \
+	"Cisco 9300-8E 12G SAS HBA"
+
+/*
+ * Cisco HBA SSSDIDs
+ */
+ #define MPT3SAS_CISCO_12G_HBA_SSDID  0x14C
+
+/*
  * status bits for ioc->diag_buffer_status
  */
 #define MPT3_DIAG_BUFFER_IS_REGISTERED	(0x01)
-- 
2.0.2


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

* [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (10 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:53     ` Johannes Thumshirn
  2015-06-19 20:35     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications Sreekanth Reddy
                   ` (7 subsequent siblings)
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Bump mpt3sas driver version to v6.100.00.00.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index 7cdbc65..a89c752 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -71,8 +71,8 @@
 #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		"05.100.00.00"
-#define MPT3SAS_MAJOR_VERSION		5
+#define MPT3SAS_DRIVER_VERSION		"06.100.00.00"
+#define MPT3SAS_MAJOR_VERSION		6
 #define MPT3SAS_MINOR_VERSION		100
 #define MPT3SAS_BUILD_VERSION		0
 #define MPT3SAS_RELEASE_VERSION	00
-- 
2.0.2


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

* [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (11 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00 Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:54     ` Johannes Thumshirn
  2015-06-19 20:36     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 14/20] [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081 Sreekanth Reddy
                   ` (6 subsequent siblings)
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Below are the new changes to MPI 2.5 Rev K(2.5.6) specification and 2.00.35 header files
1) Added a minimum size requirement for target mode command buffers.
2) Added MinMSIxIndex and MaxMSIxIndex fields to CommandBufferPostBase Request.
3) For BIOS Page 1, added SSUTimeout field, and added Product Name String Format bits to the BiosOptions field

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpi/mpi2.h      |  5 +++--
 drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 17 ++++++++++++++---
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpi/mpi2.h b/drivers/scsi/mpt3sas/mpi/mpi2.h
index c2d127c..ec27ad2 100644
--- a/drivers/scsi/mpt3sas/mpi/mpi2.h
+++ b/drivers/scsi/mpt3sas/mpi/mpi2.h
@@ -8,7 +8,7 @@
  *                 scatter/gather formats.
  * Creation Date:  June 21, 2006
  *
- * mpi2.h Version:  02.00.34
+ * mpi2.h Version:  02.00.35
  *
  * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  *       prefix are for use only on MPI v2.5 products, and must not be used
@@ -91,6 +91,7 @@
  * 08-19-13  02.00.32  Bumped MPI2_HEADER_VERSION_UNIT.
  * 12-05-13  02.00.33  Bumped MPI2_HEADER_VERSION_UNIT.
  * 01-08-14  02.00.34  Bumped MPI2_HEADER_VERSION_UNIT
+ * 06-13-14  02.00.35  Bumped MPI2_HEADER_VERSION_UNIT.
  * --------------------------------------------------------------------------
  */
 
@@ -124,7 +125,7 @@
 #define MPI2_VERSION_02_05                  (0x0205)
 
 /*Unit and Dev versioning for this MPI header set */
-#define MPI2_HEADER_VERSION_UNIT            (0x22)
+#define MPI2_HEADER_VERSION_UNIT            (0x23)
 #define MPI2_HEADER_VERSION_DEV             (0x00)
 #define MPI2_HEADER_VERSION_UNIT_MASK       (0xFF00)
 #define MPI2_HEADER_VERSION_UNIT_SHIFT      (8)
diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
index 66f2cc1..c337a85 100644
--- a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
+++ b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
@@ -6,7 +6,7 @@
  *         Title:  MPI Configuration messages and pages
  * Creation Date:  November 10, 2006
  *
- *   mpi2_cnfg.h Version:  02.00.28
+ *   mpi2_cnfg.h Version:  02.00.29
  *
  * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  *       prefix are for use only on MPI v2.5 products, and must not be used
@@ -177,6 +177,8 @@
  *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
  * 01-08-14  02.00.28  Added more defines for the BiosOptions field of
  *		       MPI2_CONFIG_PAGE_BIOS_1.
+ * 06-13-14  02.00.29  Added SSUTimeout field to MPI2_CONFIG_PAGE_BIOS_1, and
+ *		       more defines for the BiosOptions field..
  * --------------------------------------------------------------------------
  */
 
@@ -1324,7 +1326,9 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
 	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
 	U32                     BiosOptions;                /*0x04 */
 	U32                     IOCSettings;                /*0x08 */
-	U32                     Reserved1;                  /*0x0C */
+	U8                      SSUTimeout;                 /*0x0C */
+	U8                      Reserved1;                  /*0x0D */
+	U16                     Reserved2;                  /*0x0E */
 	U32                     DeviceSettings;             /*0x10 */
 	U16                     NumberOfDevices;            /*0x14 */
 	U16                     UEFIVersion;                /*0x16 */
@@ -1336,9 +1340,16 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
 	*PTR_MPI2_CONFIG_PAGE_BIOS_1,
 	Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
 
-#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x06)
+#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x07)
 
 /*values for BIOS Page 1 BiosOptions field */
+#define MPI2_BIOSPAGE1_OPTIONS_PNS_MASK                         (0x00003800)
+#define MPI2_BIOSPAGE1_OPTIONS_PNS_PBDHL                        (0x00000000)
+#define MPI2_BIOSPAGE1_OPTIONS_PNS_ENCSLOSURE                   (0x00000800)
+#define MPI2_BIOSPAGE1_OPTIONS_PNS_LWWID                        (0x00001000)
+#define MPI2_BIOSPAGE1_OPTIONS_PNS_PSENS                        (0x00001800)
+#define MPI2_BIOSPAGE1_OPTIONS_PNS_ESPHY                        (0x00002000)
+
 #define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS		    (0x00000400)
 
 #define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD	(0x00000300)
-- 
2.0.2


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

* [PATCH 14/20] [SCSI] mpt3sas: Complete the SCSI command with  DID_RESET status for log_info value 0x0x32010081
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (12 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15 10:01   ` Johannes Thumshirn
  2015-06-12  9:42 ` [PATCH 15/20] [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command Sreekanth Reddy
                   ` (5 subsequent siblings)
  19 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

For any SCSI command, if the driver receives
IOC status = SCSI_IOC_TERMINATED and log info = 0x32010081 then
that command will be completed with DID_RESET host status.

The definition of this log info value is
"Virtual IO has failed and has to be retried".

Firmware will provide this log info value with IOC Status
"SCSI_IOC_TERMINATED", whenever a drive (with is a part of a volume)
is pulled and pushed back within some minimal delay.
With this log info value, firmware informs the driver to retry the
failed IO command infinite times, so to provide some time for the
firmware to discover the reinserted drive successfully instated of
just retrying failed command for five times(doesn't giving enough
time for firmware to complete the drive discovery) and failing the
IO permanently even though drive came back successfully.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 64dd90b..837c22a 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -4241,6 +4241,9 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
 				scmd->device->expecting_cc_ua = 1;
 			}
 			break;
+		} else if (log_info == 0x32010081) {
+			scmd->result = DID_RESET << 16;
+			break;
 		}
 		scmd->result = DID_SOFT_ERROR << 16;
 		break;
-- 
2.0.2


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

* [PATCH 15/20] [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (13 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 14/20] [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081 Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:54   ` Johannes Thumshirn
  2015-06-19 20:40     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding Sreekanth Reddy
                   ` (4 subsequent siblings)
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

scsi_dma_map API will return a negative value (i.e. -ENOMEM)
if DMA mapping of sg lists fails and zero if the sg list in the
SCSI cmd is NULL. But drivers doesn't handled sg list DMA mapping
failure case properly.

So, Updated the code to return host busy error status to SCSI MID Layer(SML),
when DMA mapping of scatter gather list fails for a SCSI command.
So that SML will retry this SCSI cmd after some time.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 267e489..0b26c8d 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1345,7 +1345,7 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc,
 
 	sg_scmd = scsi_sglist(scmd);
 	sges_left = scsi_dma_map(scmd);
-	if (!sges_left) {
+	if (!sges_left < 0) {
 		sdev_printk(KERN_ERR, scmd->device,
 			"pci_map_sg failed: request for %d bytes!\n",
 			scsi_bufflen(scmd));
@@ -1414,7 +1414,7 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc,
  fill_in_last_segment:
 
 	/* fill the last segment */
-	while (sges_left) {
+	while (sges_left > 0) {
 		if (sges_left == 1)
 			_base_add_sg_single_ieee(sg_local,
 			    simple_sgl_flags_last, 0, sg_dma_len(sg_scmd),
-- 
2.0.2


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

* [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (14 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 15/20] [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-18  9:53   ` Sreekanth Reddy
  2015-06-19 20:44     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API Sreekanth Reddy
                   ` (3 subsequent siblings)
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Added support for below customer specific brandings

"VendorID"   "DeviceID"  "SubsystemVendor ID"   "SubsystemDevice ID"  Cisco Branding String
0x1000         0x97           0x1137                 0x154           Cisco 9300-8i 12Gbps SAS HBA
0x1000         0x97           0x1137                 0x155           Cisco 12G Modular SAS Pass through Controller
0x1000         0x97           0x1137                 0x156           UCS C3X60 12G SAS Pass through Controller

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 29 +++++++++++++++++++++++++++--
 drivers/scsi/mpt3sas/mpt3sas_base.h | 16 ++++++++++++----
 2 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 0b26c8d..2f2c331 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2393,9 +2393,17 @@ _base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc)
 	switch (ioc->pdev->device) {
 	case MPI25_MFGPAGE_DEVID_SAS3008:
 		switch (ioc->pdev->subsystem_device) {
-		case MPT3SAS_CISCO_12G_HBA_SSDID:
+		case MPT3SAS_CISCO_12G_8E_HBA_SSDID:
 			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
-				MPT3SAS_CISCO_12G_HBA_BRANDING);
+				MPT3SAS_CISCO_12G_8E_HBA_BRANDING);
+			break;
+		case MPT3SAS_CISCO_12G_8I_HBA_SSDID:
+			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
+				MPT3SAS_CISCO_12G_8I_HBA_BRANDING);
+			break;
+		case MPT3SAS_CISCO_12G_AVILA_HBA_SSDID:
+			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
+				MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING);
 			break;
 		default:
 			pr_info(MPT3SAS_FMT
@@ -2404,6 +2412,23 @@ _base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc)
 			break;
 		}
 		break;
+	case MPI25_MFGPAGE_DEVID_SAS3108_1:
+		switch (ioc->pdev->subsystem_device) {
+		case MPT3SAS_CISCO_12G_AVILA_HBA_SSDID:
+			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
+			MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING);
+			break;
+		case MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_SSDID:
+			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
+			MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING);
+			break;
+		default:
+			pr_info(MPT3SAS_FMT
+			 "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
+			 ioc->name, ioc->pdev->subsystem_device);
+			break;
+		}
+		break;
 	default:
 		 pr_info(MPT3SAS_FMT
 			"Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index a89c752..b97039b 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -165,13 +165,21 @@
 /*
  * Cisco HBA branding
  */
-#define MPT3SAS_CISCO_12G_HBA_BRANDING       \
-	"Cisco 9300-8E 12G SAS HBA"
-
+#define MPT3SAS_CISCO_12G_8E_HBA_BRANDING		\
+		"Cisco 9300-8E 12G SAS HBA"
+#define MPT3SAS_CISCO_12G_8I_HBA_BRANDING		\
+		"Cisco 9300-8i 12G SAS HBA"
+#define MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING	\
+		"Cisco 12G Modular SAS Pass through Controller"
+#define MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING		\
+		"UCS C3X60 12G SAS Pass through Controller"
 /*
  * Cisco HBA SSSDIDs
  */
- #define MPT3SAS_CISCO_12G_HBA_SSDID  0x14C
+#define MPT3SAS_CISCO_12G_8E_HBA_SSDID  0x14C
+#define MPT3SAS_CISCO_12G_8I_HBA_SSDID  0x154
+#define MPT3SAS_CISCO_12G_AVILA_HBA_SSDID  0x155
+#define MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_SSDID  0x156
 
 /*
  * status bits for ioc->diag_buffer_status
-- 
2.0.2


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

* [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (15 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-12 21:03     ` Joe Lawrence
  2015-06-12  9:42 ` [PATCH 18/20] [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API Sreekanth Reddy
                   ` (2 subsequent siblings)
  19 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Created a thread using alloc_ordered_workqueue() API in order to process
the works from firmware Work-queue sequentially instead of
create_singlethread_workqueue() API.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 837c22a..42bb731 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -8024,8 +8024,13 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	/* event thread */
 	snprintf(ioc->firmware_event_name, sizeof(ioc->firmware_event_name),
 	    "fw_event%d", ioc->id);
-	ioc->firmware_event_thread = create_singlethread_workqueue(
+#if defined(alloc_ordered_workqueue)
+	ioc->firmware_event_thread = alloc_ordered_workqueue(
+		ioc->firmware_event_name, WQ_MEM_RECLAIM);
+#else
+		ioc->firmware_event_thread = create_singlethread_workqueue(
 	    ioc->firmware_event_name);
+#endif
 	if (!ioc->firmware_event_thread) {
 		pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n",
 		    ioc->name, __FILE__, __LINE__, __func__);
-- 
2.0.2


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

* [PATCH 18/20] [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (16 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:55   ` Johannes Thumshirn
  2015-06-19 20:47     ` Martin K. Petersen
  2015-06-12  9:42 ` [PATCH 19/20] [SCSI] mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os Sreekanth Reddy
  2015-06-12  9:42 ` [PATCH 20/20] [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00 Sreekanth Reddy
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Added dma_mapping_error() API after mapping an address with dma_map_single() API.
Otherwise when CONFIG_DMA_API_DEBUG is enabled in the kernel, then it complains
about mpt3sas driver not calling dma_mapping_error after mapping an address with
dma_map_single

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_transport.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_transport.c b/drivers/scsi/mpt3sas/mpt3sas_transport.c
index 7a7aa68..70fd019 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_transport.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_transport.c
@@ -1964,7 +1964,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
 	} else {
 		dma_addr_out = pci_map_single(ioc->pdev, bio_data(req->bio),
 		    blk_rq_bytes(req), PCI_DMA_BIDIRECTIONAL);
-		if (!dma_addr_out) {
+		if (pci_dma_mapping_error(ioc->pdev, dma_addr_out)) {
 			pr_info(MPT3SAS_FMT "%s(): DMA Addr out = NULL\n",
 			    ioc->name, __func__);
 			rc = -ENOMEM;
@@ -1986,7 +1986,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
 	} else {
 		dma_addr_in =  pci_map_single(ioc->pdev, bio_data(rsp->bio),
 		    blk_rq_bytes(rsp), PCI_DMA_BIDIRECTIONAL);
-		if (!dma_addr_in) {
+		if (pci_dma_mapping_error(ioc->pdev, dma_addr_in)) {
 			pr_info(MPT3SAS_FMT "%s(): DMA Addr in = NULL\n",
 			    ioc->name, __func__);
 			rc = -ENOMEM;
-- 
2.0.2


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

* [PATCH 19/20] [SCSI] mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (17 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 18/20] [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:58   ` Johannes Thumshirn
  2015-06-12  9:42 ` [PATCH 20/20] [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00 Sreekanth Reddy
  19 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Issue: When the disks are getting discovered and assigned device
handles by the kernel, a device block followed by an unblock
(due to broadcast primitives) issued by the driver is
interspersed by the kernel changing the state of the device.
Therefore the unblock by the driver results in a no operation
within the kernel API.

To fix this one, the below patch checks the return of the unblock API
and performs a block followed by an unblock to unfreeze the block
layer's I/O queue. Sufficient checks and prints are also added in the
driver to identify this condition caused by the kernel.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 89 ++++++++++++++++++++++++++++++------
 1 file changed, 75 insertions(+), 14 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 42bb731..5405a2f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -2605,6 +2605,75 @@ _scsih_fw_event_cleanup_queue(struct MPT3SAS_ADAPTER *ioc)
 }
 
 /**
+ * _scsih_internal_device_block - block the sdev device
+ * @sdev: per device object
+ * @sas_device_priv_data : per device driver private data
+ *
+ * make sure device is blocked without error, if not
+ * print an error
+ */
+static void
+_scsih_internal_device_block(struct scsi_device *sdev,
+			struct MPT3SAS_DEVICE *sas_device_priv_data)
+{
+	int r = 0;
+
+	sdev_printk(KERN_INFO, sdev, "device_block, handle(0x%04x)\n",
+	    sas_device_priv_data->sas_target->handle);
+	sas_device_priv_data->block = 1;
+
+	r = scsi_internal_device_block(sdev);
+	if (r == -EINVAL)
+		sdev_printk(KERN_WARNING, sdev,
+		    "device_block failed with return(%d) for handle(0x%04x)\n",
+		    sas_device_priv_data->sas_target->handle, r);
+}
+
+/**
+ * _scsih_internal_device_unblock - unblock the sdev device
+ * @sdev: per device object
+ * @sas_device_priv_data : per device driver private data
+ * make sure device is unblocked without error, if not retry
+ * by blocking and then unblocking
+ */
+
+static void
+_scsih_internal_device_unblock(struct scsi_device *sdev,
+			struct MPT3SAS_DEVICE *sas_device_priv_data)
+{
+	int r = 0;
+
+	sdev_printk(KERN_WARNING, sdev, "device_unblock and setting to running, "
+	    "handle(0x%04x)\n", sas_device_priv_data->sas_target->handle);
+	sas_device_priv_data->block = 0;
+	r = scsi_internal_device_unblock(sdev, SDEV_RUNNING);
+	if (r == -EINVAL) {
+		/* The device has been set to SDEV_RUNNING by SD layer during
+		 * device addition but the request queue is still stopped by
+		 * our earlier block call. We need to perform a block again
+		 * to get the device to SDEV_BLOCK and then to SDEV_RUNNING */
+
+		sdev_printk(KERN_WARNING, sdev,
+		    "device_unblock failed with return(%d) for handle(0x%04x) "
+		    "performing a block followed by an unblock\n",
+		    sas_device_priv_data->sas_target->handle, r);
+		sas_device_priv_data->block = 1;
+		r = scsi_internal_device_block(sdev);
+		if (r)
+			sdev_printk(KERN_WARNING, sdev, "retried device_block "
+			    "failed with return(%d) for handle(0x%04x)\n",
+			    sas_device_priv_data->sas_target->handle, r);
+
+		sas_device_priv_data->block = 0;
+		r = scsi_internal_device_unblock(sdev, SDEV_RUNNING);
+		if (r)
+			sdev_printk(KERN_WARNING, sdev, "retried device_unblock"
+			    " failed with return(%d) for handle(0x%04x)\n",
+			    sas_device_priv_data->sas_target->handle, r);
+	}
+}
+
+/**
  * _scsih_ublock_io_all_device - unblock every device
  * @ioc: per adapter object
  *
@@ -2623,11 +2692,10 @@ _scsih_ublock_io_all_device(struct MPT3SAS_ADAPTER *ioc)
 		if (!sas_device_priv_data->block)
 			continue;
 
-		sas_device_priv_data->block = 0;
 		dewtprintk(ioc, sdev_printk(KERN_INFO, sdev,
 			"device_running, handle(0x%04x)\n",
 		    sas_device_priv_data->sas_target->handle));
-		scsi_internal_device_unblock(sdev, SDEV_RUNNING);
+		_scsih_internal_device_unblock(sdev, sas_device_priv_data);
 	}
 }
 
@@ -2652,10 +2720,9 @@ _scsih_ublock_io_device(struct MPT3SAS_ADAPTER *ioc, u64 sas_address)
 		if (sas_device_priv_data->sas_target->sas_address
 		    != sas_address)
 			continue;
-		if (sas_device_priv_data->block) {
-			sas_device_priv_data->block = 0;
-			scsi_internal_device_unblock(sdev, SDEV_RUNNING);
-		}
+		if (sas_device_priv_data->block)
+			_scsih_internal_device_unblock(sdev,
+				sas_device_priv_data);
 	}
 }
 
@@ -2678,10 +2745,7 @@ _scsih_block_io_all_device(struct MPT3SAS_ADAPTER *ioc)
 			continue;
 		if (sas_device_priv_data->block)
 			continue;
-		sas_device_priv_data->block = 1;
-		scsi_internal_device_block(sdev);
-		sdev_printk(KERN_INFO, sdev, "device_blocked, handle(0x%04x)\n",
-		    sas_device_priv_data->sas_target->handle);
+		_scsih_internal_device_block(sdev, sas_device_priv_data);
 	}
 }
 
@@ -2713,10 +2777,7 @@ _scsih_block_io_device(struct MPT3SAS_ADAPTER *ioc, u16 handle)
 			continue;
 		if (sas_device->pend_sas_rphy_add)
 			continue;
-		sas_device_priv_data->block = 1;
-		scsi_internal_device_block(sdev);
-		sdev_printk(KERN_INFO, sdev,
-			"device_blocked, handle(0x%04x)\n", handle);
+		_scsih_internal_device_block(sdev, sas_device_priv_data);
 	}
 }
 
-- 
2.0.2


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

* [PATCH 20/20] [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00
  2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
                   ` (18 preceding siblings ...)
  2015-06-12  9:42 ` [PATCH 19/20] [SCSI] mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os Sreekanth Reddy
@ 2015-06-12  9:42 ` Sreekanth Reddy
  2015-06-15  9:56   ` Johannes Thumshirn
  2015-06-19 21:01     ` Martin K. Petersen
  19 siblings, 2 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12  9:42 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, Sreekanth Reddy

Bump mpt3sas driver version to 9.100.00.00

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index b97039b..0ffe763 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -71,8 +71,8 @@
 #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		"06.100.00.00"
-#define MPT3SAS_MAJOR_VERSION		6
+#define MPT3SAS_DRIVER_VERSION		"09.100.00.00"
+#define MPT3SAS_MAJOR_VERSION		9
 #define MPT3SAS_MINOR_VERSION		100
 #define MPT3SAS_BUILD_VERSION		0
 #define MPT3SAS_RELEASE_VERSION	00
-- 
2.0.2


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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
  2015-06-12  9:42 ` [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support Sreekanth Reddy
@ 2015-06-12 11:09   ` Johannes Thumshirn
  2015-06-12 11:16       ` Sreekanth Reddy
  0 siblings, 1 reply; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-12 11:09 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:13PM +0530, Sreekanth Reddy wrote:
> In this patch, increased the number of MSIX vector support for SAS3 C0 HBAs to up-to 96.
> 
> Following are changes that are done in this patch
> 1. Support this feature only for SAS3 C0 cards and also only when reply post free queue count is greater than 8.
> 2. Instead of using single ReplyPostHostIndex system interface, here 12 ReplyPostHostIndex system interfaces are used. reply post free queues numbered from 0 to 7 use the first ReplyPostHostIndex system interface to update its corresponding ReplyPostHostIndex values, reply post free queues numbered from 8 to 15 will use the second ReplyPostHostIndex system interface and so on. These 12 ReplyPostHostIndex system interfaces address are saved in the array replyPostRegisterIndex[].
> 3. Update the ReplyPostHostIndex value of corresponding reply post free queue in the (its msix_index/8)th entry of replyPostRegisterIndex[] array after processing the reply post descriptor.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 70 +++++++++++++++++++++++++++++++++----
>  drivers/scsi/mpt3sas/mpt3sas_base.h |  7 +++-
>  2 files changed, 69 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 14a781b..c13a365 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -83,7 +83,7 @@ static int msix_disable = -1;
>  module_param(msix_disable, int, 0);
>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
>  
> -static int max_msix_vectors = 8;
> +static int max_msix_vectors = -1;
>  module_param(max_msix_vectors, int, 0);
>  MODULE_PARM_DESC(max_msix_vectors,
>  	" max msix vectors - (default=8)");

When changing the default value, please also update the description reflecting
this change.

> @@ -1009,8 +1009,15 @@ _base_interrupt(int irq, void *bus_id)
>  	}
>  
>  	wmb();
> -	writel(reply_q->reply_post_host_index | (msix_index <<
> -	    MPI2_RPHI_MSIX_INDEX_SHIFT), &ioc->chip->ReplyPostHostIndex);
> +	if (ioc->msix96_vector) {
> +		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);
> +	}
>  	atomic_dec(&reply_q->busy);
>  	return IRQ_HANDLED;
>  }
> @@ -1560,8 +1567,6 @@ _base_check_enable_msix(struct MPT3SAS_ADAPTER *ioc)
>  
>  	pci_read_config_word(ioc->pdev, base + 2, &message_control);
>  	ioc->msix_vector_count = (message_control & 0x3FF) + 1;
> -	if (ioc->msix_vector_count > 8)
> -		ioc->msix_vector_count = 8;
>  	dinitprintk(ioc, pr_info(MPT3SAS_FMT
>  		"msix is supported, vector_count(%d)\n",
>  		ioc->name, ioc->msix_vector_count));
> @@ -1880,6 +1885,31 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>  	if (r)
>  		goto out_fail;
>  
> +	/* Use the Combined reply queue feature only for SAS3 C0 HBAs and
> +	 * also only when reply queue count is greater than 8
> +	 */
> +	if (ioc->msix96_vector && ioc->reply_queue_count > 8) {
> +		/* If this is an 96 vector supported device,
> +		set up ReplyPostIndex addresses */
> +		ioc->replyPostRegisterIndex = kcalloc(12,
> +			sizeof(resource_size_t *), GFP_KERNEL);
> +		if (!ioc->replyPostRegisterIndex) {
> +			dfailprintk(ioc, printk(MPT3SAS_FMT
> +			"allocation for reply Post Register Index failed!!!\n",
> +								   ioc->name));
> +			r = -ENOMEM;
> +			goto out_fail;
> +		}
> +
> +		for (i = 0; i < 12; i++) {
> +			ioc->replyPostRegisterIndex[i] = (resource_size_t *)
> +				((u8 *)&ioc->chip->Doorbell +
> +				MPI25_SUP_REPLY_POST_HOST_INDEX_OFFSET +
> +				(i * 0x10));
> +		}
> +	} else
> +		ioc->msix96_vector = 0;
> +
>  	list_for_each_entry(reply_q, &ioc->reply_queue_list, list)
>  		pr_info(MPT3SAS_FMT "%s: IRQ %d\n",
>  		    reply_q->name,  ((ioc->msix_enable) ? "PCI-MSI-X enabled" :
> @@ -1901,6 +1931,8 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>  	pci_release_selected_regions(ioc->pdev, ioc->bars);
>  	pci_disable_pcie_error_reporting(pdev);
>  	pci_disable_device(pdev);
> +	if (ioc->msix96_vector)
> +		kfree(ioc->replyPostRegisterIndex);
>  	return r;
>  }
>  
> @@ -4522,8 +4554,16 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>  
>  	/* initialize reply post host index */
>  	list_for_each_entry(reply_q, &ioc->reply_queue_list, list) {
> -		writel(reply_q->msix_index << MPI2_RPHI_MSIX_INDEX_SHIFT,
> -		    &ioc->chip->ReplyPostHostIndex);
> +		if (ioc->msix96_vector) {
> +			writel((reply_q->msix_index & 7)<<
> +			   MPI2_RPHI_MSIX_INDEX_SHIFT,
> +			   ioc->replyPostRegisterIndex[reply_q->msix_index/8]);
> +		} else {
> +			writel(reply_q->msix_index <<
> +				MPI2_RPHI_MSIX_INDEX_SHIFT,
> +					&ioc->chip->ReplyPostHostIndex);
> +		}
> +
>  		if (!_base_is_controller_msix_enabled(ioc))
>  			goto skip_init_reply_post_host_index;
>  	}
> @@ -4577,6 +4617,9 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>  	_base_free_irq(ioc);
>  	_base_disable_msix(ioc);
>  
> +	if (ioc->msix96_vector)
> +		kfree(ioc->replyPostRegisterIndex);
> +
>  	if (ioc->chip_phys && ioc->chip)
>  		iounmap(ioc->chip);
>  	ioc->chip_phys = 0;
> @@ -4600,6 +4643,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>  {
>  	int r, i;
>  	int cpu_id, last_cpu_id = 0;
> +	u8 revision;
>  
>  	dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>  	    __func__));
> @@ -4618,6 +4662,18 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>  		r = -ENOMEM;
>  		goto out_free_resources;
>  	}
> +	/* Check whether the controller revision is C0 or above.
> +	    C0 and above revision controllers support 96 vectors */
> +	revision = ioc->pdev->revision;
> +
> +	if ((ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3004 ||
> +	     ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3008 ||
> +	     ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_1 ||
> +	     ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_2 ||
> +	     ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_5 ||
> +	     ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_6) &&
> +	     (revision >= 0x02))
> +		ioc->msix96_vector = 1;
>  
>  	ioc->rdpq_array_enable_assigned = 0;
>  	ioc->dma_mask = 0;
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index afa8816..6b8d8f1 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -728,7 +728,8 @@ typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc);
>   *				is assigned only ones
>   * @reply_queue_count: number of reply queue's
>   * @reply_queue_list: link list contaning the reply queue info
> - * @reply_post_host_index: head index in the pool where FW completes IO
> + * @msix96_vector: 96 MSI-X vector support
> + * @replyPostRegisterIndex: index of next position in Reply Desc Post Queue
>   * @delayed_tr_list: target reset link list
>   * @delayed_tr_volume_list: volume target reset link list
>   * @@temp_sensors_count: flag to carry the number of temperature sensors
> @@ -937,6 +938,10 @@ struct MPT3SAS_ADAPTER {
>  	u8		reply_queue_count;
>  	struct list_head reply_queue_list;
>  
> +	u8		msix96_vector;
> +	/* reply post register index */
> +	resource_size_t	**replyPostRegisterIndex;
> +

I know there are many uses of mixed-case varibles in this driver and changing
them when they're already in makes no sense, but maybe you could consider
getting rid of them in your mpt2sas/mpt3sas merge, as it is not really a
commonly seen pattern in the linux kernel.

>  	struct list_head delayed_tr_list;
>  	struct list_head delayed_tr_volume_list;
>  	u8		temp_sensors_count;
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
  2015-06-12 11:09   ` Johannes Thumshirn
@ 2015-06-12 11:16       ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12 11:16 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

Thanks Johannes, we will take care of this point in our current
on-development mpt2sas/mpt3sas merging activity.


Thanks,
Sreekanth

On Fri, Jun 12, 2015 at 4:39 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 03:12:13PM +0530, Sreekanth Reddy wrote:
>> In this patch, increased the number of MSIX vector support for SAS3 C0 HBAs to up-to 96.
>>
>> Following are changes that are done in this patch
>> 1. Support this feature only for SAS3 C0 cards and also only when reply post free queue count is greater than 8.
>> 2. Instead of using single ReplyPostHostIndex system interface, here 12 ReplyPostHostIndex system interfaces are used. reply post free queues numbered from 0 to 7 use the first ReplyPostHostIndex system interface to update its corresponding ReplyPostHostIndex values, reply post free queues numbered from 8 to 15 will use the second ReplyPostHostIndex system interface and so on. These 12 ReplyPostHostIndex system interfaces address are saved in the array replyPostRegisterIndex[].
>> 3. Update the ReplyPostHostIndex value of corresponding reply post free queue in the (its msix_index/8)th entry of replyPostRegisterIndex[] array after processing the reply post descriptor.
>>
>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_base.c | 70 +++++++++++++++++++++++++++++++++----
>>  drivers/scsi/mpt3sas/mpt3sas_base.h |  7 +++-
>>  2 files changed, 69 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> index 14a781b..c13a365 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> @@ -83,7 +83,7 @@ static int msix_disable = -1;
>>  module_param(msix_disable, int, 0);
>>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
>>
>> -static int max_msix_vectors = 8;
>> +static int max_msix_vectors = -1;
>>  module_param(max_msix_vectors, int, 0);
>>  MODULE_PARM_DESC(max_msix_vectors,
>>       " max msix vectors - (default=8)");
>
> When changing the default value, please also update the description reflecting
> this change.
>
>> @@ -1009,8 +1009,15 @@ _base_interrupt(int irq, void *bus_id)
>>       }
>>
>>       wmb();
>> -     writel(reply_q->reply_post_host_index | (msix_index <<
>> -         MPI2_RPHI_MSIX_INDEX_SHIFT), &ioc->chip->ReplyPostHostIndex);
>> +     if (ioc->msix96_vector) {
>> +             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);
>> +     }
>>       atomic_dec(&reply_q->busy);
>>       return IRQ_HANDLED;
>>  }
>> @@ -1560,8 +1567,6 @@ _base_check_enable_msix(struct MPT3SAS_ADAPTER *ioc)
>>
>>       pci_read_config_word(ioc->pdev, base + 2, &message_control);
>>       ioc->msix_vector_count = (message_control & 0x3FF) + 1;
>> -     if (ioc->msix_vector_count > 8)
>> -             ioc->msix_vector_count = 8;
>>       dinitprintk(ioc, pr_info(MPT3SAS_FMT
>>               "msix is supported, vector_count(%d)\n",
>>               ioc->name, ioc->msix_vector_count));
>> @@ -1880,6 +1885,31 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>>       if (r)
>>               goto out_fail;
>>
>> +     /* Use the Combined reply queue feature only for SAS3 C0 HBAs and
>> +      * also only when reply queue count is greater than 8
>> +      */
>> +     if (ioc->msix96_vector && ioc->reply_queue_count > 8) {
>> +             /* If this is an 96 vector supported device,
>> +             set up ReplyPostIndex addresses */
>> +             ioc->replyPostRegisterIndex = kcalloc(12,
>> +                     sizeof(resource_size_t *), GFP_KERNEL);
>> +             if (!ioc->replyPostRegisterIndex) {
>> +                     dfailprintk(ioc, printk(MPT3SAS_FMT
>> +                     "allocation for reply Post Register Index failed!!!\n",
>> +                                                                ioc->name));
>> +                     r = -ENOMEM;
>> +                     goto out_fail;
>> +             }
>> +
>> +             for (i = 0; i < 12; i++) {
>> +                     ioc->replyPostRegisterIndex[i] = (resource_size_t *)
>> +                             ((u8 *)&ioc->chip->Doorbell +
>> +                             MPI25_SUP_REPLY_POST_HOST_INDEX_OFFSET +
>> +                             (i * 0x10));
>> +             }
>> +     } else
>> +             ioc->msix96_vector = 0;
>> +
>>       list_for_each_entry(reply_q, &ioc->reply_queue_list, list)
>>               pr_info(MPT3SAS_FMT "%s: IRQ %d\n",
>>                   reply_q->name,  ((ioc->msix_enable) ? "PCI-MSI-X enabled" :
>> @@ -1901,6 +1931,8 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>>       pci_release_selected_regions(ioc->pdev, ioc->bars);
>>       pci_disable_pcie_error_reporting(pdev);
>>       pci_disable_device(pdev);
>> +     if (ioc->msix96_vector)
>> +             kfree(ioc->replyPostRegisterIndex);
>>       return r;
>>  }
>>
>> @@ -4522,8 +4554,16 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>>
>>       /* initialize reply post host index */
>>       list_for_each_entry(reply_q, &ioc->reply_queue_list, list) {
>> -             writel(reply_q->msix_index << MPI2_RPHI_MSIX_INDEX_SHIFT,
>> -                 &ioc->chip->ReplyPostHostIndex);
>> +             if (ioc->msix96_vector) {
>> +                     writel((reply_q->msix_index & 7)<<
>> +                        MPI2_RPHI_MSIX_INDEX_SHIFT,
>> +                        ioc->replyPostRegisterIndex[reply_q->msix_index/8]);
>> +             } else {
>> +                     writel(reply_q->msix_index <<
>> +                             MPI2_RPHI_MSIX_INDEX_SHIFT,
>> +                                     &ioc->chip->ReplyPostHostIndex);
>> +             }
>> +
>>               if (!_base_is_controller_msix_enabled(ioc))
>>                       goto skip_init_reply_post_host_index;
>>       }
>> @@ -4577,6 +4617,9 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>>       _base_free_irq(ioc);
>>       _base_disable_msix(ioc);
>>
>> +     if (ioc->msix96_vector)
>> +             kfree(ioc->replyPostRegisterIndex);
>> +
>>       if (ioc->chip_phys && ioc->chip)
>>               iounmap(ioc->chip);
>>       ioc->chip_phys = 0;
>> @@ -4600,6 +4643,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>>  {
>>       int r, i;
>>       int cpu_id, last_cpu_id = 0;
>> +     u8 revision;
>>
>>       dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>>           __func__));
>> @@ -4618,6 +4662,18 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>>               r = -ENOMEM;
>>               goto out_free_resources;
>>       }
>> +     /* Check whether the controller revision is C0 or above.
>> +         C0 and above revision controllers support 96 vectors */
>> +     revision = ioc->pdev->revision;
>> +
>> +     if ((ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3004 ||
>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3008 ||
>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_1 ||
>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_2 ||
>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_5 ||
>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_6) &&
>> +          (revision >= 0x02))
>> +             ioc->msix96_vector = 1;
>>
>>       ioc->rdpq_array_enable_assigned = 0;
>>       ioc->dma_mask = 0;
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> index afa8816..6b8d8f1 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> @@ -728,7 +728,8 @@ typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc);
>>   *                           is assigned only ones
>>   * @reply_queue_count: number of reply queue's
>>   * @reply_queue_list: link list contaning the reply queue info
>> - * @reply_post_host_index: head index in the pool where FW completes IO
>> + * @msix96_vector: 96 MSI-X vector support
>> + * @replyPostRegisterIndex: index of next position in Reply Desc Post Queue
>>   * @delayed_tr_list: target reset link list
>>   * @delayed_tr_volume_list: volume target reset link list
>>   * @@temp_sensors_count: flag to carry the number of temperature sensors
>> @@ -937,6 +938,10 @@ struct MPT3SAS_ADAPTER {
>>       u8              reply_queue_count;
>>       struct list_head reply_queue_list;
>>
>> +     u8              msix96_vector;
>> +     /* reply post register index */
>> +     resource_size_t **replyPostRegisterIndex;
>> +
>
> I know there are many uses of mixed-case varibles in this driver and changing
> them when they're already in makes no sense, but maybe you could consider
> getting rid of them in your mpt2sas/mpt3sas merge, as it is not really a
> commonly seen pattern in the linux kernel.
>
>>       struct list_head delayed_tr_list;
>>       struct list_head delayed_tr_volume_list;
>>       u8              temp_sensors_count;
>> --
>> 2.0.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

Regards,
Sreekanth

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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
@ 2015-06-12 11:16       ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12 11:16 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

Thanks Johannes, we will take care of this point in our current
on-development mpt2sas/mpt3sas merging activity.


Thanks,
Sreekanth

On Fri, Jun 12, 2015 at 4:39 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 03:12:13PM +0530, Sreekanth Reddy wrote:
>> In this patch, increased the number of MSIX vector support for SAS3 C0 HBAs to up-to 96.
>>
>> Following are changes that are done in this patch
>> 1. Support this feature only for SAS3 C0 cards and also only when reply post free queue count is greater than 8.
>> 2. Instead of using single ReplyPostHostIndex system interface, here 12 ReplyPostHostIndex system interfaces are used. reply post free queues numbered from 0 to 7 use the first ReplyPostHostIndex system interface to update its corresponding ReplyPostHostIndex values, reply post free queues numbered from 8 to 15 will use the second ReplyPostHostIndex system interface and so on. These 12 ReplyPostHostIndex system interfaces address are saved in the array replyPostRegisterIndex[].
>> 3. Update the ReplyPostHostIndex value of corresponding reply post free queue in the (its msix_index/8)th entry of replyPostRegisterIndex[] array after processing the reply post descriptor.
>>
>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_base.c | 70 +++++++++++++++++++++++++++++++++----
>>  drivers/scsi/mpt3sas/mpt3sas_base.h |  7 +++-
>>  2 files changed, 69 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> index 14a781b..c13a365 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> @@ -83,7 +83,7 @@ static int msix_disable = -1;
>>  module_param(msix_disable, int, 0);
>>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
>>
>> -static int max_msix_vectors = 8;
>> +static int max_msix_vectors = -1;
>>  module_param(max_msix_vectors, int, 0);
>>  MODULE_PARM_DESC(max_msix_vectors,
>>       " max msix vectors - (default=8)");
>
> When changing the default value, please also update the description reflecting
> this change.
>
>> @@ -1009,8 +1009,15 @@ _base_interrupt(int irq, void *bus_id)
>>       }
>>
>>       wmb();
>> -     writel(reply_q->reply_post_host_index | (msix_index <<
>> -         MPI2_RPHI_MSIX_INDEX_SHIFT), &ioc->chip->ReplyPostHostIndex);
>> +     if (ioc->msix96_vector) {
>> +             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);
>> +     }
>>       atomic_dec(&reply_q->busy);
>>       return IRQ_HANDLED;
>>  }
>> @@ -1560,8 +1567,6 @@ _base_check_enable_msix(struct MPT3SAS_ADAPTER *ioc)
>>
>>       pci_read_config_word(ioc->pdev, base + 2, &message_control);
>>       ioc->msix_vector_count = (message_control & 0x3FF) + 1;
>> -     if (ioc->msix_vector_count > 8)
>> -             ioc->msix_vector_count = 8;
>>       dinitprintk(ioc, pr_info(MPT3SAS_FMT
>>               "msix is supported, vector_count(%d)\n",
>>               ioc->name, ioc->msix_vector_count));
>> @@ -1880,6 +1885,31 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>>       if (r)
>>               goto out_fail;
>>
>> +     /* Use the Combined reply queue feature only for SAS3 C0 HBAs and
>> +      * also only when reply queue count is greater than 8
>> +      */
>> +     if (ioc->msix96_vector && ioc->reply_queue_count > 8) {
>> +             /* If this is an 96 vector supported device,
>> +             set up ReplyPostIndex addresses */
>> +             ioc->replyPostRegisterIndex = kcalloc(12,
>> +                     sizeof(resource_size_t *), GFP_KERNEL);
>> +             if (!ioc->replyPostRegisterIndex) {
>> +                     dfailprintk(ioc, printk(MPT3SAS_FMT
>> +                     "allocation for reply Post Register Index failed!!!\n",
>> +                                                                ioc->name));
>> +                     r = -ENOMEM;
>> +                     goto out_fail;
>> +             }
>> +
>> +             for (i = 0; i < 12; i++) {
>> +                     ioc->replyPostRegisterIndex[i] = (resource_size_t *)
>> +                             ((u8 *)&ioc->chip->Doorbell +
>> +                             MPI25_SUP_REPLY_POST_HOST_INDEX_OFFSET +
>> +                             (i * 0x10));
>> +             }
>> +     } else
>> +             ioc->msix96_vector = 0;
>> +
>>       list_for_each_entry(reply_q, &ioc->reply_queue_list, list)
>>               pr_info(MPT3SAS_FMT "%s: IRQ %d\n",
>>                   reply_q->name,  ((ioc->msix_enable) ? "PCI-MSI-X enabled" :
>> @@ -1901,6 +1931,8 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>>       pci_release_selected_regions(ioc->pdev, ioc->bars);
>>       pci_disable_pcie_error_reporting(pdev);
>>       pci_disable_device(pdev);
>> +     if (ioc->msix96_vector)
>> +             kfree(ioc->replyPostRegisterIndex);
>>       return r;
>>  }
>>
>> @@ -4522,8 +4554,16 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>>
>>       /* initialize reply post host index */
>>       list_for_each_entry(reply_q, &ioc->reply_queue_list, list) {
>> -             writel(reply_q->msix_index << MPI2_RPHI_MSIX_INDEX_SHIFT,
>> -                 &ioc->chip->ReplyPostHostIndex);
>> +             if (ioc->msix96_vector) {
>> +                     writel((reply_q->msix_index & 7)<<
>> +                        MPI2_RPHI_MSIX_INDEX_SHIFT,
>> +                        ioc->replyPostRegisterIndex[reply_q->msix_index/8]);
>> +             } else {
>> +                     writel(reply_q->msix_index <<
>> +                             MPI2_RPHI_MSIX_INDEX_SHIFT,
>> +                                     &ioc->chip->ReplyPostHostIndex);
>> +             }
>> +
>>               if (!_base_is_controller_msix_enabled(ioc))
>>                       goto skip_init_reply_post_host_index;
>>       }
>> @@ -4577,6 +4617,9 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>>       _base_free_irq(ioc);
>>       _base_disable_msix(ioc);
>>
>> +     if (ioc->msix96_vector)
>> +             kfree(ioc->replyPostRegisterIndex);
>> +
>>       if (ioc->chip_phys && ioc->chip)
>>               iounmap(ioc->chip);
>>       ioc->chip_phys = 0;
>> @@ -4600,6 +4643,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>>  {
>>       int r, i;
>>       int cpu_id, last_cpu_id = 0;
>> +     u8 revision;
>>
>>       dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>>           __func__));
>> @@ -4618,6 +4662,18 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>>               r = -ENOMEM;
>>               goto out_free_resources;
>>       }
>> +     /* Check whether the controller revision is C0 or above.
>> +         C0 and above revision controllers support 96 vectors */
>> +     revision = ioc->pdev->revision;
>> +
>> +     if ((ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3004 ||
>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3008 ||
>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_1 ||
>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_2 ||
>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_5 ||
>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_6) &&
>> +          (revision >= 0x02))
>> +             ioc->msix96_vector = 1;
>>
>>       ioc->rdpq_array_enable_assigned = 0;
>>       ioc->dma_mask = 0;
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> index afa8816..6b8d8f1 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> @@ -728,7 +728,8 @@ typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc);
>>   *                           is assigned only ones
>>   * @reply_queue_count: number of reply queue's
>>   * @reply_queue_list: link list contaning the reply queue info
>> - * @reply_post_host_index: head index in the pool where FW completes IO
>> + * @msix96_vector: 96 MSI-X vector support
>> + * @replyPostRegisterIndex: index of next position in Reply Desc Post Queue
>>   * @delayed_tr_list: target reset link list
>>   * @delayed_tr_volume_list: volume target reset link list
>>   * @@temp_sensors_count: flag to carry the number of temperature sensors
>> @@ -937,6 +938,10 @@ struct MPT3SAS_ADAPTER {
>>       u8              reply_queue_count;
>>       struct list_head reply_queue_list;
>>
>> +     u8              msix96_vector;
>> +     /* reply post register index */
>> +     resource_size_t **replyPostRegisterIndex;
>> +
>
> I know there are many uses of mixed-case varibles in this driver and changing
> them when they're already in makes no sense, but maybe you could consider
> getting rid of them in your mpt2sas/mpt3sas merge, as it is not really a
> commonly seen pattern in the linux kernel.
>
>>       struct list_head delayed_tr_list;
>>       struct list_head delayed_tr_volume_list;
>>       u8              temp_sensors_count;
>> --
>> 2.0.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

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

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
  2015-06-12  9:42 ` [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources Sreekanth Reddy
@ 2015-06-12 11:28   ` Johannes Thumshirn
  2015-06-12 12:18     ` Sreekanth Reddy
  2015-06-18 10:08   ` Johannes Thumshirn
  2015-06-19 15:09     ` Martin K. Petersen
  2 siblings, 1 reply; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-12 11:28 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote:
> Removed the redundancy code while freeing the controller resources.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
>  1 file changed, 32 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index ce57320..32b86bf 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -1798,6 +1798,36 @@ _base_enable_msix(struct MPT3SAS_ADAPTER *ioc)
>  }
>  
>  /**
> + * mpt3sas_base_unmap_resources - free controller resources
> + * @ioc: per adapter object
> + */
> +void
> +mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER *ioc)
> +{
> +	struct pci_dev *pdev = ioc->pdev;
> +
> +	dexitprintk(ioc, printk(MPT3SAS_FMT "%s\n",
> +		ioc->name, __func__));
> +
> +	_base_free_irq(ioc);
> +	_base_disable_msix(ioc);
> +
> +	if (ioc->msix96_vector)
> +		kfree(ioc->replyPostRegisterIndex);

kfree() already checks for zero or a NULL pointer.

> +
> +	if (ioc->chip_phys) {
> +		iounmap(ioc->chip);
> +		ioc->chip_phys = 0;
> +	}
> +
> +	if (pci_is_enabled(pdev)) {
> +		pci_release_selected_regions(ioc->pdev, ioc->bars);
> +		pci_disable_pcie_error_reporting(pdev);
> +		pci_disable_device(pdev);
> +	}
> +}
> +
> +/**
>   * mpt3sas_base_map_resources - map in controller resources (io/irq/memap)
>   * @ioc: per adapter object
>   *
> @@ -1925,14 +1955,7 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>  	return 0;
>  
>   out_fail:
> -	if (ioc->chip_phys)
> -		iounmap(ioc->chip);
> -	ioc->chip_phys = 0;
> -	pci_release_selected_regions(ioc->pdev, ioc->bars);
> -	pci_disable_pcie_error_reporting(pdev);
> -	pci_disable_device(pdev);
> -	if (ioc->msix96_vector)
> -		kfree(ioc->replyPostRegisterIndex);
> +	mpt3sas_base_unmap_resources(ioc);
>  	return r;
>  }
>  
> @@ -4667,8 +4690,6 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>  void
>  mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>  {
> -	struct pci_dev *pdev = ioc->pdev;
> -
>  	dexitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>  	    __func__));
>  
> @@ -4679,21 +4700,7 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>  		ioc->shost_recovery = 0;
>  	}
>  
> -	_base_free_irq(ioc);
> -	_base_disable_msix(ioc);
> -
> -	if (ioc->msix96_vector)
> -		kfree(ioc->replyPostRegisterIndex);
> -
> -	if (ioc->chip_phys && ioc->chip)
> -		iounmap(ioc->chip);
> -	ioc->chip_phys = 0;
> -
> -	if (pci_is_enabled(pdev)) {
> -		pci_release_selected_regions(ioc->pdev, ioc->bars);
> -		pci_disable_pcie_error_reporting(pdev);
> -		pci_disable_device(pdev);
> -	}
> +	mpt3sas_base_unmap_resources(ioc);
>  	return;
>  }
>  
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
  2015-06-12 11:28   ` Johannes Thumshirn
@ 2015-06-12 12:18     ` Sreekanth Reddy
  2015-06-12 12:40       ` Johannes Thumshirn
  0 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-12 12:18 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Fri, Jun 12, 2015 at 4:58 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote:
>> Removed the redundancy code while freeing the controller resources.
>>
>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
>>  1 file changed, 32 insertions(+), 25 deletions(-)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> index ce57320..32b86bf 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> @@ -1798,6 +1798,36 @@ _base_enable_msix(struct MPT3SAS_ADAPTER *ioc)
>>  }
>>
>>  /**
>> + * mpt3sas_base_unmap_resources - free controller resources
>> + * @ioc: per adapter object
>> + */
>> +void
>> +mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER *ioc)
>> +{
>> +     struct pci_dev *pdev = ioc->pdev;
>> +
>> +     dexitprintk(ioc, printk(MPT3SAS_FMT "%s\n",
>> +             ioc->name, __func__));
>> +
>> +     _base_free_irq(ioc);
>> +     _base_disable_msix(ioc);
>> +
>> +     if (ioc->msix96_vector)
>> +             kfree(ioc->replyPostRegisterIndex);
>
> kfree() already checks for zero or a NULL pointer.

Sorry Johannes, I didn't get you. If I understand this correctly, you
are suggesting to check for NULL pointer before calling kree() API as
shown below,

if (ioc->msix96_vector && (ioc->replyPostRegisterIndex != NULL))
        kfree(ioc->replyPostRegisterIndex);

>
>> +
>> +     if (ioc->chip_phys) {
>> +             iounmap(ioc->chip);
>> +             ioc->chip_phys = 0;
>> +     }
>> +
>> +     if (pci_is_enabled(pdev)) {
>> +             pci_release_selected_regions(ioc->pdev, ioc->bars);
>> +             pci_disable_pcie_error_reporting(pdev);
>> +             pci_disable_device(pdev);
>> +     }
>> +}
>> +
>> +/**
>>   * mpt3sas_base_map_resources - map in controller resources (io/irq/memap)
>>   * @ioc: per adapter object
>>   *
>> @@ -1925,14 +1955,7 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>>       return 0;
>>
>>   out_fail:
>> -     if (ioc->chip_phys)
>> -             iounmap(ioc->chip);
>> -     ioc->chip_phys = 0;
>> -     pci_release_selected_regions(ioc->pdev, ioc->bars);
>> -     pci_disable_pcie_error_reporting(pdev);
>> -     pci_disable_device(pdev);
>> -     if (ioc->msix96_vector)
>> -             kfree(ioc->replyPostRegisterIndex);
>> +     mpt3sas_base_unmap_resources(ioc);
>>       return r;
>>  }
>>
>> @@ -4667,8 +4690,6 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>>  void
>>  mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>>  {
>> -     struct pci_dev *pdev = ioc->pdev;
>> -
>>       dexitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>>           __func__));
>>
>> @@ -4679,21 +4700,7 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>>               ioc->shost_recovery = 0;
>>       }
>>
>> -     _base_free_irq(ioc);
>> -     _base_disable_msix(ioc);
>> -
>> -     if (ioc->msix96_vector)
>> -             kfree(ioc->replyPostRegisterIndex);
>> -
>> -     if (ioc->chip_phys && ioc->chip)
>> -             iounmap(ioc->chip);
>> -     ioc->chip_phys = 0;
>> -
>> -     if (pci_is_enabled(pdev)) {
>> -             pci_release_selected_regions(ioc->pdev, ioc->bars);
>> -             pci_disable_pcie_error_reporting(pdev);
>> -             pci_disable_device(pdev);
>> -     }
>> +     mpt3sas_base_unmap_resources(ioc);
>>       return;
>>  }
>>
>> --
>> 2.0.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

Regards,
Sreekanth

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
  2015-06-12 12:18     ` Sreekanth Reddy
@ 2015-06-12 12:40       ` Johannes Thumshirn
  2015-06-15 10:26           ` Sreekanth Reddy
  0 siblings, 1 reply; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-12 12:40 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Fri, Jun 12, 2015 at 05:48:56PM +0530, Sreekanth Reddy wrote:
> On Fri, Jun 12, 2015 at 4:58 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> > On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote:
> >> Removed the redundancy code while freeing the controller resources.
> >>
> >> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> >> ---
> >>  drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
[...]
> >> +     _base_free_irq(ioc);
> >> +     _base_disable_msix(ioc);
> >> +
> >> +     if (ioc->msix96_vector)
> >> +             kfree(ioc->replyPostRegisterIndex);
> >
> > kfree() already checks for zero or a NULL pointer.
> 
> Sorry Johannes, I didn't get you. If I understand this correctly, you
> are suggesting to check for NULL pointer before calling kree() API as
> shown below,
> 
> if (ioc->msix96_vector && (ioc->replyPostRegisterIndex != NULL))
>         kfree(ioc->replyPostRegisterIndex);

Correct me if I'm wrong, but I thought you don't need the if
(ioc->msix96_vector) before the kfree(). ioc->replyPostRegisterIndex should be
NULL if ioc->msix96_vector is 0, as far as I can see.

In _scsih_probe() you have:
shost = scsi_host_alloc(&scsih_driver_template,
            sizeof(struct MPT3SAS_ADAPTER));
if (!shost)
           return -ENODEV;

/* init local params */
ioc = shost_priv(shost);

and scsi_host_alloc() does a kzalloc() for shost.

so ioc->replyPortRegisterIndex is NULL.

Or am I thinking wrong here?

> 
> Regards,
> Sreekanth

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API
  2015-06-12  9:42 ` [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API Sreekanth Reddy
@ 2015-06-12 21:03     ` Joe Lawrence
  0 siblings, 0 replies; 123+ messages in thread
From: Joe Lawrence @ 2015-06-12 21:03 UTC (permalink / raw)
  To: Sreekanth Reddy, jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash, linux-kernel

On 06/12/2015 05:42 AM, Sreekanth Reddy wrote:
...
> +#if defined(alloc_ordered_workqueue)
> +	ioc->firmware_event_thread = alloc_ordered_workqueue(
> +		ioc->firmware_event_name, WQ_MEM_RECLAIM);
> +#else
> +		ioc->firmware_event_thread = create_singlethread_workqueue(
>  	    ioc->firmware_event_name);
> +#endif

Hi Sreekanth,

I think the upstream version of this code can safely assume
alloc_ordered_workqueue is defined, no?

Regards,

-- Joe

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

* Re: [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API
@ 2015-06-12 21:03     ` Joe Lawrence
  0 siblings, 0 replies; 123+ messages in thread
From: Joe Lawrence @ 2015-06-12 21:03 UTC (permalink / raw)
  To: Sreekanth Reddy, jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash, linux-kernel

On 06/12/2015 05:42 AM, Sreekanth Reddy wrote:
...
> +#if defined(alloc_ordered_workqueue)
> +	ioc->firmware_event_thread = alloc_ordered_workqueue(
> +		ioc->firmware_event_name, WQ_MEM_RECLAIM);
> +#else
> +		ioc->firmware_event_thread = create_singlethread_workqueue(
>  	    ioc->firmware_event_name);
> +#endif

Hi Sreekanth,

I think the upstream version of this code can safely assume
alloc_ordered_workqueue is defined, no?

Regards,

-- Joe

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
  2015-06-12  9:42 ` [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA Sreekanth Reddy
@ 2015-06-15  9:46     ` Johannes Thumshirn
  2015-06-18 10:09     ` Johannes Thumshirn
  2015-06-19 20:30     ` Martin K. Petersen
  2 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:46 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:22PM +0530, Sreekanth Reddy wrote:
> Added the following Dell branding to the mpt3sas driver.
> 
> "VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
> 0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
>  2 files changed, 47 insertions(+)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 6739c0a..db362cb 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc)
>  
>  
>  /**
> + * _base_display_dell_branding - Display branding string
> + * @ioc: per adapter object
> + *
> + * Return nothing.
> + */
> +static void
> +_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
> +{
> +	if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL)
> +		return;
> +
> +	switch (ioc->pdev->device) {
> +	case MPI25_MFGPAGE_DEVID_SAS3008:
> +		switch (ioc->pdev->subsystem_device) {
> +		case MPT3SAS_DELL_12G_HBA_SSDID:
> +			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +				MPT3SAS_DELL_12G_HBA_BRANDING);
> +			break;
> +		default:
> +			pr_info(MPT3SAS_FMT
> +			   "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
> +			   ioc->pdev->subsystem_device);
> +			break;
> +		}
> +		break;
> +	default:
> +		pr_info(MPT3SAS_FMT
> +			"Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
> +			ioc->pdev->subsystem_device);
> +		break;
> +	}
> +}
> +
> +
> +/**
>   * _base_display_ioc_capabilities - Disply IOC's capabilities.
>   * @ioc: per adapter object
>   *
> @@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
>  	    bios_version & 0x000000FF);
>  
>  	_base_display_intel_branding(ioc);
> +	_base_display_dell_branding(ioc);
>  
>  	pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
>  
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index 2318ef8..c4780c7 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -152,6 +152,17 @@
>  #define MPT3SAS_INTEL_RS3UC080_SSDID    0x3524
>  
>  /*
> + * Dell HBA branding
> + */
> +#define MPT3SAS_DELL_12G_HBA_BRANDING       \
> +	"Dell 12Gbps HBA"
> +
> +/*
> + * Dell HBA SSDIDs
> + */
> +#define MPT3SAS_DELL_12G_HBA_SSDID	0x1F46
> +
> +/*
>   * status bits for ioc->diag_buffer_status
>   */
>  #define MPT3_DIAG_BUFFER_IS_REGISTERED	(0x01)
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

This might be something you might consider re-organizing for your code-base
merge as well, as it leads to a lot of code duplication the more OEMs you have.

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
@ 2015-06-15  9:46     ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:46 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:22PM +0530, Sreekanth Reddy wrote:
> Added the following Dell branding to the mpt3sas driver.
> 
> "VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
> 0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
>  2 files changed, 47 insertions(+)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 6739c0a..db362cb 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc)
>  
>  
>  /**
> + * _base_display_dell_branding - Display branding string
> + * @ioc: per adapter object
> + *
> + * Return nothing.
> + */
> +static void
> +_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
> +{
> +	if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL)
> +		return;
> +
> +	switch (ioc->pdev->device) {
> +	case MPI25_MFGPAGE_DEVID_SAS3008:
> +		switch (ioc->pdev->subsystem_device) {
> +		case MPT3SAS_DELL_12G_HBA_SSDID:
> +			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +				MPT3SAS_DELL_12G_HBA_BRANDING);
> +			break;
> +		default:
> +			pr_info(MPT3SAS_FMT
> +			   "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
> +			   ioc->pdev->subsystem_device);
> +			break;
> +		}
> +		break;
> +	default:
> +		pr_info(MPT3SAS_FMT
> +			"Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
> +			ioc->pdev->subsystem_device);
> +		break;
> +	}
> +}
> +
> +
> +/**
>   * _base_display_ioc_capabilities - Disply IOC's capabilities.
>   * @ioc: per adapter object
>   *
> @@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
>  	    bios_version & 0x000000FF);
>  
>  	_base_display_intel_branding(ioc);
> +	_base_display_dell_branding(ioc);
>  
>  	pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
>  
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index 2318ef8..c4780c7 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -152,6 +152,17 @@
>  #define MPT3SAS_INTEL_RS3UC080_SSDID    0x3524
>  
>  /*
> + * Dell HBA branding
> + */
> +#define MPT3SAS_DELL_12G_HBA_BRANDING       \
> +	"Dell 12Gbps HBA"
> +
> +/*
> + * Dell HBA SSDIDs
> + */
> +#define MPT3SAS_DELL_12G_HBA_SSDID	0x1F46
> +
> +/*
>   * status bits for ioc->diag_buffer_status
>   */
>  #define MPT3_DIAG_BUFFER_IS_REGISTERED	(0x01)
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

This might be something you might consider re-organizing for your code-base
merge as well, as it leads to a lot of code duplication the more OEMs you have.

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 05/20] [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.
  2015-06-12  9:42 ` [PATCH 05/20] [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications Sreekanth Reddy
@ 2015-06-15  9:51   ` Johannes Thumshirn
  2015-06-19 15:10     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:51 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:17PM +0530, Sreekanth Reddy wrote:
> Update MPI 2.5 Release: MPI 2.5 Rev I (2.5.4) specification and 2.00.33 header files
> 
> Below is the change set from the MPI specification for I Rev
> 
> 1) Added Base Enclosure Level bit to the Flags field of Manufacturing Page 7.
> 2) Updated description of the MaxTargetPortConnectTime field of SAS IO Unit Page 1.
> 3) Added EnclosureLevel and ConnectorName fields to SAS Device Page 0. Also, added EnclosureLevel and ConnectorName Valid bit to the Flags field.
> 4) Added EnclosureLevel field to SAS Enclosure Page 0. Also, added EnclosureLevel Valid bit to the Flags field.
> 5) Added value for BIOS image to HashImageType.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpi/mpi2.h      |  6 ++++--
>  drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 27 +++++++++++++++++++++------
>  drivers/scsi/mpt3sas/mpi/mpi2_ioc.h  |  4 +++-
>  3 files changed, 28 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2.h b/drivers/scsi/mpt3sas/mpi/mpi2.h
> index c34c115..d730c5c 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2.h
> @@ -8,7 +8,7 @@
>   *                 scatter/gather formats.
>   * Creation Date:  June 21, 2006
>   *
> - * mpi2.h Version:  02.00.31
> + * mpi2.h Version:  02.00.33
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -88,6 +88,8 @@
>   *                     Added MPI25_SUP_REPLY_POST_HOST_INDEX_OFFSET.
>   * 04-09-13  02.00.30  Bumped MPI2_HEADER_VERSION_UNIT.
>   * 04-17-13  02.00.31  Bumped MPI2_HEADER_VERSION_UNIT.
> + * 08-19-13  02.00.32  Bumped MPI2_HEADER_VERSION_UNIT.
> + * 12-05-13  02.00.33  Bumped MPI2_HEADER_VERSION_UNIT.
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -121,7 +123,7 @@
>  #define MPI2_VERSION_02_05                  (0x0205)
>  
>  /*Unit and Dev versioning for this MPI header set */
> -#define MPI2_HEADER_VERSION_UNIT            (0x1F)
> +#define MPI2_HEADER_VERSION_UNIT            (0x21)
>  #define MPI2_HEADER_VERSION_DEV             (0x00)
>  #define MPI2_HEADER_VERSION_UNIT_MASK       (0xFF00)
>  #define MPI2_HEADER_VERSION_UNIT_SHIFT      (8)
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> index e261a31..62dfbf6 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> @@ -6,7 +6,7 @@
>   *         Title:  MPI Configuration messages and pages
>   * Creation Date:  November 10, 2006
>   *
> - *   mpi2_cnfg.h Version:  02.00.26
> + *   mpi2_cnfg.h Version:  02.00.27
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -165,6 +165,16 @@
>   *                     match the specification.
>   * 08-19-13  02.00.26  Added reserved words to MPI2_CONFIG_PAGE_IO_UNIT_7 for
>   *			future use.
> + * 12-05-13  02.00.27  Added MPI2_MANPAGE7_FLAG_BASE_ENCLOSURE_LEVEL for
> + *		       MPI2_CONFIG_PAGE_MAN_7.
> + *		       Added EnclosureLevel and ConnectorName fields to
> + *		       MPI2_CONFIG_PAGE_SAS_DEV_0.
> + *		       Added MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID for
> + *		       MPI2_CONFIG_PAGE_SAS_DEV_0.
> + *		       Added EnclosureLevel field to
> + *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
> + *		       Added MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID for
> + *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -724,6 +734,7 @@ typedef struct _MPI2_CONFIG_PAGE_MAN_7 {
>  #define MPI2_MANUFACTURING7_PAGEVERSION                 (0x01)
>  
>  /*defines for the Flags field */
> +#define MPI2_MANPAGE7_FLAG_BASE_ENCLOSURE_LEVEL         (0x00000008)
>  #define MPI2_MANPAGE7_FLAG_EVENTREPLAY_SLOT_ORDER       (0x00000002)
>  #define MPI2_MANPAGE7_FLAG_USE_SLOT_INFO                (0x00000001)
>  
> @@ -2633,9 +2644,9 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 {
>  	U8
>  		ControlGroup;           /*0x2E */
>  	U8
> -		Reserved1;              /*0x2F */
> +		EnclosureLevel;		/*0x2F */
>  	U32
> -		Reserved2;              /*0x30 */
> +		ConnectorName[4];	/*0x30 */
>  	U32
>  		Reserved3;              /*0x34 */
>  } MPI2_CONFIG_PAGE_SAS_DEV_0,
> @@ -2643,7 +2654,7 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 {
>  	Mpi2SasDevicePage0_t,
>  	*pMpi2SasDevicePage0_t;
>  
> -#define MPI2_SASDEVICE0_PAGEVERSION         (0x08)
> +#define MPI2_SASDEVICE0_PAGEVERSION         (0x09)
>  
>  /*values for SAS Device Page 0 AccessStatus field */
>  #define MPI2_SAS_DEVICE0_ASTATUS_NO_ERRORS                  (0x00)
> @@ -2683,6 +2694,7 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_DEV_0 {
>  #define MPI2_SAS_DEVICE0_FLAGS_SATA_NCQ_SUPPORTED           (0x0020)
>  #define MPI2_SAS_DEVICE0_FLAGS_SATA_FUA_SUPPORTED           (0x0010)
>  #define MPI2_SAS_DEVICE0_FLAGS_PORT_SELECTOR_ATTACH         (0x0008)
> +#define MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID             (0x0002)
>  #define MPI2_SAS_DEVICE0_FLAGS_DEVICE_PRESENT               (0x0001)
>  
>  
> @@ -3019,8 +3031,10 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 {
>  		NumSlots;                   /*0x18 */
>  	U16
>  		StartSlot;                  /*0x1A */
> -	U16
> +	U8
>  		Reserved2;                  /*0x1C */
> +	U8
> +		EnclosureLevel;		    /*0x1D */
>  	U16
>  		SEPDevHandle;               /*0x1E */
>  	U32
> @@ -3031,9 +3045,10 @@ typedef struct _MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0 {
>  	*PTR_MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0,
>  	Mpi2SasEnclosurePage0_t, *pMpi2SasEnclosurePage0_t;
>  
> -#define MPI2_SASENCLOSURE0_PAGEVERSION      (0x03)
> +#define MPI2_SASENCLOSURE0_PAGEVERSION      (0x04)
>  
>  /*values for SAS Enclosure Page 0 Flags field */
> +#define MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID      (0x0010)
>  #define MPI2_SAS_ENCLS0_FLAGS_MNG_MASK              (0x000F)
>  #define MPI2_SAS_ENCLS0_FLAGS_MNG_UNKNOWN           (0x0000)
>  #define MPI2_SAS_ENCLS0_FLAGS_MNG_IOC_SES           (0x0001)
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h b/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h
> index 4908309..d7598cc 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2_ioc.h
> @@ -6,7 +6,7 @@
>   *         Title:  MPI IOC, Port, Event, FW Download, and FW Upload messages
>   * Creation Date:  October 11, 2006
>   *
> - * mpi2_ioc.h Version:  02.00.23
> + * mpi2_ioc.h Version:  02.00.24
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -132,6 +132,7 @@
>   *			Added MPI2_IOCFACTS_CAPABILITY_RDPQ_ARRAY_CAPABLE.
>   *			Added MPI2_FW_DOWNLOAD_ITYPE_PUBLIC_KEY.
>   *			Added Encrypted Hash Extended Image.
> + * 12-05-13  02.00.24  Added MPI25_HASH_IMAGE_TYPE_BIOS.
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -1598,6 +1599,7 @@ Mpi25EncryptedHashEntry_t, *pMpi25EncryptedHashEntry_t;
>  /* values for HashImageType */
>  #define MPI25_HASH_IMAGE_TYPE_UNUSED		(0x00)
>  #define MPI25_HASH_IMAGE_TYPE_FIRMWARE		(0x01)
> +#define MPI25_HASH_IMAGE_TYPE_BIOS              (0x02)
>  
>  /* values for HashAlgorithm */
>  #define MPI25_HASH_ALGORITHM_UNUSED		(0x00)
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 07/20] [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00
  2015-06-12  9:42 ` [PATCH 07/20] [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00 Sreekanth Reddy
@ 2015-06-15  9:52   ` Johannes Thumshirn
  2015-06-19 20:22     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:52 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:19PM +0530, Sreekanth Reddy wrote:
> Bump mpt3sas Driver version to v5.100.00.00
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index 293ad23..9396a76 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -71,8 +71,8 @@
>  #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		"04.100.00.00"
> -#define MPT3SAS_MAJOR_VERSION		4
> +#define MPT3SAS_DRIVER_VERSION		"05.100.00.00"
> +#define MPT3SAS_MAJOR_VERSION		5
>  #define MPT3SAS_MINOR_VERSION		100
>  #define MPT3SAS_BUILD_VERSION		0
>  #define MPT3SAS_RELEASE_VERSION	00
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5
  2015-06-12  9:42 ` [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5 Sreekanth Reddy
@ 2015-06-15  9:52     ` Johannes Thumshirn
  2015-06-19 20:24     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:52 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:20PM +0530, Sreekanth Reddy wrote:
> Update MPI2 strings to MPI2.5.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +--
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 1 -
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 32b86bf..6739c0a 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -3901,7 +3901,7 @@ _base_send_ioc_init(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>  	mpi_request.WhoInit = MPI2_WHOINIT_HOST_DRIVER;
>  	mpi_request.VF_ID = 0; /* TODO */
>  	mpi_request.VP_ID = 0;
> -	mpi_request.MsgVersion = cpu_to_le16(MPI2_VERSION);
> +	mpi_request.MsgVersion = cpu_to_le16(MPI25_VERSION);
>  	mpi_request.HeaderVersion = cpu_to_le16(MPI2_HEADER_VERSION);
>  
>  	if (_base_is_controller_msix_enabled(ioc))
> @@ -4769,7 +4769,6 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>  	ioc->build_sg_scmd = &_base_build_sg_scmd_ieee;
>  	ioc->build_sg = &_base_build_sg_ieee;
>  	ioc->build_zero_len_sge = &_base_build_zero_len_sge_ieee;
> -	ioc->mpi25 = 1;
>  	ioc->sge_size_ieee = sizeof(Mpi2IeeeSgeSimple64_t);
>  
>  	/*
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index 9396a76..2318ef8 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -819,7 +819,6 @@ struct MPT3SAS_ADAPTER {
>  	MPT_BUILD_SG_SCMD build_sg_scmd;
>  	MPT_BUILD_SG    build_sg;
>  	MPT_BUILD_ZERO_LEN_SGE build_zero_len_sge;
> -	u8              mpi25;
>  	u16             sge_size_ieee;
>  
>  	/* function ptr for MPI sg elements only */
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5
@ 2015-06-15  9:52     ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:52 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:20PM +0530, Sreekanth Reddy wrote:
> Update MPI2 strings to MPI2.5.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +--
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 1 -
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 32b86bf..6739c0a 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -3901,7 +3901,7 @@ _base_send_ioc_init(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>  	mpi_request.WhoInit = MPI2_WHOINIT_HOST_DRIVER;
>  	mpi_request.VF_ID = 0; /* TODO */
>  	mpi_request.VP_ID = 0;
> -	mpi_request.MsgVersion = cpu_to_le16(MPI2_VERSION);
> +	mpi_request.MsgVersion = cpu_to_le16(MPI25_VERSION);
>  	mpi_request.HeaderVersion = cpu_to_le16(MPI2_HEADER_VERSION);
>  
>  	if (_base_is_controller_msix_enabled(ioc))
> @@ -4769,7 +4769,6 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>  	ioc->build_sg_scmd = &_base_build_sg_scmd_ieee;
>  	ioc->build_sg = &_base_build_sg_ieee;
>  	ioc->build_zero_len_sge = &_base_build_zero_len_sge_ieee;
> -	ioc->mpi25 = 1;
>  	ioc->sge_size_ieee = sizeof(Mpi2IeeeSgeSimple64_t);
>  
>  	/*
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index 9396a76..2318ef8 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -819,7 +819,6 @@ struct MPT3SAS_ADAPTER {
>  	MPT_BUILD_SG_SCMD build_sg_scmd;
>  	MPT_BUILD_SG    build_sg;
>  	MPT_BUILD_ZERO_LEN_SGE build_zero_len_sge;
> -	u8              mpi25;
>  	u16             sge_size_ieee;
>  
>  	/* function ptr for MPI sg elements only */
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
  2015-06-12  9:42 ` [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files Sreekanth Reddy
@ 2015-06-15  9:53     ` Johannes Thumshirn
  2015-06-19 20:27     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:53 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:21PM +0530, Sreekanth Reddy wrote:
> Following is the change set,
> 
> 1. Added more defines for the BiosOptions field of MPI2_CONFIG_PAGE_BIOS_1.
> 2. Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC definition.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpi/mpi2.h      |  5 +++--
>  drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 14 ++++++++++++--
>  drivers/scsi/mpt3sas/mpi/mpi2_tool.h |  4 +++-
>  3 files changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2.h b/drivers/scsi/mpt3sas/mpi/mpi2.h
> index d730c5c..c2d127c 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2.h
> @@ -8,7 +8,7 @@
>   *                 scatter/gather formats.
>   * Creation Date:  June 21, 2006
>   *
> - * mpi2.h Version:  02.00.33
> + * mpi2.h Version:  02.00.34
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -90,6 +90,7 @@
>   * 04-17-13  02.00.31  Bumped MPI2_HEADER_VERSION_UNIT.
>   * 08-19-13  02.00.32  Bumped MPI2_HEADER_VERSION_UNIT.
>   * 12-05-13  02.00.33  Bumped MPI2_HEADER_VERSION_UNIT.
> + * 01-08-14  02.00.34  Bumped MPI2_HEADER_VERSION_UNIT
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -123,7 +124,7 @@
>  #define MPI2_VERSION_02_05                  (0x0205)
>  
>  /*Unit and Dev versioning for this MPI header set */
> -#define MPI2_HEADER_VERSION_UNIT            (0x21)
> +#define MPI2_HEADER_VERSION_UNIT            (0x22)
>  #define MPI2_HEADER_VERSION_DEV             (0x00)
>  #define MPI2_HEADER_VERSION_UNIT_MASK       (0xFF00)
>  #define MPI2_HEADER_VERSION_UNIT_SHIFT      (8)
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> index 62dfbf6..66f2cc1 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> @@ -6,7 +6,7 @@
>   *         Title:  MPI Configuration messages and pages
>   * Creation Date:  November 10, 2006
>   *
> - *   mpi2_cnfg.h Version:  02.00.27
> + *   mpi2_cnfg.h Version:  02.00.28
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -175,6 +175,8 @@
>   *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
>   *		       Added MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID for
>   *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
> + * 01-08-14  02.00.28  Added more defines for the BiosOptions field of
> + *		       MPI2_CONFIG_PAGE_BIOS_1.
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -1334,9 +1336,17 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
>  	*PTR_MPI2_CONFIG_PAGE_BIOS_1,
>  	Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
>  
> -#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x05)
> +#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x06)
>  
>  /*values for BIOS Page 1 BiosOptions field */
> +#define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS		    (0x00000400)
> +
> +#define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD	(0x00000300)
> +#define MPI2_BIOSPAGE1_OPTIONS_USE_BIT0_REGISTRATION_UEFI_BSD	(0x00000000)
> +#define MPI2_BIOSPAGE1_OPTIONS_FULL_REGISTRATION_UEFI_BSD	(0x00000100)
> +#define MPI2_BIOSPAGE1_OPTIONS_ADAPTER_REGISTRATION_UEFI_BSD	(0x00000200)
> +#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_REGISTRATION_UEFI_BSD	(0x00000300)
> +
>  #define MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID                  (0x000000F0)
>  #define MPI2_BIOSPAGE1_OPTIONS_LSI_OEM_ID                   (0x00000000)
>  
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_tool.h b/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
> index 904910d..1629e5b 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
> @@ -6,7 +6,7 @@
>   *         Title:  MPI diagnostic tool structures and definitions
>   * Creation Date:  March 26, 2007
>   *
> - *   mpi2_tool.h Version:  02.00.11
> + *   mpi2_tool.h Version:  02.00.12
>   *
>   * Version History
>   * ---------------
> @@ -33,6 +33,7 @@
>   * 07-26-12  02.00.10  Modified MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST so that
>   *                     it uses MPI Chain SGE as well as MPI Simple SGE.
>   * 08-19-13  02.00.11  Added MPI2_TOOLBOX_TEXT_DISPLAY_TOOL and related info.
> + * 01-08-14  02.00.12  Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC.
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -100,6 +101,7 @@ typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST {
>  #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
>  #define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
>  #define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
> +#define MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC   (0x04000000)
>  #define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
>  #define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
>  #define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
@ 2015-06-15  9:53     ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:53 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:21PM +0530, Sreekanth Reddy wrote:
> Following is the change set,
> 
> 1. Added more defines for the BiosOptions field of MPI2_CONFIG_PAGE_BIOS_1.
> 2. Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC definition.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpi/mpi2.h      |  5 +++--
>  drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 14 ++++++++++++--
>  drivers/scsi/mpt3sas/mpi/mpi2_tool.h |  4 +++-
>  3 files changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2.h b/drivers/scsi/mpt3sas/mpi/mpi2.h
> index d730c5c..c2d127c 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2.h
> @@ -8,7 +8,7 @@
>   *                 scatter/gather formats.
>   * Creation Date:  June 21, 2006
>   *
> - * mpi2.h Version:  02.00.33
> + * mpi2.h Version:  02.00.34
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -90,6 +90,7 @@
>   * 04-17-13  02.00.31  Bumped MPI2_HEADER_VERSION_UNIT.
>   * 08-19-13  02.00.32  Bumped MPI2_HEADER_VERSION_UNIT.
>   * 12-05-13  02.00.33  Bumped MPI2_HEADER_VERSION_UNIT.
> + * 01-08-14  02.00.34  Bumped MPI2_HEADER_VERSION_UNIT
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -123,7 +124,7 @@
>  #define MPI2_VERSION_02_05                  (0x0205)
>  
>  /*Unit and Dev versioning for this MPI header set */
> -#define MPI2_HEADER_VERSION_UNIT            (0x21)
> +#define MPI2_HEADER_VERSION_UNIT            (0x22)
>  #define MPI2_HEADER_VERSION_DEV             (0x00)
>  #define MPI2_HEADER_VERSION_UNIT_MASK       (0xFF00)
>  #define MPI2_HEADER_VERSION_UNIT_SHIFT      (8)
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> index 62dfbf6..66f2cc1 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> @@ -6,7 +6,7 @@
>   *         Title:  MPI Configuration messages and pages
>   * Creation Date:  November 10, 2006
>   *
> - *   mpi2_cnfg.h Version:  02.00.27
> + *   mpi2_cnfg.h Version:  02.00.28
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -175,6 +175,8 @@
>   *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
>   *		       Added MPI2_SAS_ENCLS0_FLAGS_ENCL_LEVEL_VALID for
>   *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
> + * 01-08-14  02.00.28  Added more defines for the BiosOptions field of
> + *		       MPI2_CONFIG_PAGE_BIOS_1.
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -1334,9 +1336,17 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
>  	*PTR_MPI2_CONFIG_PAGE_BIOS_1,
>  	Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
>  
> -#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x05)
> +#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x06)
>  
>  /*values for BIOS Page 1 BiosOptions field */
> +#define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS		    (0x00000400)
> +
> +#define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD	(0x00000300)
> +#define MPI2_BIOSPAGE1_OPTIONS_USE_BIT0_REGISTRATION_UEFI_BSD	(0x00000000)
> +#define MPI2_BIOSPAGE1_OPTIONS_FULL_REGISTRATION_UEFI_BSD	(0x00000100)
> +#define MPI2_BIOSPAGE1_OPTIONS_ADAPTER_REGISTRATION_UEFI_BSD	(0x00000200)
> +#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_REGISTRATION_UEFI_BSD	(0x00000300)
> +
>  #define MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID                  (0x000000F0)
>  #define MPI2_BIOSPAGE1_OPTIONS_LSI_OEM_ID                   (0x00000000)
>  
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_tool.h b/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
> index 904910d..1629e5b 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
> @@ -6,7 +6,7 @@
>   *         Title:  MPI diagnostic tool structures and definitions
>   * Creation Date:  March 26, 2007
>   *
> - *   mpi2_tool.h Version:  02.00.11
> + *   mpi2_tool.h Version:  02.00.12
>   *
>   * Version History
>   * ---------------
> @@ -33,6 +33,7 @@
>   * 07-26-12  02.00.10  Modified MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST so that
>   *                     it uses MPI Chain SGE as well as MPI Simple SGE.
>   * 08-19-13  02.00.11  Added MPI2_TOOLBOX_TEXT_DISPLAY_TOOL and related info.
> + * 01-08-14  02.00.12  Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC.
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -100,6 +101,7 @@ typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST {
>  #define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
>  #define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
>  #define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
> +#define MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC   (0x04000000)
>  #define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
>  #define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
>  #define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00
  2015-06-12  9:42 ` [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00 Sreekanth Reddy
@ 2015-06-15  9:53     ` Johannes Thumshirn
  2015-06-19 20:35     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:53 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:24PM +0530, Sreekanth Reddy wrote:
> Bump mpt3sas driver version to v6.100.00.00.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index 7cdbc65..a89c752 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -71,8 +71,8 @@
>  #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		"05.100.00.00"
> -#define MPT3SAS_MAJOR_VERSION		5
> +#define MPT3SAS_DRIVER_VERSION		"06.100.00.00"
> +#define MPT3SAS_MAJOR_VERSION		6
>  #define MPT3SAS_MINOR_VERSION		100
>  #define MPT3SAS_BUILD_VERSION		0
>  #define MPT3SAS_RELEASE_VERSION	00
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00
@ 2015-06-15  9:53     ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:53 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:24PM +0530, Sreekanth Reddy wrote:
> Bump mpt3sas driver version to v6.100.00.00.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index 7cdbc65..a89c752 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -71,8 +71,8 @@
>  #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		"05.100.00.00"
> -#define MPT3SAS_MAJOR_VERSION		5
> +#define MPT3SAS_DRIVER_VERSION		"06.100.00.00"
> +#define MPT3SAS_MAJOR_VERSION		6
>  #define MPT3SAS_MINOR_VERSION		100
>  #define MPT3SAS_BUILD_VERSION		0
>  #define MPT3SAS_RELEASE_VERSION	00
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
  2015-06-12  9:42 ` [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications Sreekanth Reddy
@ 2015-06-15  9:54     ` Johannes Thumshirn
  2015-06-19 20:36     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:54 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:25PM +0530, Sreekanth Reddy wrote:
> Below are the new changes to MPI 2.5 Rev K(2.5.6) specification and 2.00.35 header files
> 1) Added a minimum size requirement for target mode command buffers.
> 2) Added MinMSIxIndex and MaxMSIxIndex fields to CommandBufferPostBase Request.
> 3) For BIOS Page 1, added SSUTimeout field, and added Product Name String Format bits to the BiosOptions field
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpi/mpi2.h      |  5 +++--
>  drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 17 ++++++++++++++---
>  2 files changed, 17 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2.h b/drivers/scsi/mpt3sas/mpi/mpi2.h
> index c2d127c..ec27ad2 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2.h
> @@ -8,7 +8,7 @@
>   *                 scatter/gather formats.
>   * Creation Date:  June 21, 2006
>   *
> - * mpi2.h Version:  02.00.34
> + * mpi2.h Version:  02.00.35
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -91,6 +91,7 @@
>   * 08-19-13  02.00.32  Bumped MPI2_HEADER_VERSION_UNIT.
>   * 12-05-13  02.00.33  Bumped MPI2_HEADER_VERSION_UNIT.
>   * 01-08-14  02.00.34  Bumped MPI2_HEADER_VERSION_UNIT
> + * 06-13-14  02.00.35  Bumped MPI2_HEADER_VERSION_UNIT.
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -124,7 +125,7 @@
>  #define MPI2_VERSION_02_05                  (0x0205)
>  
>  /*Unit and Dev versioning for this MPI header set */
> -#define MPI2_HEADER_VERSION_UNIT            (0x22)
> +#define MPI2_HEADER_VERSION_UNIT            (0x23)
>  #define MPI2_HEADER_VERSION_DEV             (0x00)
>  #define MPI2_HEADER_VERSION_UNIT_MASK       (0xFF00)
>  #define MPI2_HEADER_VERSION_UNIT_SHIFT      (8)
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> index 66f2cc1..c337a85 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> @@ -6,7 +6,7 @@
>   *         Title:  MPI Configuration messages and pages
>   * Creation Date:  November 10, 2006
>   *
> - *   mpi2_cnfg.h Version:  02.00.28
> + *   mpi2_cnfg.h Version:  02.00.29
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -177,6 +177,8 @@
>   *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
>   * 01-08-14  02.00.28  Added more defines for the BiosOptions field of
>   *		       MPI2_CONFIG_PAGE_BIOS_1.
> + * 06-13-14  02.00.29  Added SSUTimeout field to MPI2_CONFIG_PAGE_BIOS_1, and
> + *		       more defines for the BiosOptions field..
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -1324,7 +1326,9 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
>  	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
>  	U32                     BiosOptions;                /*0x04 */
>  	U32                     IOCSettings;                /*0x08 */
> -	U32                     Reserved1;                  /*0x0C */
> +	U8                      SSUTimeout;                 /*0x0C */
> +	U8                      Reserved1;                  /*0x0D */
> +	U16                     Reserved2;                  /*0x0E */
>  	U32                     DeviceSettings;             /*0x10 */
>  	U16                     NumberOfDevices;            /*0x14 */
>  	U16                     UEFIVersion;                /*0x16 */
> @@ -1336,9 +1340,16 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
>  	*PTR_MPI2_CONFIG_PAGE_BIOS_1,
>  	Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
>  
> -#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x06)
> +#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x07)
>  
>  /*values for BIOS Page 1 BiosOptions field */
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_MASK                         (0x00003800)
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_PBDHL                        (0x00000000)
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_ENCSLOSURE                   (0x00000800)
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_LWWID                        (0x00001000)
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_PSENS                        (0x00001800)
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_ESPHY                        (0x00002000)
> +
>  #define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS		    (0x00000400)
>  
>  #define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD	(0x00000300)
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
@ 2015-06-15  9:54     ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:54 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:25PM +0530, Sreekanth Reddy wrote:
> Below are the new changes to MPI 2.5 Rev K(2.5.6) specification and 2.00.35 header files
> 1) Added a minimum size requirement for target mode command buffers.
> 2) Added MinMSIxIndex and MaxMSIxIndex fields to CommandBufferPostBase Request.
> 3) For BIOS Page 1, added SSUTimeout field, and added Product Name String Format bits to the BiosOptions field
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpi/mpi2.h      |  5 +++--
>  drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 17 ++++++++++++++---
>  2 files changed, 17 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2.h b/drivers/scsi/mpt3sas/mpi/mpi2.h
> index c2d127c..ec27ad2 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2.h
> @@ -8,7 +8,7 @@
>   *                 scatter/gather formats.
>   * Creation Date:  June 21, 2006
>   *
> - * mpi2.h Version:  02.00.34
> + * mpi2.h Version:  02.00.35
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -91,6 +91,7 @@
>   * 08-19-13  02.00.32  Bumped MPI2_HEADER_VERSION_UNIT.
>   * 12-05-13  02.00.33  Bumped MPI2_HEADER_VERSION_UNIT.
>   * 01-08-14  02.00.34  Bumped MPI2_HEADER_VERSION_UNIT
> + * 06-13-14  02.00.35  Bumped MPI2_HEADER_VERSION_UNIT.
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -124,7 +125,7 @@
>  #define MPI2_VERSION_02_05                  (0x0205)
>  
>  /*Unit and Dev versioning for this MPI header set */
> -#define MPI2_HEADER_VERSION_UNIT            (0x22)
> +#define MPI2_HEADER_VERSION_UNIT            (0x23)
>  #define MPI2_HEADER_VERSION_DEV             (0x00)
>  #define MPI2_HEADER_VERSION_UNIT_MASK       (0xFF00)
>  #define MPI2_HEADER_VERSION_UNIT_SHIFT      (8)
> diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> index 66f2cc1..c337a85 100644
> --- a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> +++ b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
> @@ -6,7 +6,7 @@
>   *         Title:  MPI Configuration messages and pages
>   * Creation Date:  November 10, 2006
>   *
> - *   mpi2_cnfg.h Version:  02.00.28
> + *   mpi2_cnfg.h Version:  02.00.29
>   *
>   * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
>   *       prefix are for use only on MPI v2.5 products, and must not be used
> @@ -177,6 +177,8 @@
>   *		       MPI2_CONFIG_PAGE_SAS_ENCLOSURE_0.
>   * 01-08-14  02.00.28  Added more defines for the BiosOptions field of
>   *		       MPI2_CONFIG_PAGE_BIOS_1.
> + * 06-13-14  02.00.29  Added SSUTimeout field to MPI2_CONFIG_PAGE_BIOS_1, and
> + *		       more defines for the BiosOptions field..
>   * --------------------------------------------------------------------------
>   */
>  
> @@ -1324,7 +1326,9 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
>  	MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
>  	U32                     BiosOptions;                /*0x04 */
>  	U32                     IOCSettings;                /*0x08 */
> -	U32                     Reserved1;                  /*0x0C */
> +	U8                      SSUTimeout;                 /*0x0C */
> +	U8                      Reserved1;                  /*0x0D */
> +	U16                     Reserved2;                  /*0x0E */
>  	U32                     DeviceSettings;             /*0x10 */
>  	U16                     NumberOfDevices;            /*0x14 */
>  	U16                     UEFIVersion;                /*0x16 */
> @@ -1336,9 +1340,16 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
>  	*PTR_MPI2_CONFIG_PAGE_BIOS_1,
>  	Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
>  
> -#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x06)
> +#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x07)
>  
>  /*values for BIOS Page 1 BiosOptions field */
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_MASK                         (0x00003800)
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_PBDHL                        (0x00000000)
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_ENCSLOSURE                   (0x00000800)
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_LWWID                        (0x00001000)
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_PSENS                        (0x00001800)
> +#define MPI2_BIOSPAGE1_OPTIONS_PNS_ESPHY                        (0x00002000)
> +
>  #define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS		    (0x00000400)
>  
>  #define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD	(0x00000300)
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 15/20] [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command
  2015-06-12  9:42 ` [PATCH 15/20] [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command Sreekanth Reddy
@ 2015-06-15  9:54   ` Johannes Thumshirn
  2015-06-19 20:40     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:54 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:27PM +0530, Sreekanth Reddy wrote:
> scsi_dma_map API will return a negative value (i.e. -ENOMEM)
> if DMA mapping of sg lists fails and zero if the sg list in the
> SCSI cmd is NULL. But drivers doesn't handled sg list DMA mapping
> failure case properly.
> 
> So, Updated the code to return host busy error status to SCSI MID Layer(SML),
> when DMA mapping of scatter gather list fails for a SCSI command.
> So that SML will retry this SCSI cmd after some time.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 267e489..0b26c8d 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -1345,7 +1345,7 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc,
>  
>  	sg_scmd = scsi_sglist(scmd);
>  	sges_left = scsi_dma_map(scmd);
> -	if (!sges_left) {
> +	if (!sges_left < 0) {
>  		sdev_printk(KERN_ERR, scmd->device,
>  			"pci_map_sg failed: request for %d bytes!\n",
>  			scsi_bufflen(scmd));
> @@ -1414,7 +1414,7 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc,
>   fill_in_last_segment:
>  
>  	/* fill the last segment */
> -	while (sges_left) {
> +	while (sges_left > 0) {
>  		if (sges_left == 1)
>  			_base_add_sg_single_ieee(sg_local,
>  			    simple_sgl_flags_last, 0, sg_dma_len(sg_scmd),
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 18/20] [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API
  2015-06-12  9:42 ` [PATCH 18/20] [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API Sreekanth Reddy
@ 2015-06-15  9:55   ` Johannes Thumshirn
  2015-06-19 20:47     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:55 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:30PM +0530, Sreekanth Reddy wrote:
> Added dma_mapping_error() API after mapping an address with dma_map_single() API.
> Otherwise when CONFIG_DMA_API_DEBUG is enabled in the kernel, then it complains
> about mpt3sas driver not calling dma_mapping_error after mapping an address with
> dma_map_single
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_transport.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_transport.c b/drivers/scsi/mpt3sas/mpt3sas_transport.c
> index 7a7aa68..70fd019 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_transport.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_transport.c
> @@ -1964,7 +1964,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
>  	} else {
>  		dma_addr_out = pci_map_single(ioc->pdev, bio_data(req->bio),
>  		    blk_rq_bytes(req), PCI_DMA_BIDIRECTIONAL);
> -		if (!dma_addr_out) {
> +		if (pci_dma_mapping_error(ioc->pdev, dma_addr_out)) {
>  			pr_info(MPT3SAS_FMT "%s(): DMA Addr out = NULL\n",
>  			    ioc->name, __func__);
>  			rc = -ENOMEM;
> @@ -1986,7 +1986,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
>  	} else {
>  		dma_addr_in =  pci_map_single(ioc->pdev, bio_data(rsp->bio),
>  		    blk_rq_bytes(rsp), PCI_DMA_BIDIRECTIONAL);
> -		if (!dma_addr_in) {
> +		if (pci_dma_mapping_error(ioc->pdev, dma_addr_in)) {
>  			pr_info(MPT3SAS_FMT "%s(): DMA Addr in = NULL\n",
>  			    ioc->name, __func__);
>  			rc = -ENOMEM;
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 20/20] [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00
  2015-06-12  9:42 ` [PATCH 20/20] [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00 Sreekanth Reddy
@ 2015-06-15  9:56   ` Johannes Thumshirn
  2015-06-19 21:01     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:56 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:32PM +0530, Sreekanth Reddy wrote:
> Bump mpt3sas driver version to 9.100.00.00
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index b97039b..0ffe763 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -71,8 +71,8 @@
>  #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		"06.100.00.00"
> -#define MPT3SAS_MAJOR_VERSION		6
> +#define MPT3SAS_DRIVER_VERSION		"09.100.00.00"
> +#define MPT3SAS_MAJOR_VERSION		9
>  #define MPT3SAS_MINOR_VERSION		100
>  #define MPT3SAS_BUILD_VERSION		0
>  #define MPT3SAS_RELEASE_VERSION	00
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 19/20] [SCSI] mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os
  2015-06-12  9:42 ` [PATCH 19/20] [SCSI] mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os Sreekanth Reddy
@ 2015-06-15  9:58   ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15  9:58 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:31PM +0530, Sreekanth Reddy wrote:
> Issue: When the disks are getting discovered and assigned device
> handles by the kernel, a device block followed by an unblock
> (due to broadcast primitives) issued by the driver is
> interspersed by the kernel changing the state of the device.
> Therefore the unblock by the driver results in a no operation
> within the kernel API.
> 
> To fix this one, the below patch checks the return of the unblock API
> and performs a block followed by an unblock to unfreeze the block
> layer's I/O queue. Sufficient checks and prints are also added in the
> driver to identify this condition caused by the kernel.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 89 ++++++++++++++++++++++++++++++------
>  1 file changed, 75 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index 42bb731..5405a2f 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -2605,6 +2605,75 @@ _scsih_fw_event_cleanup_queue(struct MPT3SAS_ADAPTER *ioc)
>  }
>  
>  /**
> + * _scsih_internal_device_block - block the sdev device
> + * @sdev: per device object
> + * @sas_device_priv_data : per device driver private data
> + *
> + * make sure device is blocked without error, if not
> + * print an error
> + */
> +static void
> +_scsih_internal_device_block(struct scsi_device *sdev,
> +			struct MPT3SAS_DEVICE *sas_device_priv_data)
> +{
> +	int r = 0;
> +
> +	sdev_printk(KERN_INFO, sdev, "device_block, handle(0x%04x)\n",
> +	    sas_device_priv_data->sas_target->handle);
> +	sas_device_priv_data->block = 1;
> +
> +	r = scsi_internal_device_block(sdev);
> +	if (r == -EINVAL)
> +		sdev_printk(KERN_WARNING, sdev,
> +		    "device_block failed with return(%d) for handle(0x%04x)\n",
> +		    sas_device_priv_data->sas_target->handle, r);
> +}
> +
> +/**
> + * _scsih_internal_device_unblock - unblock the sdev device
> + * @sdev: per device object
> + * @sas_device_priv_data : per device driver private data
> + * make sure device is unblocked without error, if not retry
> + * by blocking and then unblocking
> + */
> +
> +static void
> +_scsih_internal_device_unblock(struct scsi_device *sdev,
> +			struct MPT3SAS_DEVICE *sas_device_priv_data)
> +{
> +	int r = 0;
> +
> +	sdev_printk(KERN_WARNING, sdev, "device_unblock and setting to running, "
> +	    "handle(0x%04x)\n", sas_device_priv_data->sas_target->handle);
> +	sas_device_priv_data->block = 0;
> +	r = scsi_internal_device_unblock(sdev, SDEV_RUNNING);
> +	if (r == -EINVAL) {
> +		/* The device has been set to SDEV_RUNNING by SD layer during
> +		 * device addition but the request queue is still stopped by
> +		 * our earlier block call. We need to perform a block again
> +		 * to get the device to SDEV_BLOCK and then to SDEV_RUNNING */
> +
> +		sdev_printk(KERN_WARNING, sdev,
> +		    "device_unblock failed with return(%d) for handle(0x%04x) "
> +		    "performing a block followed by an unblock\n",
> +		    sas_device_priv_data->sas_target->handle, r);
> +		sas_device_priv_data->block = 1;
> +		r = scsi_internal_device_block(sdev);
> +		if (r)
> +			sdev_printk(KERN_WARNING, sdev, "retried device_block "
> +			    "failed with return(%d) for handle(0x%04x)\n",
> +			    sas_device_priv_data->sas_target->handle, r);
> +
> +		sas_device_priv_data->block = 0;
> +		r = scsi_internal_device_unblock(sdev, SDEV_RUNNING);
> +		if (r)
> +			sdev_printk(KERN_WARNING, sdev, "retried device_unblock"
> +			    " failed with return(%d) for handle(0x%04x)\n",
> +			    sas_device_priv_data->sas_target->handle, r);
> +	}
> +}
> +
> +/**
>   * _scsih_ublock_io_all_device - unblock every device
>   * @ioc: per adapter object
>   *
> @@ -2623,11 +2692,10 @@ _scsih_ublock_io_all_device(struct MPT3SAS_ADAPTER *ioc)
>  		if (!sas_device_priv_data->block)
>  			continue;
>  
> -		sas_device_priv_data->block = 0;
>  		dewtprintk(ioc, sdev_printk(KERN_INFO, sdev,
>  			"device_running, handle(0x%04x)\n",
>  		    sas_device_priv_data->sas_target->handle));
> -		scsi_internal_device_unblock(sdev, SDEV_RUNNING);
> +		_scsih_internal_device_unblock(sdev, sas_device_priv_data);
>  	}
>  }
>  
> @@ -2652,10 +2720,9 @@ _scsih_ublock_io_device(struct MPT3SAS_ADAPTER *ioc, u64 sas_address)
>  		if (sas_device_priv_data->sas_target->sas_address
>  		    != sas_address)
>  			continue;
> -		if (sas_device_priv_data->block) {
> -			sas_device_priv_data->block = 0;
> -			scsi_internal_device_unblock(sdev, SDEV_RUNNING);
> -		}
> +		if (sas_device_priv_data->block)
> +			_scsih_internal_device_unblock(sdev,
> +				sas_device_priv_data);
>  	}
>  }
>  
> @@ -2678,10 +2745,7 @@ _scsih_block_io_all_device(struct MPT3SAS_ADAPTER *ioc)
>  			continue;
>  		if (sas_device_priv_data->block)
>  			continue;
> -		sas_device_priv_data->block = 1;
> -		scsi_internal_device_block(sdev);
> -		sdev_printk(KERN_INFO, sdev, "device_blocked, handle(0x%04x)\n",
> -		    sas_device_priv_data->sas_target->handle);
> +		_scsih_internal_device_block(sdev, sas_device_priv_data);
>  	}
>  }
>  
> @@ -2713,10 +2777,7 @@ _scsih_block_io_device(struct MPT3SAS_ADAPTER *ioc, u16 handle)
>  			continue;
>  		if (sas_device->pend_sas_rphy_add)
>  			continue;
> -		sas_device_priv_data->block = 1;
> -		scsi_internal_device_block(sdev);
> -		sdev_printk(KERN_INFO, sdev,
> -			"device_blocked, handle(0x%04x)\n", handle);
> +		_scsih_internal_device_block(sdev, sas_device_priv_data);
>  	}
>  }
>  
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 14/20] [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081
  2015-06-12  9:42 ` [PATCH 14/20] [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081 Sreekanth Reddy
@ 2015-06-15 10:01   ` Johannes Thumshirn
  2015-06-15 11:01       ` Sreekanth Reddy
  0 siblings, 1 reply; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15 10:01 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:26PM +0530, Sreekanth Reddy wrote:
> For any SCSI command, if the driver receives
> IOC status = SCSI_IOC_TERMINATED and log info = 0x32010081 then
> that command will be completed with DID_RESET host status.
> 
> The definition of this log info value is
> "Virtual IO has failed and has to be retried".
> 
> Firmware will provide this log info value with IOC Status
> "SCSI_IOC_TERMINATED", whenever a drive (with is a part of a volume)
> is pulled and pushed back within some minimal delay.
> With this log info value, firmware informs the driver to retry the
> failed IO command infinite times, so to provide some time for the
> firmware to discover the reinserted drive successfully instated of
> just retrying failed command for five times(doesn't giving enough
> time for firmware to complete the drive discovery) and failing the
> IO permanently even though drive came back successfully.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index 64dd90b..837c22a 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -4241,6 +4241,9 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
>  				scmd->device->expecting_cc_ua = 1;
>  			}
>  			break;
> +		} else if (log_info == 0x32010081) {
> +			scmd->result = DID_RESET << 16;
> +			break;

Could you make that a #define instead of some magic vlaue, so everyone can see
what is happening when reading the source?

>  		}
>  		scmd->result = DID_SOFT_ERROR << 16;
>  		break;
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
  2015-06-12 12:40       ` Johannes Thumshirn
@ 2015-06-15 10:26           ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-15 10:26 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Fri, Jun 12, 2015 at 6:10 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 05:48:56PM +0530, Sreekanth Reddy wrote:
>> On Fri, Jun 12, 2015 at 4:58 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>> > On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote:
>> >> Removed the redundancy code while freeing the controller resources.
>> >>
>> >> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> >> ---
>> >>  drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
> [...]
>> >> +     _base_free_irq(ioc);
>> >> +     _base_disable_msix(ioc);
>> >> +
>> >> +     if (ioc->msix96_vector)
>> >> +             kfree(ioc->replyPostRegisterIndex);
>> >
>> > kfree() already checks for zero or a NULL pointer.
>>
>> Sorry Johannes, I didn't get you. If I understand this correctly, you
>> are suggesting to check for NULL pointer before calling kree() API as
>> shown below,
>>
>> if (ioc->msix96_vector && (ioc->replyPostRegisterIndex != NULL))
>>         kfree(ioc->replyPostRegisterIndex);
>
> Correct me if I'm wrong, but I thought you don't need the if
> (ioc->msix96_vector) before the kfree(). ioc->replyPostRegisterIndex should be
> NULL if ioc->msix96_vector is 0, as far as I can see.
>
> In _scsih_probe() you have:
> shost = scsi_host_alloc(&scsih_driver_template,
>             sizeof(struct MPT3SAS_ADAPTER));
> if (!shost)
>            return -ENODEV;
>
> /* init local params */
> ioc = shost_priv(shost);
>
> and scsi_host_alloc() does a kzalloc() for shost.
>
> so ioc->replyPortRegisterIndex is NULL.
>
> Or am I thinking wrong here?

Yes, ioc->replyPostRegisterIndex will be NULL if ioc->msix96_vector is 0,
We have added this checks as a precautionary. since calling this
function (i.e kfree()) on memory not previously allocated with
kmalloc(), or on memory which has already been freed, may results in
very bad things, such as freeing memory belonging to another part of
the kernel.

>
>>
>> Regards,
>> Sreekanth
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

Regards,
Sreekanth

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
@ 2015-06-15 10:26           ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-15 10:26 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Fri, Jun 12, 2015 at 6:10 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 05:48:56PM +0530, Sreekanth Reddy wrote:
>> On Fri, Jun 12, 2015 at 4:58 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>> > On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote:
>> >> Removed the redundancy code while freeing the controller resources.
>> >>
>> >> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> >> ---
>> >>  drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
> [...]
>> >> +     _base_free_irq(ioc);
>> >> +     _base_disable_msix(ioc);
>> >> +
>> >> +     if (ioc->msix96_vector)
>> >> +             kfree(ioc->replyPostRegisterIndex);
>> >
>> > kfree() already checks for zero or a NULL pointer.
>>
>> Sorry Johannes, I didn't get you. If I understand this correctly, you
>> are suggesting to check for NULL pointer before calling kree() API as
>> shown below,
>>
>> if (ioc->msix96_vector && (ioc->replyPostRegisterIndex != NULL))
>>         kfree(ioc->replyPostRegisterIndex);
>
> Correct me if I'm wrong, but I thought you don't need the if
> (ioc->msix96_vector) before the kfree(). ioc->replyPostRegisterIndex should be
> NULL if ioc->msix96_vector is 0, as far as I can see.
>
> In _scsih_probe() you have:
> shost = scsi_host_alloc(&scsih_driver_template,
>             sizeof(struct MPT3SAS_ADAPTER));
> if (!shost)
>            return -ENODEV;
>
> /* init local params */
> ioc = shost_priv(shost);
>
> and scsi_host_alloc() does a kzalloc() for shost.
>
> so ioc->replyPortRegisterIndex is NULL.
>
> Or am I thinking wrong here?

Yes, ioc->replyPostRegisterIndex will be NULL if ioc->msix96_vector is 0,
We have added this checks as a precautionary. since calling this
function (i.e kfree()) on memory not previously allocated with
kmalloc(), or on memory which has already been freed, may results in
very bad things, such as freeing memory belonging to another part of
the kernel.

>
>>
>> Regards,
>> Sreekanth
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

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

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
  2015-06-15 10:26           ` Sreekanth Reddy
@ 2015-06-15 10:48             ` Johannes Thumshirn
  -1 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15 10:48 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Mon, Jun 15, 2015 at 03:56:56PM +0530, Sreekanth Reddy wrote:
> On Fri, Jun 12, 2015 at 6:10 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> > On Fri, Jun 12, 2015 at 05:48:56PM +0530, Sreekanth Reddy wrote:
> >> On Fri, Jun 12, 2015 at 4:58 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> >> > On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote:
> >> >> Removed the redundancy code while freeing the controller resources.
> >> >>
> >> >> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> >> >> ---
> >> >>  drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
> > [...]
> >> >> +     _base_free_irq(ioc);
> >> >> +     _base_disable_msix(ioc);
> >> >> +
> >> >> +     if (ioc->msix96_vector)
> >> >> +             kfree(ioc->replyPostRegisterIndex);
> >> >
> >> > kfree() already checks for zero or a NULL pointer.
> >>
> >> Sorry Johannes, I didn't get you. If I understand this correctly, you
> >> are suggesting to check for NULL pointer before calling kree() API as
> >> shown below,
> >>
> >> if (ioc->msix96_vector && (ioc->replyPostRegisterIndex != NULL))
> >>         kfree(ioc->replyPostRegisterIndex);
> >
> > Correct me if I'm wrong, but I thought you don't need the if
> > (ioc->msix96_vector) before the kfree(). ioc->replyPostRegisterIndex should be
> > NULL if ioc->msix96_vector is 0, as far as I can see.
> >
> > In _scsih_probe() you have:
> > shost = scsi_host_alloc(&scsih_driver_template,
> >             sizeof(struct MPT3SAS_ADAPTER));
> > if (!shost)
> >            return -ENODEV;
> >
> > /* init local params */
> > ioc = shost_priv(shost);
> >
> > and scsi_host_alloc() does a kzalloc() for shost.
> >
> > so ioc->replyPortRegisterIndex is NULL.
> >
> > Or am I thinking wrong here?
> 
> Yes, ioc->replyPostRegisterIndex will be NULL if ioc->msix96_vector is 0,
> We have added this checks as a precautionary. since calling this
> function (i.e kfree()) on memory not previously allocated with
> kmalloc(), or on memory which has already been freed, may results in
> very bad things, such as freeing memory belonging to another part of
> the kernel.
>

OK, then please leave it in.

> >
> >>
> >> Regards,
> >> Sreekanth
> >
> > --
> > Johannes Thumshirn                                       Storage
> > jthumshirn@suse.de                             +49 911 74053 689
> > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> > HRB 21284 (AG Nürnberg)
> 
> 
> 
> -- 
> 
> Regards,
> Sreekanth

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
@ 2015-06-15 10:48             ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15 10:48 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Mon, Jun 15, 2015 at 03:56:56PM +0530, Sreekanth Reddy wrote:
> On Fri, Jun 12, 2015 at 6:10 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> > On Fri, Jun 12, 2015 at 05:48:56PM +0530, Sreekanth Reddy wrote:
> >> On Fri, Jun 12, 2015 at 4:58 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> >> > On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote:
> >> >> Removed the redundancy code while freeing the controller resources.
> >> >>
> >> >> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> >> >> ---
> >> >>  drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
> > [...]
> >> >> +     _base_free_irq(ioc);
> >> >> +     _base_disable_msix(ioc);
> >> >> +
> >> >> +     if (ioc->msix96_vector)
> >> >> +             kfree(ioc->replyPostRegisterIndex);
> >> >
> >> > kfree() already checks for zero or a NULL pointer.
> >>
> >> Sorry Johannes, I didn't get you. If I understand this correctly, you
> >> are suggesting to check for NULL pointer before calling kree() API as
> >> shown below,
> >>
> >> if (ioc->msix96_vector && (ioc->replyPostRegisterIndex != NULL))
> >>         kfree(ioc->replyPostRegisterIndex);
> >
> > Correct me if I'm wrong, but I thought you don't need the if
> > (ioc->msix96_vector) before the kfree(). ioc->replyPostRegisterIndex should be
> > NULL if ioc->msix96_vector is 0, as far as I can see.
> >
> > In _scsih_probe() you have:
> > shost = scsi_host_alloc(&scsih_driver_template,
> >             sizeof(struct MPT3SAS_ADAPTER));
> > if (!shost)
> >            return -ENODEV;
> >
> > /* init local params */
> > ioc = shost_priv(shost);
> >
> > and scsi_host_alloc() does a kzalloc() for shost.
> >
> > so ioc->replyPortRegisterIndex is NULL.
> >
> > Or am I thinking wrong here?
> 
> Yes, ioc->replyPostRegisterIndex will be NULL if ioc->msix96_vector is 0,
> We have added this checks as a precautionary. since calling this
> function (i.e kfree()) on memory not previously allocated with
> kmalloc(), or on memory which has already been freed, may results in
> very bad things, such as freeing memory belonging to another part of
> the kernel.
>

OK, then please leave it in.

> >
> >>
> >> Regards,
> >> Sreekanth
> >
> > --
> > Johannes Thumshirn                                       Storage
> > jthumshirn@suse.de                             +49 911 74053 689
> > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> > HRB 21284 (AG Nürnberg)
> 
> 
> 
> -- 
> 
> Regards,
> Sreekanth

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API
  2015-06-12 21:03     ` Joe Lawrence
  (?)
@ 2015-06-15 10:56     ` Sreekanth Reddy
  2015-06-15 21:05       ` James Bottomley
  -1 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-15 10:56 UTC (permalink / raw)
  To: Joe Lawrence
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Sat, Jun 13, 2015 at 2:33 AM, Joe Lawrence <joe.lawrence@stratus.com> wrote:
> On 06/12/2015 05:42 AM, Sreekanth Reddy wrote:
> ...
>> +#if defined(alloc_ordered_workqueue)
>> +     ioc->firmware_event_thread = alloc_ordered_workqueue(
>> +             ioc->firmware_event_name, WQ_MEM_RECLAIM);
>> +#else
>> +             ioc->firmware_event_thread = create_singlethread_workqueue(
>>           ioc->firmware_event_name);
>> +#endif
>
> Hi Sreekanth,
>
> I think the upstream version of this code can safely assume
> alloc_ordered_workqueue is defined, no?

yes, upstream version of this code can safely assume that
alloc_ordered_workqueue is defined.

While working in-house, I observed that some of the older kernels
doesn't defined this macro, so I have added this else section.

>
> Regards,
>
> -- Joe



-- 

Regards,
Sreekanth

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

* Re: [PATCH 14/20] [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081
  2015-06-15 10:01   ` Johannes Thumshirn
@ 2015-06-15 11:01       ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-15 11:01 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Mon, Jun 15, 2015 at 3:31 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 03:12:26PM +0530, Sreekanth Reddy wrote:
>> For any SCSI command, if the driver receives
>> IOC status = SCSI_IOC_TERMINATED and log info = 0x32010081 then
>> that command will be completed with DID_RESET host status.
>>
>> The definition of this log info value is
>> "Virtual IO has failed and has to be retried".
>>
>> Firmware will provide this log info value with IOC Status
>> "SCSI_IOC_TERMINATED", whenever a drive (with is a part of a volume)
>> is pulled and pushed back within some minimal delay.
>> With this log info value, firmware informs the driver to retry the
>> failed IO command infinite times, so to provide some time for the
>> firmware to discover the reinserted drive successfully instated of
>> just retrying failed command for five times(doesn't giving enough
>> time for firmware to complete the drive discovery) and failing the
>> IO permanently even though drive came back successfully.
>>
>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
>> index 64dd90b..837c22a 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
>> @@ -4241,6 +4241,9 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
>>                               scmd->device->expecting_cc_ua = 1;
>>                       }
>>                       break;
>> +             } else if (log_info == 0x32010081) {
>> +                     scmd->result = DID_RESET << 16;
>> +                     break;
>
> Could you make that a #define instead of some magic vlaue, so everyone can see
> what is happening when reading the source?

Sure, I will define a macro for this log_info value.

Thanks,
Sreekanth
>
>>               }
>>               scmd->result = DID_SOFT_ERROR << 16;
>>               break;
>> --
>> 2.0.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

Regards,
Sreekanth

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

* Re: [PATCH 14/20] [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081
@ 2015-06-15 11:01       ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-15 11:01 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Mon, Jun 15, 2015 at 3:31 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 03:12:26PM +0530, Sreekanth Reddy wrote:
>> For any SCSI command, if the driver receives
>> IOC status = SCSI_IOC_TERMINATED and log info = 0x32010081 then
>> that command will be completed with DID_RESET host status.
>>
>> The definition of this log info value is
>> "Virtual IO has failed and has to be retried".
>>
>> Firmware will provide this log info value with IOC Status
>> "SCSI_IOC_TERMINATED", whenever a drive (with is a part of a volume)
>> is pulled and pushed back within some minimal delay.
>> With this log info value, firmware informs the driver to retry the
>> failed IO command infinite times, so to provide some time for the
>> firmware to discover the reinserted drive successfully instated of
>> just retrying failed command for five times(doesn't giving enough
>> time for firmware to complete the drive discovery) and failing the
>> IO permanently even though drive came back successfully.
>>
>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
>> index 64dd90b..837c22a 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
>> @@ -4241,6 +4241,9 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
>>                               scmd->device->expecting_cc_ua = 1;
>>                       }
>>                       break;
>> +             } else if (log_info == 0x32010081) {
>> +                     scmd->result = DID_RESET << 16;
>> +                     break;
>
> Could you make that a #define instead of some magic vlaue, so everyone can see
> what is happening when reading the source?

Sure, I will define a macro for this log_info value.

Thanks,
Sreekanth
>
>>               }
>>               scmd->result = DID_SOFT_ERROR << 16;
>>               break;
>> --
>> 2.0.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

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

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
  2015-06-15  9:46     ` Johannes Thumshirn
@ 2015-06-15 11:11       ` Sreekanth Reddy
  -1 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-15 11:11 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Mon, Jun 15, 2015 at 3:16 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 03:12:22PM +0530, Sreekanth Reddy wrote:
>> Added the following Dell branding to the mpt3sas driver.
>>
>> "VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
>> 0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA
>>
>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++
>>  drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
>>  2 files changed, 47 insertions(+)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> index 6739c0a..db362cb 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> @@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc)
>>
>>
>>  /**
>> + * _base_display_dell_branding - Display branding string
>> + * @ioc: per adapter object
>> + *
>> + * Return nothing.
>> + */
>> +static void
>> +_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
>> +{
>> +     if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL)
>> +             return;
>> +
>> +     switch (ioc->pdev->device) {
>> +     case MPI25_MFGPAGE_DEVID_SAS3008:
>> +             switch (ioc->pdev->subsystem_device) {
>> +             case MPT3SAS_DELL_12G_HBA_SSDID:
>> +                     pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>> +                             MPT3SAS_DELL_12G_HBA_BRANDING);
>> +                     break;
>> +             default:
>> +                     pr_info(MPT3SAS_FMT
>> +                        "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
>> +                        ioc->pdev->subsystem_device);
>> +                     break;
>> +             }
>> +             break;
>> +     default:
>> +             pr_info(MPT3SAS_FMT
>> +                     "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
>> +                     ioc->pdev->subsystem_device);
>> +             break;
>> +     }
>> +}
>> +
>> +
>> +/**
>>   * _base_display_ioc_capabilities - Disply IOC's capabilities.
>>   * @ioc: per adapter object
>>   *
>> @@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
>>           bios_version & 0x000000FF);
>>
>>       _base_display_intel_branding(ioc);
>> +     _base_display_dell_branding(ioc);
>>
>>       pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> index 2318ef8..c4780c7 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> @@ -152,6 +152,17 @@
>>  #define MPT3SAS_INTEL_RS3UC080_SSDID    0x3524
>>
>>  /*
>> + * Dell HBA branding
>> + */
>> +#define MPT3SAS_DELL_12G_HBA_BRANDING       \
>> +     "Dell 12Gbps HBA"
>> +
>> +/*
>> + * Dell HBA SSDIDs
>> + */
>> +#define MPT3SAS_DELL_12G_HBA_SSDID   0x1F46
>> +
>> +/*
>>   * status bits for ioc->diag_buffer_status
>>   */
>>  #define MPT3_DIAG_BUFFER_IS_REGISTERED       (0x01)
>> --
>> 2.0.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> This might be something you might consider re-organizing for your code-base
> merge as well, as it leads to a lot of code duplication the more OEMs you have.

May I know which hunk of this patch may leads to code duplication for
more OEMs we add? Whether declaring individual function for each OEMs
leads to this code duplication.

Thanks,
Sreekanth
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

Regards,
Sreekanth

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
@ 2015-06-15 11:11       ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-15 11:11 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Mon, Jun 15, 2015 at 3:16 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 03:12:22PM +0530, Sreekanth Reddy wrote:
>> Added the following Dell branding to the mpt3sas driver.
>>
>> "VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
>> 0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA
>>
>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++
>>  drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
>>  2 files changed, 47 insertions(+)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> index 6739c0a..db362cb 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> @@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc)
>>
>>
>>  /**
>> + * _base_display_dell_branding - Display branding string
>> + * @ioc: per adapter object
>> + *
>> + * Return nothing.
>> + */
>> +static void
>> +_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
>> +{
>> +     if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL)
>> +             return;
>> +
>> +     switch (ioc->pdev->device) {
>> +     case MPI25_MFGPAGE_DEVID_SAS3008:
>> +             switch (ioc->pdev->subsystem_device) {
>> +             case MPT3SAS_DELL_12G_HBA_SSDID:
>> +                     pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>> +                             MPT3SAS_DELL_12G_HBA_BRANDING);
>> +                     break;
>> +             default:
>> +                     pr_info(MPT3SAS_FMT
>> +                        "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
>> +                        ioc->pdev->subsystem_device);
>> +                     break;
>> +             }
>> +             break;
>> +     default:
>> +             pr_info(MPT3SAS_FMT
>> +                     "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
>> +                     ioc->pdev->subsystem_device);
>> +             break;
>> +     }
>> +}
>> +
>> +
>> +/**
>>   * _base_display_ioc_capabilities - Disply IOC's capabilities.
>>   * @ioc: per adapter object
>>   *
>> @@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
>>           bios_version & 0x000000FF);
>>
>>       _base_display_intel_branding(ioc);
>> +     _base_display_dell_branding(ioc);
>>
>>       pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> index 2318ef8..c4780c7 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> @@ -152,6 +152,17 @@
>>  #define MPT3SAS_INTEL_RS3UC080_SSDID    0x3524
>>
>>  /*
>> + * Dell HBA branding
>> + */
>> +#define MPT3SAS_DELL_12G_HBA_BRANDING       \
>> +     "Dell 12Gbps HBA"
>> +
>> +/*
>> + * Dell HBA SSDIDs
>> + */
>> +#define MPT3SAS_DELL_12G_HBA_SSDID   0x1F46
>> +
>> +/*
>>   * status bits for ioc->diag_buffer_status
>>   */
>>  #define MPT3_DIAG_BUFFER_IS_REGISTERED       (0x01)
>> --
>> 2.0.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> This might be something you might consider re-organizing for your code-base
> merge as well, as it leads to a lot of code duplication the more OEMs you have.

May I know which hunk of this patch may leads to code duplication for
more OEMs we add? Whether declaring individual function for each OEMs
leads to this code duplication.

Thanks,
Sreekanth
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

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

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
  2015-06-15 11:11       ` Sreekanth Reddy
  (?)
@ 2015-06-15 11:53       ` Johannes Thumshirn
  2015-06-15 12:00         ` Sreekanth Reddy
  -1 siblings, 1 reply; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-15 11:53 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Mon, Jun 15, 2015 at 04:41:56PM +0530, Sreekanth Reddy wrote:
> On Mon, Jun 15, 2015 at 3:16 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> > On Fri, Jun 12, 2015 at 03:12:22PM +0530, Sreekanth Reddy wrote:
> >> Added the following Dell branding to the mpt3sas driver.
> >>
> >> "VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
> >> 0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA
> >>
> >> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> >> ---
> >>  drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++
> >>  drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
> >>  2 files changed, 47 insertions(+)
> >>
> >> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> >> index 6739c0a..db362cb 100644
> >> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> >> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> >> @@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc)
> >>
> >>
> >>  /**
> >> + * _base_display_dell_branding - Display branding string
> >> + * @ioc: per adapter object
> >> + *
> >> + * Return nothing.
> >> + */
> >> +static void
> >> +_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
> >> +{
> >> +     if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL)
> >> +             return;
> >> +
> >> +     switch (ioc->pdev->device) {
> >> +     case MPI25_MFGPAGE_DEVID_SAS3008:
> >> +             switch (ioc->pdev->subsystem_device) {
> >> +             case MPT3SAS_DELL_12G_HBA_SSDID:
> >> +                     pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> >> +                             MPT3SAS_DELL_12G_HBA_BRANDING);
> >> +                     break;
> >> +             default:
> >> +                     pr_info(MPT3SAS_FMT
> >> +                        "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
> >> +                        ioc->pdev->subsystem_device);
> >> +                     break;
> >> +             }
> >> +             break;
> >> +     default:
> >> +             pr_info(MPT3SAS_FMT
> >> +                     "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
> >> +                     ioc->pdev->subsystem_device);
> >> +             break;
> >> +     }
> >> +}
> >> +
> >> +
> >> +/**
> >>   * _base_display_ioc_capabilities - Disply IOC's capabilities.
> >>   * @ioc: per adapter object
> >>   *
> >> @@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
> >>           bios_version & 0x000000FF);
> >>
> >>       _base_display_intel_branding(ioc);
> >> +     _base_display_dell_branding(ioc);
> >>
> >>       pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
> >>
> >> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> >> index 2318ef8..c4780c7 100644
> >> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> >> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> >> @@ -152,6 +152,17 @@
> >>  #define MPT3SAS_INTEL_RS3UC080_SSDID    0x3524
> >>
> >>  /*
> >> + * Dell HBA branding
> >> + */
> >> +#define MPT3SAS_DELL_12G_HBA_BRANDING       \
> >> +     "Dell 12Gbps HBA"
> >> +
> >> +/*
> >> + * Dell HBA SSDIDs
> >> + */
> >> +#define MPT3SAS_DELL_12G_HBA_SSDID   0x1F46
> >> +
> >> +/*
> >>   * status bits for ioc->diag_buffer_status
> >>   */
> >>  #define MPT3_DIAG_BUFFER_IS_REGISTERED       (0x01)
> >> --
> >> 2.0.2
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> > This might be something you might consider re-organizing for your code-base
> > merge as well, as it leads to a lot of code duplication the more OEMs you have.
> 
> May I know which hunk of this patch may leads to code duplication for
> more OEMs we add? Whether declaring individual function for each OEMs
> leads to this code duplication.

Hi Sreekanth,

In
[PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA
you add _base_display_cisco_branding(). In
[PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
you add _base_display_dell_branding(). You already have
_base_display_intel_branding().

Each of them follows the pattern:
1) Check if it is a OEM device for XXX
2) Check witch OEM device for XXX it is
3) Display a string based on that specific OEM device
4) Return

Johannes

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
  2015-06-15 11:53       ` Johannes Thumshirn
@ 2015-06-15 12:00         ` Sreekanth Reddy
  2015-06-18  9:51           ` Sreekanth Reddy
  0 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-15 12:00 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Mon, Jun 15, 2015 at 5:23 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Mon, Jun 15, 2015 at 04:41:56PM +0530, Sreekanth Reddy wrote:
>> On Mon, Jun 15, 2015 at 3:16 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>> > On Fri, Jun 12, 2015 at 03:12:22PM +0530, Sreekanth Reddy wrote:
>> >> Added the following Dell branding to the mpt3sas driver.
>> >>
>> >> "VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
>> >> 0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA
>> >>
>> >> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> >> ---
>> >>  drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++
>> >>  drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
>> >>  2 files changed, 47 insertions(+)
>> >>
>> >> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> >> index 6739c0a..db362cb 100644
>> >> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>> >> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> >> @@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc)
>> >>
>> >>
>> >>  /**
>> >> + * _base_display_dell_branding - Display branding string
>> >> + * @ioc: per adapter object
>> >> + *
>> >> + * Return nothing.
>> >> + */
>> >> +static void
>> >> +_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
>> >> +{
>> >> +     if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL)
>> >> +             return;
>> >> +
>> >> +     switch (ioc->pdev->device) {
>> >> +     case MPI25_MFGPAGE_DEVID_SAS3008:
>> >> +             switch (ioc->pdev->subsystem_device) {
>> >> +             case MPT3SAS_DELL_12G_HBA_SSDID:
>> >> +                     pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>> >> +                             MPT3SAS_DELL_12G_HBA_BRANDING);
>> >> +                     break;
>> >> +             default:
>> >> +                     pr_info(MPT3SAS_FMT
>> >> +                        "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
>> >> +                        ioc->pdev->subsystem_device);
>> >> +                     break;
>> >> +             }
>> >> +             break;
>> >> +     default:
>> >> +             pr_info(MPT3SAS_FMT
>> >> +                     "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
>> >> +                     ioc->pdev->subsystem_device);
>> >> +             break;
>> >> +     }
>> >> +}
>> >> +
>> >> +
>> >> +/**
>> >>   * _base_display_ioc_capabilities - Disply IOC's capabilities.
>> >>   * @ioc: per adapter object
>> >>   *
>> >> @@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
>> >>           bios_version & 0x000000FF);
>> >>
>> >>       _base_display_intel_branding(ioc);
>> >> +     _base_display_dell_branding(ioc);
>> >>
>> >>       pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
>> >>
>> >> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> >> index 2318ef8..c4780c7 100644
>> >> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
>> >> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> >> @@ -152,6 +152,17 @@
>> >>  #define MPT3SAS_INTEL_RS3UC080_SSDID    0x3524
>> >>
>> >>  /*
>> >> + * Dell HBA branding
>> >> + */
>> >> +#define MPT3SAS_DELL_12G_HBA_BRANDING       \
>> >> +     "Dell 12Gbps HBA"
>> >> +
>> >> +/*
>> >> + * Dell HBA SSDIDs
>> >> + */
>> >> +#define MPT3SAS_DELL_12G_HBA_SSDID   0x1F46
>> >> +
>> >> +/*
>> >>   * status bits for ioc->diag_buffer_status
>> >>   */
>> >>  #define MPT3_DIAG_BUFFER_IS_REGISTERED       (0x01)
>> >> --
>> >> 2.0.2
>> >>
>> >> --
>> >> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> >> the body of a message to majordomo@vger.kernel.org
>> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> >
>> > This might be something you might consider re-organizing for your code-base
>> > merge as well, as it leads to a lot of code duplication the more OEMs you have.
>>
>> May I know which hunk of this patch may leads to code duplication for
>> more OEMs we add? Whether declaring individual function for each OEMs
>> leads to this code duplication.
>
> Hi Sreekanth,
>
> In
> [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA
> you add _base_display_cisco_branding(). In
> [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
> you add _base_display_dell_branding(). You already have
> _base_display_intel_branding().
>
> Each of them follows the pattern:
> 1) Check if it is a OEM device for XXX
> 2) Check witch OEM device for XXX it is
> 3) Display a string based on that specific OEM device
> 4) Return

Johannes,

Thanks for detail explanation. I will take of this while merging the
drivers code.

Thanks a lot,
Sreekanth
>
> Johannes



-- 

Regards,
Sreekanth

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

* Re: [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API
  2015-06-15 10:56     ` Sreekanth Reddy
@ 2015-06-15 21:05       ` James Bottomley
  2015-06-16  5:03         ` Sreekanth Reddy
  0 siblings, 1 reply; 123+ messages in thread
From: James Bottomley @ 2015-06-15 21:05 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: Joe Lawrence, jejb, Christoph Hellwig, Martin K. Petersen,
	linux-scsi, Sathya Prakash, linux-kernel

On Mon, 2015-06-15 at 16:26 +0530, Sreekanth Reddy wrote:
> On Sat, Jun 13, 2015 at 2:33 AM, Joe Lawrence <joe.lawrence@stratus.com> wrote:
> > On 06/12/2015 05:42 AM, Sreekanth Reddy wrote:
> > ...
> >> +#if defined(alloc_ordered_workqueue)
> >> +     ioc->firmware_event_thread = alloc_ordered_workqueue(
> >> +             ioc->firmware_event_name, WQ_MEM_RECLAIM);
> >> +#else
> >> +             ioc->firmware_event_thread = create_singlethread_workqueue(
> >>           ioc->firmware_event_name);
> >> +#endif
> >
> > Hi Sreekanth,
> >
> > I think the upstream version of this code can safely assume
> > alloc_ordered_workqueue is defined, no?
> 
> yes, upstream version of this code can safely assume that
> alloc_ordered_workqueue is defined.
> 
> While working in-house, I observed that some of the older kernels
> doesn't defined this macro, so I have added this else section.

The driver has to be defined for the current kernel.  If you maintain a
backport, that's fine, but not in the upstream driver.  The reasons are
fairly pragmatic: this code in the #else clause can't be compiled so
it's just junk to the upstream driver and the static checkers will find
it and you'll attract a flock of patches removing dead code.

James



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

* Re: [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API
  2015-06-15 21:05       ` James Bottomley
@ 2015-06-16  5:03         ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-16  5:03 UTC (permalink / raw)
  To: James Bottomley
  Cc: Joe Lawrence, jejb, Christoph Hellwig, Martin K. Petersen,
	linux-scsi, Sathya Prakash, linux-kernel

On Tue, Jun 16, 2015 at 2:35 AM, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
> On Mon, 2015-06-15 at 16:26 +0530, Sreekanth Reddy wrote:
>> On Sat, Jun 13, 2015 at 2:33 AM, Joe Lawrence <joe.lawrence@stratus.com> wrote:
>> > On 06/12/2015 05:42 AM, Sreekanth Reddy wrote:
>> > ...
>> >> +#if defined(alloc_ordered_workqueue)
>> >> +     ioc->firmware_event_thread = alloc_ordered_workqueue(
>> >> +             ioc->firmware_event_name, WQ_MEM_RECLAIM);
>> >> +#else
>> >> +             ioc->firmware_event_thread = create_singlethread_workqueue(
>> >>           ioc->firmware_event_name);
>> >> +#endif
>> >
>> > Hi Sreekanth,
>> >
>> > I think the upstream version of this code can safely assume
>> > alloc_ordered_workqueue is defined, no?
>>
>> yes, upstream version of this code can safely assume that
>> alloc_ordered_workqueue is defined.
>>
>> While working in-house, I observed that some of the older kernels
>> doesn't defined this macro, so I have added this else section.
>
> The driver has to be defined for the current kernel.  If you maintain a
> backport, that's fine, but not in the upstream driver.  The reasons are
> fairly pragmatic: this code in the #else clause can't be compiled so
> it's just junk to the upstream driver and the static checkers will find
> it and you'll attract a flock of patches removing dead code.
>
Accepted. I will post next version of this patch by removing the else section.

Thanks,
Sreekanth


> James
>
>



-- 

Regards,
Sreekanth

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

* Re: [PATCH 02/20] [SCSI] mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state.
  2015-06-12  9:42 ` [PATCH 02/20] [SCSI] mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state Sreekanth Reddy
@ 2015-06-16 15:59   ` Tomas Henzl
  2015-06-17  9:08     ` Sreekanth Reddy
  0 siblings, 1 reply; 123+ messages in thread
From: Tomas Henzl @ 2015-06-16 15:59 UTC (permalink / raw)
  To: Sreekanth Reddy, jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash, linux-kernel

On 06/12/2015 11:42 AM, Sreekanth Reddy wrote:
> Driver initialization fails if driver tries to send IOC facts request message when the IOC is in reset or in a fault state.
> 
> This patch will make sure that
>  1.Driver to send IOC facts request message only if HBA is in operational or ready state.
>  2.If IOC is in fault state, a diagnostic reset would be issued.
>  3.If IOC is in reset state then driver will wait for 10 seconds to exit out of reset state.
>    If the HBA continues to be in reset state, then the HBA wouldn't be claimed by the driver.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 65 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index c13a365..ce57320 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -3169,6 +3169,9 @@ _base_wait_on_iocstate(struct MPT3SAS_ADAPTER *ioc, u32 ioc_state, int timeout,
>   * Notes: MPI2_HIS_IOC2SYS_DB_STATUS - set to one when IOC writes to doorbell.
>   */
>  static int
> +_base_diag_reset(struct MPT3SAS_ADAPTER *ioc, int sleep_flag);
> +
> +static int
>  _base_wait_for_doorbell_int(struct MPT3SAS_ADAPTER *ioc, int timeout,
>  	int sleep_flag)
>  {
> @@ -3711,6 +3714,61 @@ _base_get_port_facts(struct MPT3SAS_ADAPTER *ioc, int port, int sleep_flag)
>  }
>  
>  /**
> + * _base_wait_for_iocstate - Wait until the card is in READY or OPERATIONAL
> + * @ioc: per adapter object
> + * @timeout:
> + * @sleep_flag: CAN_SLEEP or NO_SLEEP
> + *
> + * Returns 0 for success, non-zero for failure.
> + */
> +static int
> +_base_wait_for_iocstate(struct MPT3SAS_ADAPTER *ioc, int timeout,
> +	int sleep_flag)
> +{
> +	u32 ioc_state;
> +	int rc;
> +
> +	dinitprintk(ioc, printk(MPT3SAS_FMT "%s\n", ioc->name,
> +	    __func__));
> +
> +	if (ioc->pci_error_recovery)
> +		return 0;
Hi Sreekanth, isn't that^ an error condition - 'return -EFAULT;'
would be better?
Tomas
> +
> +	ioc_state = mpt3sas_base_get_iocstate(ioc, 0);
> +	dhsprintk(ioc, printk(MPT3SAS_FMT "%s: ioc_state(0x%08x)\n",
> +	    ioc->name, __func__, ioc_state));
> +
> +	if (((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_READY) ||
> +	    (ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_OPERATIONAL)
> +		return 0;
> +
> +	if (ioc_state & MPI2_DOORBELL_USED) {
> +		dhsprintk(ioc, printk(MPT3SAS_FMT
> +		    "unexpected doorbell active!\n", ioc->name));
> +		goto issue_diag_reset;
> +	}
> +
> +	if ((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_FAULT) {
> +		mpt3sas_base_fault_info(ioc, ioc_state &
> +		    MPI2_DOORBELL_DATA_MASK);
> +		goto issue_diag_reset;
> +	}
> +
> +	ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY,
> +	    timeout, sleep_flag);
> +	if (ioc_state) {
> +		dfailprintk(ioc, printk(MPT3SAS_FMT
> +		    "%s: failed going to ready state (ioc_state=0x%x)\n",
> +		    ioc->name, __func__, ioc_state));
> +		return -EFAULT;
> +	}
> +
> + issue_diag_reset:
> +	rc = _base_diag_reset(ioc, sleep_flag);
> +	return rc;
> +}
> +
> +/**
>   * _base_get_ioc_facts - obtain ioc facts reply and save in ioc
>   * @ioc: per adapter object
>   * @sleep_flag: CAN_SLEEP or NO_SLEEP
> @@ -3728,6 +3786,13 @@ _base_get_ioc_facts(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>  	dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>  	    __func__));
>  
> +	r = _base_wait_for_iocstate(ioc, 10, sleep_flag);
> +	if (r) {
> +		dfailprintk(ioc, printk(MPT3SAS_FMT
> +		    "%s: failed getting to correct state\n",
> +		    ioc->name, __func__));
> +		return r;
> +	}
>  	mpi_reply_sz = sizeof(Mpi2IOCFactsReply_t);
>  	mpi_request_sz = sizeof(Mpi2IOCFactsRequest_t);
>  	memset(&mpi_request, 0, mpi_request_sz);
> 


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

* Re: [PATCH 02/20] [SCSI] mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state.
  2015-06-16 15:59   ` Tomas Henzl
@ 2015-06-17  9:08     ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-17  9:08 UTC (permalink / raw)
  To: Tomas Henzl
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Tue, Jun 16, 2015 at 9:29 PM, Tomas Henzl <thenzl@redhat.com> wrote:
> On 06/12/2015 11:42 AM, Sreekanth Reddy wrote:
>> Driver initialization fails if driver tries to send IOC facts request message when the IOC is in reset or in a fault state.
>>
>> This patch will make sure that
>>  1.Driver to send IOC facts request message only if HBA is in operational or ready state.
>>  2.If IOC is in fault state, a diagnostic reset would be issued.
>>  3.If IOC is in reset state then driver will wait for 10 seconds to exit out of reset state.
>>    If the HBA continues to be in reset state, then the HBA wouldn't be claimed by the driver.
>>
>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_base.c | 65 +++++++++++++++++++++++++++++++++++++
>>  1 file changed, 65 insertions(+)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> index c13a365..ce57320 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> @@ -3169,6 +3169,9 @@ _base_wait_on_iocstate(struct MPT3SAS_ADAPTER *ioc, u32 ioc_state, int timeout,
>>   * Notes: MPI2_HIS_IOC2SYS_DB_STATUS - set to one when IOC writes to doorbell.
>>   */
>>  static int
>> +_base_diag_reset(struct MPT3SAS_ADAPTER *ioc, int sleep_flag);
>> +
>> +static int
>>  _base_wait_for_doorbell_int(struct MPT3SAS_ADAPTER *ioc, int timeout,
>>       int sleep_flag)
>>  {
>> @@ -3711,6 +3714,61 @@ _base_get_port_facts(struct MPT3SAS_ADAPTER *ioc, int port, int sleep_flag)
>>  }
>>
>>  /**
>> + * _base_wait_for_iocstate - Wait until the card is in READY or OPERATIONAL
>> + * @ioc: per adapter object
>> + * @timeout:
>> + * @sleep_flag: CAN_SLEEP or NO_SLEEP
>> + *
>> + * Returns 0 for success, non-zero for failure.
>> + */
>> +static int
>> +_base_wait_for_iocstate(struct MPT3SAS_ADAPTER *ioc, int timeout,
>> +     int sleep_flag)
>> +{
>> +     u32 ioc_state;
>> +     int rc;
>> +
>> +     dinitprintk(ioc, printk(MPT3SAS_FMT "%s\n", ioc->name,
>> +         __func__));
>> +
>> +     if (ioc->pci_error_recovery)
>> +             return 0;
> Hi Sreekanth, isn't that^ an error condition - 'return -EFAULT;'
> would be better?
> Tomas

Accepted. I will post the next version of this patch with this change.

Thanks,
Sreekanth
>> +
>> +     ioc_state = mpt3sas_base_get_iocstate(ioc, 0);
>> +     dhsprintk(ioc, printk(MPT3SAS_FMT "%s: ioc_state(0x%08x)\n",
>> +         ioc->name, __func__, ioc_state));
>> +
>> +     if (((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_READY) ||
>> +         (ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_OPERATIONAL)
>> +             return 0;
>> +
>> +     if (ioc_state & MPI2_DOORBELL_USED) {
>> +             dhsprintk(ioc, printk(MPT3SAS_FMT
>> +                 "unexpected doorbell active!\n", ioc->name));
>> +             goto issue_diag_reset;
>> +     }
>> +
>> +     if ((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_FAULT) {
>> +             mpt3sas_base_fault_info(ioc, ioc_state &
>> +                 MPI2_DOORBELL_DATA_MASK);
>> +             goto issue_diag_reset;
>> +     }
>> +
>> +     ioc_state = _base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY,
>> +         timeout, sleep_flag);
>> +     if (ioc_state) {
>> +             dfailprintk(ioc, printk(MPT3SAS_FMT
>> +                 "%s: failed going to ready state (ioc_state=0x%x)\n",
>> +                 ioc->name, __func__, ioc_state));
>> +             return -EFAULT;
>> +     }
>> +
>> + issue_diag_reset:
>> +     rc = _base_diag_reset(ioc, sleep_flag);
>> +     return rc;
>> +}
>> +
>> +/**
>>   * _base_get_ioc_facts - obtain ioc facts reply and save in ioc
>>   * @ioc: per adapter object
>>   * @sleep_flag: CAN_SLEEP or NO_SLEEP
>> @@ -3728,6 +3786,13 @@ _base_get_ioc_facts(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>>       dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>>           __func__));
>>
>> +     r = _base_wait_for_iocstate(ioc, 10, sleep_flag);
>> +     if (r) {
>> +             dfailprintk(ioc, printk(MPT3SAS_FMT
>> +                 "%s: failed getting to correct state\n",
>> +                 ioc->name, __func__));
>> +             return r;
>> +     }
>>       mpi_reply_sz = sizeof(Mpi2IOCFactsReply_t);
>>       mpi_request_sz = sizeof(Mpi2IOCFactsRequest_t);
>>       memset(&mpi_request, 0, mpi_request_sz);
>>
>



-- 

Regards,
Sreekanth

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
  2015-06-15 12:00         ` Sreekanth Reddy
@ 2015-06-18  9:51           ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-18  9:51 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

Hi,

Any review comments on this patch. please let us known if any changes
are required.

Thanks,
Sreekanth


On Mon, Jun 15, 2015 at 5:30 PM, Sreekanth Reddy
<sreekanth.reddy@avagotech.com> wrote:
> On Mon, Jun 15, 2015 at 5:23 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>> On Mon, Jun 15, 2015 at 04:41:56PM +0530, Sreekanth Reddy wrote:
>>> On Mon, Jun 15, 2015 at 3:16 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>>> > On Fri, Jun 12, 2015 at 03:12:22PM +0530, Sreekanth Reddy wrote:
>>> >> Added the following Dell branding to the mpt3sas driver.
>>> >>
>>> >> "VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
>>> >> 0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA
>>> >>
>>> >> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>>> >> ---
>>> >>  drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++
>>> >>  drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
>>> >>  2 files changed, 47 insertions(+)
>>> >>
>>> >> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> >> index 6739c0a..db362cb 100644
>>> >> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> >> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> >> @@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc)
>>> >>
>>> >>
>>> >>  /**
>>> >> + * _base_display_dell_branding - Display branding string
>>> >> + * @ioc: per adapter object
>>> >> + *
>>> >> + * Return nothing.
>>> >> + */
>>> >> +static void
>>> >> +_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
>>> >> +{
>>> >> +     if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL)
>>> >> +             return;
>>> >> +
>>> >> +     switch (ioc->pdev->device) {
>>> >> +     case MPI25_MFGPAGE_DEVID_SAS3008:
>>> >> +             switch (ioc->pdev->subsystem_device) {
>>> >> +             case MPT3SAS_DELL_12G_HBA_SSDID:
>>> >> +                     pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>>> >> +                             MPT3SAS_DELL_12G_HBA_BRANDING);
>>> >> +                     break;
>>> >> +             default:
>>> >> +                     pr_info(MPT3SAS_FMT
>>> >> +                        "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
>>> >> +                        ioc->pdev->subsystem_device);
>>> >> +                     break;
>>> >> +             }
>>> >> +             break;
>>> >> +     default:
>>> >> +             pr_info(MPT3SAS_FMT
>>> >> +                     "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
>>> >> +                     ioc->pdev->subsystem_device);
>>> >> +             break;
>>> >> +     }
>>> >> +}
>>> >> +
>>> >> +
>>> >> +/**
>>> >>   * _base_display_ioc_capabilities - Disply IOC's capabilities.
>>> >>   * @ioc: per adapter object
>>> >>   *
>>> >> @@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
>>> >>           bios_version & 0x000000FF);
>>> >>
>>> >>       _base_display_intel_branding(ioc);
>>> >> +     _base_display_dell_branding(ioc);
>>> >>
>>> >>       pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
>>> >>
>>> >> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
>>> >> index 2318ef8..c4780c7 100644
>>> >> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
>>> >> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
>>> >> @@ -152,6 +152,17 @@
>>> >>  #define MPT3SAS_INTEL_RS3UC080_SSDID    0x3524
>>> >>
>>> >>  /*
>>> >> + * Dell HBA branding
>>> >> + */
>>> >> +#define MPT3SAS_DELL_12G_HBA_BRANDING       \
>>> >> +     "Dell 12Gbps HBA"
>>> >> +
>>> >> +/*
>>> >> + * Dell HBA SSDIDs
>>> >> + */
>>> >> +#define MPT3SAS_DELL_12G_HBA_SSDID   0x1F46
>>> >> +
>>> >> +/*
>>> >>   * status bits for ioc->diag_buffer_status
>>> >>   */
>>> >>  #define MPT3_DIAG_BUFFER_IS_REGISTERED       (0x01)
>>> >> --
>>> >> 2.0.2
>>> >>
>>> >> --
>>> >> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>>> >> the body of a message to majordomo@vger.kernel.org
>>> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> >
>>> > This might be something you might consider re-organizing for your code-base
>>> > merge as well, as it leads to a lot of code duplication the more OEMs you have.
>>>
>>> May I know which hunk of this patch may leads to code duplication for
>>> more OEMs we add? Whether declaring individual function for each OEMs
>>> leads to this code duplication.
>>
>> Hi Sreekanth,
>>
>> In
>> [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA
>> you add _base_display_cisco_branding(). In
>> [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
>> you add _base_display_dell_branding(). You already have
>> _base_display_intel_branding().
>>
>> Each of them follows the pattern:
>> 1) Check if it is a OEM device for XXX
>> 2) Check witch OEM device for XXX it is
>> 3) Display a string based on that specific OEM device
>> 4) Return
>
> Johannes,
>
> Thanks for detail explanation. I will take of this while merging the
> drivers code.
>
> Thanks a lot,
> Sreekanth
>>
>> Johannes
>
>
>
> --
>
> Regards,
> Sreekanth



-- 

Regards,
Sreekanth

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
  2015-06-15 10:48             ` Johannes Thumshirn
@ 2015-06-18  9:52               ` Sreekanth Reddy
  -1 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-18  9:52 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

Hi,

Any other review comments on this patch. please let us known if any
changes are required.

Thanks,
Sreekanth

On Mon, Jun 15, 2015 at 4:18 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Mon, Jun 15, 2015 at 03:56:56PM +0530, Sreekanth Reddy wrote:
>> On Fri, Jun 12, 2015 at 6:10 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>> > On Fri, Jun 12, 2015 at 05:48:56PM +0530, Sreekanth Reddy wrote:
>> >> On Fri, Jun 12, 2015 at 4:58 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>> >> > On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote:
>> >> >> Removed the redundancy code while freeing the controller resources.
>> >> >>
>> >> >> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> >> >> ---
>> >> >>  drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
>> > [...]
>> >> >> +     _base_free_irq(ioc);
>> >> >> +     _base_disable_msix(ioc);
>> >> >> +
>> >> >> +     if (ioc->msix96_vector)
>> >> >> +             kfree(ioc->replyPostRegisterIndex);
>> >> >
>> >> > kfree() already checks for zero or a NULL pointer.
>> >>
>> >> Sorry Johannes, I didn't get you. If I understand this correctly, you
>> >> are suggesting to check for NULL pointer before calling kree() API as
>> >> shown below,
>> >>
>> >> if (ioc->msix96_vector && (ioc->replyPostRegisterIndex != NULL))
>> >>         kfree(ioc->replyPostRegisterIndex);
>> >
>> > Correct me if I'm wrong, but I thought you don't need the if
>> > (ioc->msix96_vector) before the kfree(). ioc->replyPostRegisterIndex should be
>> > NULL if ioc->msix96_vector is 0, as far as I can see.
>> >
>> > In _scsih_probe() you have:
>> > shost = scsi_host_alloc(&scsih_driver_template,
>> >             sizeof(struct MPT3SAS_ADAPTER));
>> > if (!shost)
>> >            return -ENODEV;
>> >
>> > /* init local params */
>> > ioc = shost_priv(shost);
>> >
>> > and scsi_host_alloc() does a kzalloc() for shost.
>> >
>> > so ioc->replyPortRegisterIndex is NULL.
>> >
>> > Or am I thinking wrong here?
>>
>> Yes, ioc->replyPostRegisterIndex will be NULL if ioc->msix96_vector is 0,
>> We have added this checks as a precautionary. since calling this
>> function (i.e kfree()) on memory not previously allocated with
>> kmalloc(), or on memory which has already been freed, may results in
>> very bad things, such as freeing memory belonging to another part of
>> the kernel.
>>
>
> OK, then please leave it in.
>
>> >
>> >>
>> >> Regards,
>> >> Sreekanth
>> >
>> > --
>> > Johannes Thumshirn                                       Storage
>> > jthumshirn@suse.de                             +49 911 74053 689
>> > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
>> > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
>> > HRB 21284 (AG Nürnberg)
>>
>>
>>
>> --
>>
>> Regards,
>> Sreekanth
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

Regards,
Sreekanth

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
@ 2015-06-18  9:52               ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-18  9:52 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

Hi,

Any other review comments on this patch. please let us known if any
changes are required.

Thanks,
Sreekanth

On Mon, Jun 15, 2015 at 4:18 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Mon, Jun 15, 2015 at 03:56:56PM +0530, Sreekanth Reddy wrote:
>> On Fri, Jun 12, 2015 at 6:10 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>> > On Fri, Jun 12, 2015 at 05:48:56PM +0530, Sreekanth Reddy wrote:
>> >> On Fri, Jun 12, 2015 at 4:58 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>> >> > On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote:
>> >> >> Removed the redundancy code while freeing the controller resources.
>> >> >>
>> >> >> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> >> >> ---
>> >> >>  drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
>> > [...]
>> >> >> +     _base_free_irq(ioc);
>> >> >> +     _base_disable_msix(ioc);
>> >> >> +
>> >> >> +     if (ioc->msix96_vector)
>> >> >> +             kfree(ioc->replyPostRegisterIndex);
>> >> >
>> >> > kfree() already checks for zero or a NULL pointer.
>> >>
>> >> Sorry Johannes, I didn't get you. If I understand this correctly, you
>> >> are suggesting to check for NULL pointer before calling kree() API as
>> >> shown below,
>> >>
>> >> if (ioc->msix96_vector && (ioc->replyPostRegisterIndex != NULL))
>> >>         kfree(ioc->replyPostRegisterIndex);
>> >
>> > Correct me if I'm wrong, but I thought you don't need the if
>> > (ioc->msix96_vector) before the kfree(). ioc->replyPostRegisterIndex should be
>> > NULL if ioc->msix96_vector is 0, as far as I can see.
>> >
>> > In _scsih_probe() you have:
>> > shost = scsi_host_alloc(&scsih_driver_template,
>> >             sizeof(struct MPT3SAS_ADAPTER));
>> > if (!shost)
>> >            return -ENODEV;
>> >
>> > /* init local params */
>> > ioc = shost_priv(shost);
>> >
>> > and scsi_host_alloc() does a kzalloc() for shost.
>> >
>> > so ioc->replyPortRegisterIndex is NULL.
>> >
>> > Or am I thinking wrong here?
>>
>> Yes, ioc->replyPostRegisterIndex will be NULL if ioc->msix96_vector is 0,
>> We have added this checks as a precautionary. since calling this
>> function (i.e kfree()) on memory not previously allocated with
>> kmalloc(), or on memory which has already been freed, may results in
>> very bad things, such as freeing memory belonging to another part of
>> the kernel.
>>
>
> OK, then please leave it in.
>
>> >
>> >>
>> >> Regards,
>> >> Sreekanth
>> >
>> > --
>> > Johannes Thumshirn                                       Storage
>> > jthumshirn@suse.de                             +49 911 74053 689
>> > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
>> > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
>> > HRB 21284 (AG Nürnberg)
>>
>>
>>
>> --
>>
>> Regards,
>> Sreekanth
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

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

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

* Re: [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding
  2015-06-12  9:42 ` [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding Sreekanth Reddy
@ 2015-06-18  9:53   ` Sreekanth Reddy
  2015-06-19 20:44     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-18  9:53 UTC (permalink / raw)
  To: jejb, Christoph Hellwig
  Cc: Martin K. Petersen, linux-scsi, James E.J. Bottomley,
	Sathya Prakash, linux-kernel, Sreekanth Reddy

Hi,

Any review comments on this patch. please let us known if any changes
are required.

Thanks,
Sreekanth

On Fri, Jun 12, 2015 at 3:12 PM, Sreekanth Reddy
<sreekanth.reddy@avagotech.com> wrote:
> Added support for below customer specific brandings
>
> "VendorID"   "DeviceID"  "SubsystemVendor ID"   "SubsystemDevice ID"  Cisco Branding String
> 0x1000         0x97           0x1137                 0x154           Cisco 9300-8i 12Gbps SAS HBA
> 0x1000         0x97           0x1137                 0x155           Cisco 12G Modular SAS Pass through Controller
> 0x1000         0x97           0x1137                 0x156           UCS C3X60 12G SAS Pass through Controller
>
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 29 +++++++++++++++++++++++++++--
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 16 ++++++++++++----
>  2 files changed, 39 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 0b26c8d..2f2c331 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -2393,9 +2393,17 @@ _base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc)
>         switch (ioc->pdev->device) {
>         case MPI25_MFGPAGE_DEVID_SAS3008:
>                 switch (ioc->pdev->subsystem_device) {
> -               case MPT3SAS_CISCO_12G_HBA_SSDID:
> +               case MPT3SAS_CISCO_12G_8E_HBA_SSDID:
>                         pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> -                               MPT3SAS_CISCO_12G_HBA_BRANDING);
> +                               MPT3SAS_CISCO_12G_8E_HBA_BRANDING);
> +                       break;
> +               case MPT3SAS_CISCO_12G_8I_HBA_SSDID:
> +                       pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +                               MPT3SAS_CISCO_12G_8I_HBA_BRANDING);
> +                       break;
> +               case MPT3SAS_CISCO_12G_AVILA_HBA_SSDID:
> +                       pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +                               MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING);
>                         break;
>                 default:
>                         pr_info(MPT3SAS_FMT
> @@ -2404,6 +2412,23 @@ _base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc)
>                         break;
>                 }
>                 break;
> +       case MPI25_MFGPAGE_DEVID_SAS3108_1:
> +               switch (ioc->pdev->subsystem_device) {
> +               case MPT3SAS_CISCO_12G_AVILA_HBA_SSDID:
> +                       pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +                       MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING);
> +                       break;
> +               case MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_SSDID:
> +                       pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +                       MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING);
> +                       break;
> +               default:
> +                       pr_info(MPT3SAS_FMT
> +                        "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
> +                        ioc->name, ioc->pdev->subsystem_device);
> +                       break;
> +               }
> +               break;
>         default:
>                  pr_info(MPT3SAS_FMT
>                         "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index a89c752..b97039b 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -165,13 +165,21 @@
>  /*
>   * Cisco HBA branding
>   */
> -#define MPT3SAS_CISCO_12G_HBA_BRANDING       \
> -       "Cisco 9300-8E 12G SAS HBA"
> -
> +#define MPT3SAS_CISCO_12G_8E_HBA_BRANDING              \
> +               "Cisco 9300-8E 12G SAS HBA"
> +#define MPT3SAS_CISCO_12G_8I_HBA_BRANDING              \
> +               "Cisco 9300-8i 12G SAS HBA"
> +#define MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING   \
> +               "Cisco 12G Modular SAS Pass through Controller"
> +#define MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING                \
> +               "UCS C3X60 12G SAS Pass through Controller"
>  /*
>   * Cisco HBA SSSDIDs
>   */
> - #define MPT3SAS_CISCO_12G_HBA_SSDID  0x14C
> +#define MPT3SAS_CISCO_12G_8E_HBA_SSDID  0x14C
> +#define MPT3SAS_CISCO_12G_8I_HBA_SSDID  0x154
> +#define MPT3SAS_CISCO_12G_AVILA_HBA_SSDID  0x155
> +#define MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_SSDID  0x156
>
>  /*
>   * status bits for ioc->diag_buffer_status
> --
> 2.0.2
>



-- 

Regards,
Sreekanth

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

* Re: [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA
  2015-06-12  9:42 ` [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA Sreekanth Reddy
@ 2015-06-18  9:55   ` Sreekanth Reddy
  2015-06-19 20:34     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-18  9:55 UTC (permalink / raw)
  To: jejb, Christoph Hellwig
  Cc: Martin K. Petersen, linux-scsi, James E.J. Bottomley,
	Sathya Prakash, linux-kernel, Sreekanth Reddy

Hi,

Any review comments on this patch. please let us known if any changes
are required.

Thanks,
Sreekanth

On Fri, Jun 12, 2015 at 3:12 PM, Sreekanth Reddy
<sreekanth.reddy@avagotech.com> wrote:
> Add the following OEM's branding to the mpt3sas driver.
>
> "VendorID"   "DeviceID"  "SubsystemVendor ID"   "SubsystemDevice ID"  Cisco Branding String
> 0x1000         0x97         SVID = 0x1137             0x014C          Cisco 9300-8E 12G SAS HBA
>
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 34 ++++++++++++++++++++++++++++++++++
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
>  2 files changed, 45 insertions(+)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index db362cb..267e489 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -2378,6 +2378,39 @@ _base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
>         }
>  }
>
> +/**
> + * _base_display_cisco_branding - Display branding string
> + * @ioc: per adapter object
> + *
> + * Return nothing.
> + */
> +static void
> +_base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc)
> +{
> +       if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_CISCO)
> +               return;
> +
> +       switch (ioc->pdev->device) {
> +       case MPI25_MFGPAGE_DEVID_SAS3008:
> +               switch (ioc->pdev->subsystem_device) {
> +               case MPT3SAS_CISCO_12G_HBA_SSDID:
> +                       pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +                               MPT3SAS_CISCO_12G_HBA_BRANDING);
> +                       break;
> +               default:
> +                       pr_info(MPT3SAS_FMT
> +                         "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
> +                         ioc->name, ioc->pdev->subsystem_device);
> +                       break;
> +               }
> +               break;
> +       default:
> +                pr_info(MPT3SAS_FMT
> +                       "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
> +                       ioc->name, ioc->pdev->subsystem_device);
> +               break;
> +       }
> +}
>
>  /**
>   * _base_display_ioc_capabilities - Disply IOC's capabilities.
> @@ -2410,6 +2443,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
>
>         _base_display_intel_branding(ioc);
>         _base_display_dell_branding(ioc);
> +       _base_display_cisco_branding(ioc);
>
>         pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index c4780c7..7cdbc65 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -163,6 +163,17 @@
>  #define MPT3SAS_DELL_12G_HBA_SSDID     0x1F46
>
>  /*
> + * Cisco HBA branding
> + */
> +#define MPT3SAS_CISCO_12G_HBA_BRANDING       \
> +       "Cisco 9300-8E 12G SAS HBA"
> +
> +/*
> + * Cisco HBA SSSDIDs
> + */
> + #define MPT3SAS_CISCO_12G_HBA_SSDID  0x14C
> +
> +/*
>   * status bits for ioc->diag_buffer_status
>   */
>  #define MPT3_DIAG_BUFFER_IS_REGISTERED (0x01)
> --
> 2.0.2
>



-- 

Regards,
Sreekanth

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

* Re: [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives
  2015-06-12  9:42 ` [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives Sreekanth Reddy
@ 2015-06-18  9:56   ` Sreekanth Reddy
  2015-06-19  9:19     ` Johannes Thumshirn
  1 sibling, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-18  9:56 UTC (permalink / raw)
  To: jejb, Christoph Hellwig
  Cc: Martin K. Petersen, linux-scsi, James E.J. Bottomley,
	Sathya Prakash, linux-kernel, Sreekanth Reddy

Hi,

Any other review comments on this patch. please let us known if any
changes are required.

Thanks,
Sreekanth

On Fri, Jun 12, 2015 at 3:12 PM, Sreekanth Reddy
<sreekanth.reddy@avagotech.com> wrote:
> This Patch will provide more details of the devices such as slot number, enclosure logical id, enclosure level & connector name in the following scenarios,
>
> - When end device is added in the topology,
> - When the end device is removed from the setup,
> - When the SCSI mid layer issues TASK ABORT/ DEVICE RESET/ TARGET RESET during error handling,
> - When any command to the device fails with Sense key Hardware error or Medium error or Unit Attention,
> - When firmware returns device error or device not ready status for the end device,
> - When a Predicted fault is detected on an end device.
>
> This information can be used by the user to identify the location of the desired drive in the topology.
>
> Driver will get these information by reading the sas device page0.
>
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.h  |   2 +
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 238 +++++++++++++++++++++++++++++------
>  2 files changed, 201 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index b79ad4f..293ad23 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -317,6 +317,8 @@ struct _sas_device {
>         u8      fast_path;
>         u8      pfa_led_on;
>         u8      pend_sas_rphy_add;
> +       u8   enclosure_level;
> +       u8   connector_name[4];
>  };
>
>  /**
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index d457dba..64dd90b 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -585,6 +585,22 @@ _scsih_sas_device_remove(struct MPT3SAS_ADAPTER *ioc,
>
>         if (!sas_device)
>                 return;
> +       pr_info(MPT3SAS_FMT
> +           "removing handle(0x%04x), sas_addr(0x%016llx)\n",
> +           ioc->name, sas_device->handle,
> +           (unsigned long long) sas_device->sas_address);
> +
> +       if (sas_device->enclosure_handle != 0)
> +               pr_info(MPT3SAS_FMT
> +                  "removing enclosure logical id(0x%016llx), slot(%d)\n",
> +                  ioc->name, (unsigned long long)
> +                  sas_device->enclosure_logical_id, sas_device->slot);
> +
> +       if (sas_device->connector_name[0] != '\0')
> +               pr_info(MPT3SAS_FMT
> +                  "removing enclosure level(0x%04x), connector name( %s)\n",
> +                  ioc->name, sas_device->enclosure_level,
> +                  sas_device->connector_name);
>
>         spin_lock_irqsave(&ioc->sas_device_lock, flags);
>         list_del(&sas_device->list);
> @@ -663,6 +679,18 @@ _scsih_sas_device_add(struct MPT3SAS_ADAPTER *ioc,
>                 ioc->name, __func__, sas_device->handle,
>                 (unsigned long long)sas_device->sas_address));
>
> +       if (sas_device->enclosure_handle != 0)
> +               dewtprintk(ioc, pr_info(MPT3SAS_FMT
> +                   "%s: enclosure logical id(0x%016llx), slot( %d)\n",
> +                   ioc->name, __func__, (unsigned long long)
> +                   sas_device->enclosure_logical_id, sas_device->slot));
> +
> +       if (sas_device->connector_name[0] != '\0')
> +               dewtprintk(ioc, pr_info(MPT3SAS_FMT
> +                   "%s: enclosure level(0x%04x), connector name( %s)\n",
> +                   ioc->name, __func__,
> +                   sas_device->enclosure_level, sas_device->connector_name));
> +
>         spin_lock_irqsave(&ioc->sas_device_lock, flags);
>         list_add_tail(&sas_device->list, &ioc->sas_device_list);
>         spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
> @@ -704,6 +732,18 @@ _scsih_sas_device_init_add(struct MPT3SAS_ADAPTER *ioc,
>                 __func__, sas_device->handle,
>                 (unsigned long long)sas_device->sas_address));
>
> +       if (sas_device->enclosure_handle != 0)
> +               dewtprintk(ioc, pr_info(MPT3SAS_FMT
> +                   "%s: enclosure logical id(0x%016llx), slot( %d)\n",
> +                   ioc->name, __func__, (unsigned long long)
> +                   sas_device->enclosure_logical_id, sas_device->slot));
> +
> +       if (sas_device->connector_name[0] != '\0')
> +               dewtprintk(ioc, pr_info(MPT3SAS_FMT
> +                   "%s: enclosure level(0x%04x), connector name( %s)\n",
> +                   ioc->name, __func__, sas_device->enclosure_level,
> +                   sas_device->connector_name));
> +
>         spin_lock_irqsave(&ioc->sas_device_lock, flags);
>         list_add_tail(&sas_device->list, &ioc->sas_device_init_list);
>         _scsih_determine_boot_device(ioc, sas_device, 0);
> @@ -1772,10 +1812,16 @@ _scsih_slave_configure(struct scsi_device *sdev)
>             "sas_addr(0x%016llx), phy(%d), device_name(0x%016llx)\n",
>             ds, handle, (unsigned long long)sas_device->sas_address,
>             sas_device->phy, (unsigned long long)sas_device->device_name);
> -       sdev_printk(KERN_INFO, sdev,
> -               "%s: enclosure_logical_id(0x%016llx), slot(%d)\n",
> -               ds, (unsigned long long)
> -           sas_device->enclosure_logical_id, sas_device->slot);
> +       if (sas_device->enclosure_handle != 0)
> +               sdev_printk(KERN_INFO, sdev,
> +                    "%s: enclosure_logical_id(0x%016llx), slot(%d)\n",
> +                    ds, (unsigned long long)
> +                    sas_device->enclosure_logical_id, sas_device->slot);
> +       if (sas_device->connector_name[0] != '\0')
> +               sdev_printk(KERN_INFO, sdev,
> +                    "%s: enclosure level(0x%04x), connector name( %s)\n",
> +                    ds, sas_device->enclosure_level,
> +                    sas_device->connector_name);
>
>         spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
>
> @@ -2189,10 +2235,17 @@ _scsih_tm_display_info(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd)
>                             sas_device->handle,
>                             (unsigned long long)sas_device->sas_address,
>                             sas_device->phy);
> -                       starget_printk(KERN_INFO, starget,
> -                           "enclosure_logical_id(0x%016llx), slot(%d)\n",
> -                          (unsigned long long)sas_device->enclosure_logical_id,
> -                           sas_device->slot);
> +                       if (sas_device->enclosure_handle != 0)
> +                               starget_printk(KERN_INFO, starget,
> +                                "enclosure_logical_id(0x%016llx), slot(%d)\n",
> +                                (unsigned long long)
> +                                sas_device->enclosure_logical_id,
> +                                sas_device->slot);
> +                       if (sas_device->connector_name)
> +                               starget_printk(KERN_INFO, starget,
> +                               "enclosure level(0x%04x),connector name(%s)\n",
> +                                sas_device->enclosure_level,
> +                                sas_device->connector_name);
>                 }
>                 spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
>         }
> @@ -2813,6 +2866,18 @@ _scsih_tm_tr_send(struct MPT3SAS_ADAPTER *ioc, u16 handle)
>                         "setting delete flag: handle(0x%04x), sas_addr(0x%016llx)\n",
>                         ioc->name, handle,
>                     (unsigned long long)sas_address));
> +               if (sas_device->enclosure_handle != 0)
> +                       dewtprintk(ioc, pr_info(MPT3SAS_FMT
> +                        "setting delete flag:enclosure logical id(0x%016llx),"
> +                        " slot(%d)\n", ioc->name, (unsigned long long)
> +                         sas_device->enclosure_logical_id,
> +                         sas_device->slot));
> +               if (sas_device->connector_name)
> +                       dewtprintk(ioc, pr_info(MPT3SAS_FMT
> +                        "setting delete flag: enclosure level(0x%04x),"
> +                        " connector name( %s)\n", ioc->name,
> +                         sas_device->enclosure_level,
> +                         sas_device->connector_name));
>                 _scsih_ublock_io_device(ioc, sas_address);
>                 sas_target_priv_data->handle = MPT3SAS_INVALID_DEVICE_HANDLE;
>         }
> @@ -3828,10 +3893,19 @@ _scsih_scsi_ioc_info(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
>                                 "\tsas_address(0x%016llx), phy(%d)\n",
>                                 ioc->name, (unsigned long long)
>                             sas_device->sas_address, sas_device->phy);
> -                       pr_warn(MPT3SAS_FMT
> -                           "\tenclosure_logical_id(0x%016llx), slot(%d)\n",
> -                           ioc->name, (unsigned long long)
> -                           sas_device->enclosure_logical_id, sas_device->slot);
> +                       if (sas_device->enclosure_handle != 0)
> +                               pr_warn(MPT3SAS_FMT
> +                                 "\tenclosure_logical_id(0x%016llx),"
> +                                 "slot(%d)\n", ioc->name,
> +                                 (unsigned long long)
> +                                 sas_device->enclosure_logical_id,
> +                                 sas_device->slot);
> +                       if (sas_device->connector_name[0])
> +                               pr_warn(MPT3SAS_FMT
> +                                 "\tenclosure level(0x%04x),"
> +                                 " connector name( %s)\n", ioc->name,
> +                                 sas_device->enclosure_level,
> +                                 sas_device->connector_name);
>                 }
>                 spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
>         }
> @@ -4006,7 +4080,16 @@ _scsih_smart_predicted_fault(struct MPT3SAS_ADAPTER *ioc, u16 handle)
>                 spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
>                 return;
>         }
> -       starget_printk(KERN_WARNING, starget, "predicted fault\n");
> +       if (sas_device->enclosure_handle != 0)
> +               starget_printk(KERN_INFO, starget, "predicted fault, "
> +                       "enclosure logical id(0x%016llx), slot(%d)\n",
> +                       (unsigned long long)sas_device->enclosure_logical_id,
> +                       sas_device->slot);
> +       if (sas_device->connector_name[0] != '\0')
> +               starget_printk(KERN_WARNING, starget, "predicted fault, "
> +                       "enclosure level(0x%04x), connector name( %s)\n",
> +                       sas_device->enclosure_level,
> +                       sas_device->connector_name);
>         spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
>
>         if (ioc->pdev->subsystem_vendor == PCI_VENDOR_ID_IBM)
> @@ -4126,8 +4209,13 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
>                         _scsih_smart_predicted_fault(ioc,
>                             le16_to_cpu(mpi_reply->DevHandle));
>                 mpt3sas_trigger_scsi(ioc, data.skey, data.asc, data.ascq);
> -       }
>
> +               if (!(ioc->logging_level & MPT_DEBUG_REPLY) &&
> +                    ((scmd->sense_buffer[2] == UNIT_ATTENTION) ||
> +                    (scmd->sense_buffer[2] == MEDIUM_ERROR) ||
> +                    (scmd->sense_buffer[2] == HARDWARE_ERROR)))
> +                       _scsih_scsi_ioc_info(ioc, scmd, mpi_reply, smid);
> +               }
>         switch (ioc_status) {
>         case MPI2_IOCSTATUS_BUSY:
>         case MPI2_IOCSTATUS_INSUFFICIENT_RESOURCES:
> @@ -4795,6 +4883,16 @@ _scsih_check_device(struct MPT3SAS_ADAPTER *ioc,
>                         sas_device->handle, handle);
>                 sas_target_priv_data->handle = handle;
>                 sas_device->handle = handle;
> +               if (sas_device_pg0.Flags &
> +                    MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID) {
> +                       sas_device->enclosure_level =
> +                               le16_to_cpu(sas_device_pg0.EnclosureLevel);
> +                       memcpy(&sas_device->connector_name[0],
> +                               &sas_device_pg0.ConnectorName[0], 4);
> +               } else {
> +                       sas_device->enclosure_level = 0;
> +                       sas_device->connector_name[0] = '\0';
> +               }
>         }
>
>         /* check if device is present */
> @@ -4901,14 +4999,24 @@ _scsih_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phy_num,
>                     ioc->name, __FILE__, __LINE__, __func__);
>         sas_device->enclosure_handle =
>             le16_to_cpu(sas_device_pg0.EnclosureHandle);
> -       sas_device->slot =
> -           le16_to_cpu(sas_device_pg0.Slot);
> +       if (sas_device->enclosure_handle != 0)
> +               sas_device->slot =
> +                   le16_to_cpu(sas_device_pg0.Slot);
>         sas_device->device_info = device_info;
>         sas_device->sas_address = sas_address;
>         sas_device->phy = sas_device_pg0.PhyNum;
>         sas_device->fast_path = (le16_to_cpu(sas_device_pg0.Flags) &
>             MPI25_SAS_DEVICE0_FLAGS_FAST_PATH_CAPABLE) ? 1 : 0;
>
> +       if (sas_device_pg0.Flags & MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID) {
> +               sas_device->enclosure_level =
> +                       le16_to_cpu(sas_device_pg0.EnclosureLevel);
> +               memcpy(&sas_device->connector_name[0],
> +                       &sas_device_pg0.ConnectorName[0], 4);
> +       } else {
> +               sas_device->enclosure_level = 0;
> +               sas_device->connector_name[0] = '\0';
> +       }
>         /* get enclosure_logical_id */
>         if (sas_device->enclosure_handle && !(mpt3sas_config_get_enclosure_pg0(
>            ioc, &mpi_reply, &enclosure_pg0, MPI2_SAS_ENCLOS_PGAD_FORM_HANDLE,
> @@ -4950,6 +5058,18 @@ _scsih_remove_device(struct MPT3SAS_ADAPTER *ioc,
>                 ioc->name, __func__,
>             sas_device->handle, (unsigned long long)
>             sas_device->sas_address));
> +       if (sas_device->enclosure_handle != 0)
> +               dewtprintk(ioc, pr_info(MPT3SAS_FMT
> +                   "%s: enter: enclosure logical id(0x%016llx), slot(%d)\n",
> +                   ioc->name, __func__,
> +                   (unsigned long long)sas_device->enclosure_logical_id,
> +                   sas_device->slot));
> +       if (sas_device->connector_name[0] != '\0')
> +               dewtprintk(ioc, pr_info(MPT3SAS_FMT
> +                 "%s: enter: enclosure level(0x%04x), connector name( %s)\n",
> +                 ioc->name, __func__,
> +                 sas_device->enclosure_level,
> +                 sas_device->connector_name));
>
>         if (sas_device->starget && sas_device->starget->hostdata) {
>                 sas_target_priv_data = sas_device->starget->hostdata;
> @@ -4966,12 +5086,34 @@ _scsih_remove_device(struct MPT3SAS_ADAPTER *ioc,
>                 "removing handle(0x%04x), sas_addr(0x%016llx)\n",
>                 ioc->name, sas_device->handle,
>             (unsigned long long) sas_device->sas_address);
> +       if (sas_device->enclosure_handle != 0)
> +               pr_info(MPT3SAS_FMT
> +                 "removing : enclosure logical id(0x%016llx), slot(%d)\n",
> +                 ioc->name,
> +                 (unsigned long long)sas_device->enclosure_logical_id,
> +                 sas_device->slot);
> +       if (sas_device->connector_name[0] != '\0')
> +               pr_info(MPT3SAS_FMT
> +                 "removing enclosure level(0x%04x), connector name( %s)\n",
> +                 ioc->name, sas_device->enclosure_level,
> +                 sas_device->connector_name);
>
>         dewtprintk(ioc, pr_info(MPT3SAS_FMT
>                 "%s: exit: handle(0x%04x), sas_addr(0x%016llx)\n",
>                 ioc->name, __func__,
> -           sas_device->handle, (unsigned long long)
> -           sas_device->sas_address));
> +               sas_device->handle, (unsigned long long)
> +               sas_device->sas_address));
> +       if (sas_device->enclosure_handle != 0)
> +               dewtprintk(ioc, pr_info(MPT3SAS_FMT
> +                   "%s: exit: enclosure logical id(0x%016llx), slot(%d)\n",
> +                   ioc->name, __func__,
> +                   (unsigned long long)sas_device->enclosure_logical_id,
> +                   sas_device->slot));
> +       if (sas_device->connector_name[0] != '\0')
> +               dewtprintk(ioc, pr_info(MPT3SAS_FMT
> +                   "%s: exit: enclosure level(0x%04x), connector name(%s)\n",
> +                   ioc->name, __func__, sas_device->enclosure_level,
> +                   sas_device->connector_name));
>
>         kfree(sas_device);
>  }
> @@ -6364,9 +6506,7 @@ _scsih_prep_device_scan(struct MPT3SAS_ADAPTER *ioc)
>  /**
>   * _scsih_mark_responding_sas_device - mark a sas_devices as responding
>   * @ioc: per adapter object
> - * @sas_address: sas address
> - * @slot: enclosure slot id
> - * @handle: device handle
> + * @sas_device_pg0: SAS Device page 0
>   *
>   * After host reset, find out whether devices are still responding.
>   * Used in _scsih_remove_unresponsive_sas_devices.
> @@ -6374,8 +6514,8 @@ _scsih_prep_device_scan(struct MPT3SAS_ADAPTER *ioc)
>   * Return nothing.
>   */
>  static void
> -_scsih_mark_responding_sas_device(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
> -       u16 slot, u16 handle)
> +_scsih_mark_responding_sas_device(struct MPT3SAS_ADAPTER *ioc,
> +Mpi2SasDevicePage0_t *sas_device_pg0)
>  {
>         struct MPT3SAS_TARGET *sas_target_priv_data = NULL;
>         struct scsi_target *starget;
> @@ -6384,8 +6524,8 @@ _scsih_mark_responding_sas_device(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
>
>         spin_lock_irqsave(&ioc->sas_device_lock, flags);
>         list_for_each_entry(sas_device, &ioc->sas_device_list, list) {
> -               if (sas_device->sas_address == sas_address &&
> -                   sas_device->slot == slot) {
> +               if ((sas_device->sas_address == sas_device_pg0->SASAddress) &&
> +                       (sas_device->slot == sas_device_pg0->Slot)) {
>                         sas_device->responding = 1;
>                         starget = sas_device->starget;
>                         if (starget && starget->hostdata) {
> @@ -6394,22 +6534,40 @@ _scsih_mark_responding_sas_device(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
>                                 sas_target_priv_data->deleted = 0;
>                         } else
>                                 sas_target_priv_data = NULL;
> -                       if (starget)
> +                       if (starget) {
>                                 starget_printk(KERN_INFO, starget,
> -                                   "handle(0x%04x), sas_addr(0x%016llx), "
> -                                   "enclosure logical id(0x%016llx), "
> -                                   "slot(%d)\n", handle,
> -                                   (unsigned long long)sas_device->sas_address,
> +                                   "handle(0x%04x), sas_addr(0x%016llx)\n",
> +                                   sas_device_pg0->DevHandle,
>                                     (unsigned long long)
> -                                   sas_device->enclosure_logical_id,
> -                                   sas_device->slot);
> -                       if (sas_device->handle == handle)
> +                                   sas_device->sas_address);
> +
> +                               if (sas_device->enclosure_handle != 0)
> +                                       starget_printk(KERN_INFO, starget,
> +                                        "enclosure logical id(0x%016llx),"
> +                                        " slot(%d)\n",
> +                                        (unsigned long long)
> +                                        sas_device->enclosure_logical_id,
> +                                        sas_device->slot);
> +                       }
> +                       if (sas_device_pg0->Flags &
> +                             MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID) {
> +                               sas_device->enclosure_level =
> +                                  le16_to_cpu(sas_device_pg0->EnclosureLevel);
> +                               memcpy(&sas_device->connector_name[0],
> +                                       &sas_device_pg0->ConnectorName[0], 4);
> +                       } else {
> +                               sas_device->enclosure_level = 0;
> +                               sas_device->connector_name[0] = '\0';
> +                       }
> +
> +                       if (sas_device->handle == sas_device_pg0->DevHandle)
>                                 goto out;
>                         pr_info("\thandle changed from(0x%04x)!!!\n",
>                             sas_device->handle);
> -                       sas_device->handle = handle;
> +                       sas_device->handle = sas_device_pg0->DevHandle;
>                         if (sas_target_priv_data)
> -                               sas_target_priv_data->handle = handle;
> +                               sas_target_priv_data->handle =
> +                                       sas_device_pg0->DevHandle;
>                         goto out;
>                 }
>         }
> @@ -6448,13 +6606,15 @@ _scsih_search_responding_sas_devices(struct MPT3SAS_ADAPTER *ioc)
>                     MPI2_IOCSTATUS_MASK;
>                 if (ioc_status != MPI2_IOCSTATUS_SUCCESS)
>                         break;
> -               handle = le16_to_cpu(sas_device_pg0.DevHandle);
> +               handle = sas_device_pg0.DevHandle =
> +                               le16_to_cpu(sas_device_pg0.DevHandle);
>                 device_info = le32_to_cpu(sas_device_pg0.DeviceInfo);
>                 if (!(_scsih_is_end_device(device_info)))
>                         continue;
> -               _scsih_mark_responding_sas_device(ioc,
> -                   le64_to_cpu(sas_device_pg0.SASAddress),
> -                   le16_to_cpu(sas_device_pg0.Slot), handle);
> +               sas_device_pg0.SASAddress =
> +                               le64_to_cpu(sas_device_pg0.SASAddress);
> +               sas_device_pg0.Slot = le16_to_cpu(sas_device_pg0.Slot);
> +               _scsih_mark_responding_sas_device(ioc, &sas_device_pg0);
>         }
>
>   out:
> --
> 2.0.2
>



-- 

Regards,
Sreekanth

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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
  2015-06-12 11:16       ` Sreekanth Reddy
@ 2015-06-18  9:57         ` Sreekanth Reddy
  -1 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-18  9:57 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

Hi,

Any other review comments on this patch. please let us known if any
changes are required.

Thanks,
Sreekanth

On Fri, Jun 12, 2015 at 4:46 PM, Sreekanth Reddy
<sreekanth.reddy@avagotech.com> wrote:
> Thanks Johannes, we will take care of this point in our current
> on-development mpt2sas/mpt3sas merging activity.
>
>
> Thanks,
> Sreekanth
>
> On Fri, Jun 12, 2015 at 4:39 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>> On Fri, Jun 12, 2015 at 03:12:13PM +0530, Sreekanth Reddy wrote:
>>> In this patch, increased the number of MSIX vector support for SAS3 C0 HBAs to up-to 96.
>>>
>>> Following are changes that are done in this patch
>>> 1. Support this feature only for SAS3 C0 cards and also only when reply post free queue count is greater than 8.
>>> 2. Instead of using single ReplyPostHostIndex system interface, here 12 ReplyPostHostIndex system interfaces are used. reply post free queues numbered from 0 to 7 use the first ReplyPostHostIndex system interface to update its corresponding ReplyPostHostIndex values, reply post free queues numbered from 8 to 15 will use the second ReplyPostHostIndex system interface and so on. These 12 ReplyPostHostIndex system interfaces address are saved in the array replyPostRegisterIndex[].
>>> 3. Update the ReplyPostHostIndex value of corresponding reply post free queue in the (its msix_index/8)th entry of replyPostRegisterIndex[] array after processing the reply post descriptor.
>>>
>>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>>> ---
>>>  drivers/scsi/mpt3sas/mpt3sas_base.c | 70 +++++++++++++++++++++++++++++++++----
>>>  drivers/scsi/mpt3sas/mpt3sas_base.h |  7 +++-
>>>  2 files changed, 69 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> index 14a781b..c13a365 100644
>>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> @@ -83,7 +83,7 @@ static int msix_disable = -1;
>>>  module_param(msix_disable, int, 0);
>>>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
>>>
>>> -static int max_msix_vectors = 8;
>>> +static int max_msix_vectors = -1;
>>>  module_param(max_msix_vectors, int, 0);
>>>  MODULE_PARM_DESC(max_msix_vectors,
>>>       " max msix vectors - (default=8)");
>>
>> When changing the default value, please also update the description reflecting
>> this change.
>>
>>> @@ -1009,8 +1009,15 @@ _base_interrupt(int irq, void *bus_id)
>>>       }
>>>
>>>       wmb();
>>> -     writel(reply_q->reply_post_host_index | (msix_index <<
>>> -         MPI2_RPHI_MSIX_INDEX_SHIFT), &ioc->chip->ReplyPostHostIndex);
>>> +     if (ioc->msix96_vector) {
>>> +             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);
>>> +     }
>>>       atomic_dec(&reply_q->busy);
>>>       return IRQ_HANDLED;
>>>  }
>>> @@ -1560,8 +1567,6 @@ _base_check_enable_msix(struct MPT3SAS_ADAPTER *ioc)
>>>
>>>       pci_read_config_word(ioc->pdev, base + 2, &message_control);
>>>       ioc->msix_vector_count = (message_control & 0x3FF) + 1;
>>> -     if (ioc->msix_vector_count > 8)
>>> -             ioc->msix_vector_count = 8;
>>>       dinitprintk(ioc, pr_info(MPT3SAS_FMT
>>>               "msix is supported, vector_count(%d)\n",
>>>               ioc->name, ioc->msix_vector_count));
>>> @@ -1880,6 +1885,31 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>>>       if (r)
>>>               goto out_fail;
>>>
>>> +     /* Use the Combined reply queue feature only for SAS3 C0 HBAs and
>>> +      * also only when reply queue count is greater than 8
>>> +      */
>>> +     if (ioc->msix96_vector && ioc->reply_queue_count > 8) {
>>> +             /* If this is an 96 vector supported device,
>>> +             set up ReplyPostIndex addresses */
>>> +             ioc->replyPostRegisterIndex = kcalloc(12,
>>> +                     sizeof(resource_size_t *), GFP_KERNEL);
>>> +             if (!ioc->replyPostRegisterIndex) {
>>> +                     dfailprintk(ioc, printk(MPT3SAS_FMT
>>> +                     "allocation for reply Post Register Index failed!!!\n",
>>> +                                                                ioc->name));
>>> +                     r = -ENOMEM;
>>> +                     goto out_fail;
>>> +             }
>>> +
>>> +             for (i = 0; i < 12; i++) {
>>> +                     ioc->replyPostRegisterIndex[i] = (resource_size_t *)
>>> +                             ((u8 *)&ioc->chip->Doorbell +
>>> +                             MPI25_SUP_REPLY_POST_HOST_INDEX_OFFSET +
>>> +                             (i * 0x10));
>>> +             }
>>> +     } else
>>> +             ioc->msix96_vector = 0;
>>> +
>>>       list_for_each_entry(reply_q, &ioc->reply_queue_list, list)
>>>               pr_info(MPT3SAS_FMT "%s: IRQ %d\n",
>>>                   reply_q->name,  ((ioc->msix_enable) ? "PCI-MSI-X enabled" :
>>> @@ -1901,6 +1931,8 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>>>       pci_release_selected_regions(ioc->pdev, ioc->bars);
>>>       pci_disable_pcie_error_reporting(pdev);
>>>       pci_disable_device(pdev);
>>> +     if (ioc->msix96_vector)
>>> +             kfree(ioc->replyPostRegisterIndex);
>>>       return r;
>>>  }
>>>
>>> @@ -4522,8 +4554,16 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>>>
>>>       /* initialize reply post host index */
>>>       list_for_each_entry(reply_q, &ioc->reply_queue_list, list) {
>>> -             writel(reply_q->msix_index << MPI2_RPHI_MSIX_INDEX_SHIFT,
>>> -                 &ioc->chip->ReplyPostHostIndex);
>>> +             if (ioc->msix96_vector) {
>>> +                     writel((reply_q->msix_index & 7)<<
>>> +                        MPI2_RPHI_MSIX_INDEX_SHIFT,
>>> +                        ioc->replyPostRegisterIndex[reply_q->msix_index/8]);
>>> +             } else {
>>> +                     writel(reply_q->msix_index <<
>>> +                             MPI2_RPHI_MSIX_INDEX_SHIFT,
>>> +                                     &ioc->chip->ReplyPostHostIndex);
>>> +             }
>>> +
>>>               if (!_base_is_controller_msix_enabled(ioc))
>>>                       goto skip_init_reply_post_host_index;
>>>       }
>>> @@ -4577,6 +4617,9 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>>>       _base_free_irq(ioc);
>>>       _base_disable_msix(ioc);
>>>
>>> +     if (ioc->msix96_vector)
>>> +             kfree(ioc->replyPostRegisterIndex);
>>> +
>>>       if (ioc->chip_phys && ioc->chip)
>>>               iounmap(ioc->chip);
>>>       ioc->chip_phys = 0;
>>> @@ -4600,6 +4643,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>>>  {
>>>       int r, i;
>>>       int cpu_id, last_cpu_id = 0;
>>> +     u8 revision;
>>>
>>>       dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>>>           __func__));
>>> @@ -4618,6 +4662,18 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>>>               r = -ENOMEM;
>>>               goto out_free_resources;
>>>       }
>>> +     /* Check whether the controller revision is C0 or above.
>>> +         C0 and above revision controllers support 96 vectors */
>>> +     revision = ioc->pdev->revision;
>>> +
>>> +     if ((ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3004 ||
>>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3008 ||
>>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_1 ||
>>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_2 ||
>>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_5 ||
>>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_6) &&
>>> +          (revision >= 0x02))
>>> +             ioc->msix96_vector = 1;
>>>
>>>       ioc->rdpq_array_enable_assigned = 0;
>>>       ioc->dma_mask = 0;
>>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
>>> index afa8816..6b8d8f1 100644
>>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
>>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
>>> @@ -728,7 +728,8 @@ typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc);
>>>   *                           is assigned only ones
>>>   * @reply_queue_count: number of reply queue's
>>>   * @reply_queue_list: link list contaning the reply queue info
>>> - * @reply_post_host_index: head index in the pool where FW completes IO
>>> + * @msix96_vector: 96 MSI-X vector support
>>> + * @replyPostRegisterIndex: index of next position in Reply Desc Post Queue
>>>   * @delayed_tr_list: target reset link list
>>>   * @delayed_tr_volume_list: volume target reset link list
>>>   * @@temp_sensors_count: flag to carry the number of temperature sensors
>>> @@ -937,6 +938,10 @@ struct MPT3SAS_ADAPTER {
>>>       u8              reply_queue_count;
>>>       struct list_head reply_queue_list;
>>>
>>> +     u8              msix96_vector;
>>> +     /* reply post register index */
>>> +     resource_size_t **replyPostRegisterIndex;
>>> +
>>
>> I know there are many uses of mixed-case varibles in this driver and changing
>> them when they're already in makes no sense, but maybe you could consider
>> getting rid of them in your mpt2sas/mpt3sas merge, as it is not really a
>> commonly seen pattern in the linux kernel.
>>
>>>       struct list_head delayed_tr_list;
>>>       struct list_head delayed_tr_volume_list;
>>>       u8              temp_sensors_count;
>>> --
>>> 2.0.2
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>> --
>> Johannes Thumshirn                                       Storage
>> jthumshirn@suse.de                             +49 911 74053 689
>> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
>> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
>> HRB 21284 (AG Nürnberg)
>
>
>
> --
>
> Regards,
> Sreekanth



-- 

Regards,
Sreekanth

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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
@ 2015-06-18  9:57         ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-18  9:57 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

Hi,

Any other review comments on this patch. please let us known if any
changes are required.

Thanks,
Sreekanth

On Fri, Jun 12, 2015 at 4:46 PM, Sreekanth Reddy
<sreekanth.reddy@avagotech.com> wrote:
> Thanks Johannes, we will take care of this point in our current
> on-development mpt2sas/mpt3sas merging activity.
>
>
> Thanks,
> Sreekanth
>
> On Fri, Jun 12, 2015 at 4:39 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>> On Fri, Jun 12, 2015 at 03:12:13PM +0530, Sreekanth Reddy wrote:
>>> In this patch, increased the number of MSIX vector support for SAS3 C0 HBAs to up-to 96.
>>>
>>> Following are changes that are done in this patch
>>> 1. Support this feature only for SAS3 C0 cards and also only when reply post free queue count is greater than 8.
>>> 2. Instead of using single ReplyPostHostIndex system interface, here 12 ReplyPostHostIndex system interfaces are used. reply post free queues numbered from 0 to 7 use the first ReplyPostHostIndex system interface to update its corresponding ReplyPostHostIndex values, reply post free queues numbered from 8 to 15 will use the second ReplyPostHostIndex system interface and so on. These 12 ReplyPostHostIndex system interfaces address are saved in the array replyPostRegisterIndex[].
>>> 3. Update the ReplyPostHostIndex value of corresponding reply post free queue in the (its msix_index/8)th entry of replyPostRegisterIndex[] array after processing the reply post descriptor.
>>>
>>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>>> ---
>>>  drivers/scsi/mpt3sas/mpt3sas_base.c | 70 +++++++++++++++++++++++++++++++++----
>>>  drivers/scsi/mpt3sas/mpt3sas_base.h |  7 +++-
>>>  2 files changed, 69 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> index 14a781b..c13a365 100644
>>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>>> @@ -83,7 +83,7 @@ static int msix_disable = -1;
>>>  module_param(msix_disable, int, 0);
>>>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
>>>
>>> -static int max_msix_vectors = 8;
>>> +static int max_msix_vectors = -1;
>>>  module_param(max_msix_vectors, int, 0);
>>>  MODULE_PARM_DESC(max_msix_vectors,
>>>       " max msix vectors - (default=8)");
>>
>> When changing the default value, please also update the description reflecting
>> this change.
>>
>>> @@ -1009,8 +1009,15 @@ _base_interrupt(int irq, void *bus_id)
>>>       }
>>>
>>>       wmb();
>>> -     writel(reply_q->reply_post_host_index | (msix_index <<
>>> -         MPI2_RPHI_MSIX_INDEX_SHIFT), &ioc->chip->ReplyPostHostIndex);
>>> +     if (ioc->msix96_vector) {
>>> +             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);
>>> +     }
>>>       atomic_dec(&reply_q->busy);
>>>       return IRQ_HANDLED;
>>>  }
>>> @@ -1560,8 +1567,6 @@ _base_check_enable_msix(struct MPT3SAS_ADAPTER *ioc)
>>>
>>>       pci_read_config_word(ioc->pdev, base + 2, &message_control);
>>>       ioc->msix_vector_count = (message_control & 0x3FF) + 1;
>>> -     if (ioc->msix_vector_count > 8)
>>> -             ioc->msix_vector_count = 8;
>>>       dinitprintk(ioc, pr_info(MPT3SAS_FMT
>>>               "msix is supported, vector_count(%d)\n",
>>>               ioc->name, ioc->msix_vector_count));
>>> @@ -1880,6 +1885,31 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>>>       if (r)
>>>               goto out_fail;
>>>
>>> +     /* Use the Combined reply queue feature only for SAS3 C0 HBAs and
>>> +      * also only when reply queue count is greater than 8
>>> +      */
>>> +     if (ioc->msix96_vector && ioc->reply_queue_count > 8) {
>>> +             /* If this is an 96 vector supported device,
>>> +             set up ReplyPostIndex addresses */
>>> +             ioc->replyPostRegisterIndex = kcalloc(12,
>>> +                     sizeof(resource_size_t *), GFP_KERNEL);
>>> +             if (!ioc->replyPostRegisterIndex) {
>>> +                     dfailprintk(ioc, printk(MPT3SAS_FMT
>>> +                     "allocation for reply Post Register Index failed!!!\n",
>>> +                                                                ioc->name));
>>> +                     r = -ENOMEM;
>>> +                     goto out_fail;
>>> +             }
>>> +
>>> +             for (i = 0; i < 12; i++) {
>>> +                     ioc->replyPostRegisterIndex[i] = (resource_size_t *)
>>> +                             ((u8 *)&ioc->chip->Doorbell +
>>> +                             MPI25_SUP_REPLY_POST_HOST_INDEX_OFFSET +
>>> +                             (i * 0x10));
>>> +             }
>>> +     } else
>>> +             ioc->msix96_vector = 0;
>>> +
>>>       list_for_each_entry(reply_q, &ioc->reply_queue_list, list)
>>>               pr_info(MPT3SAS_FMT "%s: IRQ %d\n",
>>>                   reply_q->name,  ((ioc->msix_enable) ? "PCI-MSI-X enabled" :
>>> @@ -1901,6 +1931,8 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>>>       pci_release_selected_regions(ioc->pdev, ioc->bars);
>>>       pci_disable_pcie_error_reporting(pdev);
>>>       pci_disable_device(pdev);
>>> +     if (ioc->msix96_vector)
>>> +             kfree(ioc->replyPostRegisterIndex);
>>>       return r;
>>>  }
>>>
>>> @@ -4522,8 +4554,16 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>>>
>>>       /* initialize reply post host index */
>>>       list_for_each_entry(reply_q, &ioc->reply_queue_list, list) {
>>> -             writel(reply_q->msix_index << MPI2_RPHI_MSIX_INDEX_SHIFT,
>>> -                 &ioc->chip->ReplyPostHostIndex);
>>> +             if (ioc->msix96_vector) {
>>> +                     writel((reply_q->msix_index & 7)<<
>>> +                        MPI2_RPHI_MSIX_INDEX_SHIFT,
>>> +                        ioc->replyPostRegisterIndex[reply_q->msix_index/8]);
>>> +             } else {
>>> +                     writel(reply_q->msix_index <<
>>> +                             MPI2_RPHI_MSIX_INDEX_SHIFT,
>>> +                                     &ioc->chip->ReplyPostHostIndex);
>>> +             }
>>> +
>>>               if (!_base_is_controller_msix_enabled(ioc))
>>>                       goto skip_init_reply_post_host_index;
>>>       }
>>> @@ -4577,6 +4617,9 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>>>       _base_free_irq(ioc);
>>>       _base_disable_msix(ioc);
>>>
>>> +     if (ioc->msix96_vector)
>>> +             kfree(ioc->replyPostRegisterIndex);
>>> +
>>>       if (ioc->chip_phys && ioc->chip)
>>>               iounmap(ioc->chip);
>>>       ioc->chip_phys = 0;
>>> @@ -4600,6 +4643,7 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>>>  {
>>>       int r, i;
>>>       int cpu_id, last_cpu_id = 0;
>>> +     u8 revision;
>>>
>>>       dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>>>           __func__));
>>> @@ -4618,6 +4662,18 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)
>>>               r = -ENOMEM;
>>>               goto out_free_resources;
>>>       }
>>> +     /* Check whether the controller revision is C0 or above.
>>> +         C0 and above revision controllers support 96 vectors */
>>> +     revision = ioc->pdev->revision;
>>> +
>>> +     if ((ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3004 ||
>>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3008 ||
>>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_1 ||
>>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_2 ||
>>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_5 ||
>>> +          ioc->pdev->device == MPI25_MFGPAGE_DEVID_SAS3108_6) &&
>>> +          (revision >= 0x02))
>>> +             ioc->msix96_vector = 1;
>>>
>>>       ioc->rdpq_array_enable_assigned = 0;
>>>       ioc->dma_mask = 0;
>>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
>>> index afa8816..6b8d8f1 100644
>>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
>>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
>>> @@ -728,7 +728,8 @@ typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc);
>>>   *                           is assigned only ones
>>>   * @reply_queue_count: number of reply queue's
>>>   * @reply_queue_list: link list contaning the reply queue info
>>> - * @reply_post_host_index: head index in the pool where FW completes IO
>>> + * @msix96_vector: 96 MSI-X vector support
>>> + * @replyPostRegisterIndex: index of next position in Reply Desc Post Queue
>>>   * @delayed_tr_list: target reset link list
>>>   * @delayed_tr_volume_list: volume target reset link list
>>>   * @@temp_sensors_count: flag to carry the number of temperature sensors
>>> @@ -937,6 +938,10 @@ struct MPT3SAS_ADAPTER {
>>>       u8              reply_queue_count;
>>>       struct list_head reply_queue_list;
>>>
>>> +     u8              msix96_vector;
>>> +     /* reply post register index */
>>> +     resource_size_t **replyPostRegisterIndex;
>>> +
>>
>> I know there are many uses of mixed-case varibles in this driver and changing
>> them when they're already in makes no sense, but maybe you could consider
>> getting rid of them in your mpt2sas/mpt3sas merge, as it is not really a
>> commonly seen pattern in the linux kernel.
>>
>>>       struct list_head delayed_tr_list;
>>>       struct list_head delayed_tr_volume_list;
>>>       u8              temp_sensors_count;
>>> --
>>> 2.0.2
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>> --
>> Johannes Thumshirn                                       Storage
>> jthumshirn@suse.de                             +49 911 74053 689
>> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
>> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
>> HRB 21284 (AG Nürnberg)
>
>
>
> --
>
> Regards,
> Sreekanth



-- 

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

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
  2015-06-12  9:42 ` [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources Sreekanth Reddy
  2015-06-12 11:28   ` Johannes Thumshirn
@ 2015-06-18 10:08   ` Johannes Thumshirn
  2015-06-19 15:09     ` Martin K. Petersen
  2 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-18 10:08 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:16PM +0530, Sreekanth Reddy wrote:
> Removed the redundancy code while freeing the controller resources.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 57 +++++++++++++++++++++----------------
>  1 file changed, 32 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index ce57320..32b86bf 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -1798,6 +1798,36 @@ _base_enable_msix(struct MPT3SAS_ADAPTER *ioc)
>  }
>  
>  /**
> + * mpt3sas_base_unmap_resources - free controller resources
> + * @ioc: per adapter object
> + */
> +void
> +mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER *ioc)
> +{
> +	struct pci_dev *pdev = ioc->pdev;
> +
> +	dexitprintk(ioc, printk(MPT3SAS_FMT "%s\n",
> +		ioc->name, __func__));
> +
> +	_base_free_irq(ioc);
> +	_base_disable_msix(ioc);
> +
> +	if (ioc->msix96_vector)
> +		kfree(ioc->replyPostRegisterIndex);
> +
> +	if (ioc->chip_phys) {
> +		iounmap(ioc->chip);
> +		ioc->chip_phys = 0;
> +	}
> +
> +	if (pci_is_enabled(pdev)) {
> +		pci_release_selected_regions(ioc->pdev, ioc->bars);
> +		pci_disable_pcie_error_reporting(pdev);
> +		pci_disable_device(pdev);
> +	}
> +}
> +
> +/**
>   * mpt3sas_base_map_resources - map in controller resources (io/irq/memap)
>   * @ioc: per adapter object
>   *
> @@ -1925,14 +1955,7 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
>  	return 0;
>  
>   out_fail:
> -	if (ioc->chip_phys)
> -		iounmap(ioc->chip);
> -	ioc->chip_phys = 0;
> -	pci_release_selected_regions(ioc->pdev, ioc->bars);
> -	pci_disable_pcie_error_reporting(pdev);
> -	pci_disable_device(pdev);
> -	if (ioc->msix96_vector)
> -		kfree(ioc->replyPostRegisterIndex);
> +	mpt3sas_base_unmap_resources(ioc);
>  	return r;
>  }
>  
> @@ -4667,8 +4690,6 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
>  void
>  mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>  {
> -	struct pci_dev *pdev = ioc->pdev;
> -
>  	dexitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
>  	    __func__));
>  
> @@ -4679,21 +4700,7 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc)
>  		ioc->shost_recovery = 0;
>  	}
>  
> -	_base_free_irq(ioc);
> -	_base_disable_msix(ioc);
> -
> -	if (ioc->msix96_vector)
> -		kfree(ioc->replyPostRegisterIndex);
> -
> -	if (ioc->chip_phys && ioc->chip)
> -		iounmap(ioc->chip);
> -	ioc->chip_phys = 0;
> -
> -	if (pci_is_enabled(pdev)) {
> -		pci_release_selected_regions(ioc->pdev, ioc->bars);
> -		pci_disable_pcie_error_reporting(pdev);
> -		pci_disable_device(pdev);
> -	}
> +	mpt3sas_base_unmap_resources(ioc);
>  	return;
>  }
>  
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
  2015-06-12  9:42 ` [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA Sreekanth Reddy
@ 2015-06-18 10:09     ` Johannes Thumshirn
  2015-06-18 10:09     ` Johannes Thumshirn
  2015-06-19 20:30     ` Martin K. Petersen
  2 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-18 10:09 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:22PM +0530, Sreekanth Reddy wrote:
> Added the following Dell branding to the mpt3sas driver.
> 
> "VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
> 0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
>  2 files changed, 47 insertions(+)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 6739c0a..db362cb 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc)
>  
>  
>  /**
> + * _base_display_dell_branding - Display branding string
> + * @ioc: per adapter object
> + *
> + * Return nothing.
> + */
> +static void
> +_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
> +{
> +	if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL)
> +		return;
> +
> +	switch (ioc->pdev->device) {
> +	case MPI25_MFGPAGE_DEVID_SAS3008:
> +		switch (ioc->pdev->subsystem_device) {
> +		case MPT3SAS_DELL_12G_HBA_SSDID:
> +			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +				MPT3SAS_DELL_12G_HBA_BRANDING);
> +			break;
> +		default:
> +			pr_info(MPT3SAS_FMT
> +			   "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
> +			   ioc->pdev->subsystem_device);
> +			break;
> +		}
> +		break;
> +	default:
> +		pr_info(MPT3SAS_FMT
> +			"Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
> +			ioc->pdev->subsystem_device);
> +		break;
> +	}
> +}
> +
> +
> +/**
>   * _base_display_ioc_capabilities - Disply IOC's capabilities.
>   * @ioc: per adapter object
>   *
> @@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
>  	    bios_version & 0x000000FF);
>  
>  	_base_display_intel_branding(ioc);
> +	_base_display_dell_branding(ioc);
>  
>  	pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
>  
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index 2318ef8..c4780c7 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -152,6 +152,17 @@
>  #define MPT3SAS_INTEL_RS3UC080_SSDID    0x3524
>  
>  /*
> + * Dell HBA branding
> + */
> +#define MPT3SAS_DELL_12G_HBA_BRANDING       \
> +	"Dell 12Gbps HBA"
> +
> +/*
> + * Dell HBA SSDIDs
> + */
> +#define MPT3SAS_DELL_12G_HBA_SSDID	0x1F46
> +
> +/*
>   * status bits for ioc->diag_buffer_status
>   */
>  #define MPT3_DIAG_BUFFER_IS_REGISTERED	(0x01)
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
@ 2015-06-18 10:09     ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-18 10:09 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:22PM +0530, Sreekanth Reddy wrote:
> Added the following Dell branding to the mpt3sas driver.
> 
> "VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
> 0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++
>  2 files changed, 47 insertions(+)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 6739c0a..db362cb 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc)
>  
>  
>  /**
> + * _base_display_dell_branding - Display branding string
> + * @ioc: per adapter object
> + *
> + * Return nothing.
> + */
> +static void
> +_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc)
> +{
> +	if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL)
> +		return;
> +
> +	switch (ioc->pdev->device) {
> +	case MPI25_MFGPAGE_DEVID_SAS3008:
> +		switch (ioc->pdev->subsystem_device) {
> +		case MPT3SAS_DELL_12G_HBA_SSDID:
> +			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +				MPT3SAS_DELL_12G_HBA_BRANDING);
> +			break;
> +		default:
> +			pr_info(MPT3SAS_FMT
> +			   "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
> +			   ioc->pdev->subsystem_device);
> +			break;
> +		}
> +		break;
> +	default:
> +		pr_info(MPT3SAS_FMT
> +			"Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name,
> +			ioc->pdev->subsystem_device);
> +		break;
> +	}
> +}
> +
> +
> +/**
>   * _base_display_ioc_capabilities - Disply IOC's capabilities.
>   * @ioc: per adapter object
>   *
> @@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc)
>  	    bios_version & 0x000000FF);
>  
>  	_base_display_intel_branding(ioc);
> +	_base_display_dell_branding(ioc);
>  
>  	pr_info(MPT3SAS_FMT "Protocol=(", ioc->name);
>  
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index 2318ef8..c4780c7 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -152,6 +152,17 @@
>  #define MPT3SAS_INTEL_RS3UC080_SSDID    0x3524
>  
>  /*
> + * Dell HBA branding
> + */
> +#define MPT3SAS_DELL_12G_HBA_BRANDING       \
> +	"Dell 12Gbps HBA"
> +
> +/*
> + * Dell HBA SSDIDs
> + */
> +#define MPT3SAS_DELL_12G_HBA_SSDID	0x1F46
> +
> +/*
>   * status bits for ioc->diag_buffer_status
>   */
>  #define MPT3_DIAG_BUFFER_IS_REGISTERED	(0x01)
> -- 
> 2.0.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
  2015-06-18  9:57         ` Sreekanth Reddy
@ 2015-06-19  9:14           ` Johannes Thumshirn
  -1 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-19  9:14 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Thu, Jun 18, 2015 at 03:27:26PM +0530, Sreekanth Reddy wrote:
> Hi,
> 
> Any other review comments on this patch. please let us known if any
> changes are required.
> 
> Thanks,
> Sreekanth
> 

Have you sent a follow up on this I may have missed?

> On Fri, Jun 12, 2015 at 4:46 PM, Sreekanth Reddy
> <sreekanth.reddy@avagotech.com> wrote:
> > Thanks Johannes, we will take care of this point in our current
> > on-development mpt2sas/mpt3sas merging activity.
> >>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c

[...]

> >>> index 14a781b..c13a365 100644
> >>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> >>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> >>> @@ -83,7 +83,7 @@ static int msix_disable = -1;
> >>>  module_param(msix_disable, int, 0);
> >>>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
> >>>
> >>> -static int max_msix_vectors = 8;
> >>> +static int max_msix_vectors = -1;
> >>>  module_param(max_msix_vectors, int, 0);
> >>>  MODULE_PARM_DESC(max_msix_vectors,
> >>>       " max msix vectors - (default=8)");
                                 ^^^^^^^^^^^
> >>
> >> When changing the default value, please also update the description reflecting
> >> this change.
> >>

Thanks

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
@ 2015-06-19  9:14           ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-19  9:14 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Thu, Jun 18, 2015 at 03:27:26PM +0530, Sreekanth Reddy wrote:
> Hi,
> 
> Any other review comments on this patch. please let us known if any
> changes are required.
> 
> Thanks,
> Sreekanth
> 

Have you sent a follow up on this I may have missed?

> On Fri, Jun 12, 2015 at 4:46 PM, Sreekanth Reddy
> <sreekanth.reddy@avagotech.com> wrote:
> > Thanks Johannes, we will take care of this point in our current
> > on-development mpt2sas/mpt3sas merging activity.
> >>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c

[...]

> >>> index 14a781b..c13a365 100644
> >>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> >>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> >>> @@ -83,7 +83,7 @@ static int msix_disable = -1;
> >>>  module_param(msix_disable, int, 0);
> >>>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
> >>>
> >>> -static int max_msix_vectors = 8;
> >>> +static int max_msix_vectors = -1;
> >>>  module_param(max_msix_vectors, int, 0);
> >>>  MODULE_PARM_DESC(max_msix_vectors,
> >>>       " max msix vectors - (default=8)");
                                 ^^^^^^^^^^^
> >>
> >> When changing the default value, please also update the description reflecting
> >> this change.
> >>

Thanks

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives
  2015-06-12  9:42 ` [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives Sreekanth Reddy
@ 2015-06-19  9:19     ` Johannes Thumshirn
  2015-06-19  9:19     ` Johannes Thumshirn
  1 sibling, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-19  9:19 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:18PM +0530, Sreekanth Reddy wrote:
> This Patch will provide more details of the devices such as slot number, enclosure logical id, enclosure level & connector name in the following scenarios,
> 
> - When end device is added in the topology,
> - When the end device is removed from the setup,
> - When the SCSI mid layer issues TASK ABORT/ DEVICE RESET/ TARGET RESET during error handling,
> - When any command to the device fails with Sense key Hardware error or Medium error or Unit Attention,
> - When firmware returns device error or device not ready status for the end device,
> - When a Predicted fault is detected on an end device.
> 
> This information can be used by the user to identify the location of the desired drive in the topology.
> 
> Driver will get these information by reading the sas device page0.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.h  |   2 +
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 238 +++++++++++++++++++++++++++++------
>  2 files changed, 201 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index b79ad4f..293ad23 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -317,6 +317,8 @@ struct _sas_device {
>  	u8	fast_path;
>  	u8	pfa_led_on;
>  	u8	pend_sas_rphy_add;
> +	u8   enclosure_level;
> +	u8   connector_name[4];

Minor nit of different indent here, don't know if it is worth re-sending?

Other than that:

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives
@ 2015-06-19  9:19     ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-19  9:19 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

On Fri, Jun 12, 2015 at 03:12:18PM +0530, Sreekanth Reddy wrote:
> This Patch will provide more details of the devices such as slot number, enclosure logical id, enclosure level & connector name in the following scenarios,
> 
> - When end device is added in the topology,
> - When the end device is removed from the setup,
> - When the SCSI mid layer issues TASK ABORT/ DEVICE RESET/ TARGET RESET during error handling,
> - When any command to the device fails with Sense key Hardware error or Medium error or Unit Attention,
> - When firmware returns device error or device not ready status for the end device,
> - When a Predicted fault is detected on an end device.
> 
> This information can be used by the user to identify the location of the desired drive in the topology.
> 
> Driver will get these information by reading the sas device page0.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.h  |   2 +
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 238 +++++++++++++++++++++++++++++------
>  2 files changed, 201 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index b79ad4f..293ad23 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -317,6 +317,8 @@ struct _sas_device {
>  	u8	fast_path;
>  	u8	pfa_led_on;
>  	u8	pend_sas_rphy_add;
> +	u8   enclosure_level;
> +	u8   connector_name[4];

Minor nit of different indent here, don't know if it is worth re-sending?

Other than that:

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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
  2015-06-19  9:14           ` Johannes Thumshirn
@ 2015-06-19  9:21             ` Sreekanth Reddy
  -1 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-19  9:21 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Fri, Jun 19, 2015 at 2:44 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Thu, Jun 18, 2015 at 03:27:26PM +0530, Sreekanth Reddy wrote:
>> Hi,
>>
>> Any other review comments on this patch. please let us known if any
>> changes are required.
>>
>> Thanks,
>> Sreekanth
>>
>
> Have you sent a follow up on this I may have missed?
>
>> On Fri, Jun 12, 2015 at 4:46 PM, Sreekanth Reddy
>> <sreekanth.reddy@avagotech.com> wrote:
>> > Thanks Johannes, we will take care of this point in our current
>> > on-development mpt2sas/mpt3sas merging activity.
>> >>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>
> [...]
>
>> >>> index 14a781b..c13a365 100644
>> >>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>> >>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> >>> @@ -83,7 +83,7 @@ static int msix_disable = -1;
>> >>>  module_param(msix_disable, int, 0);
>> >>>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
>> >>>
>> >>> -static int max_msix_vectors = 8;
>> >>> +static int max_msix_vectors = -1;
>> >>>  module_param(max_msix_vectors, int, 0);
>> >>>  MODULE_PARM_DESC(max_msix_vectors,
>> >>>       " max msix vectors - (default=8)");
>                                  ^^^^^^^^^^^
>> >>
>> >> When changing the default value, please also update the description reflecting
>> >> this change.

Johannes, I didn't notice this previously, I will post next version of
this patch by updating the module parameter description

Thanks,
Sreekanth
>> >>
>
> Thanks
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

Regards,
Sreekanth

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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
@ 2015-06-19  9:21             ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-19  9:21 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Fri, Jun 19, 2015 at 2:44 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Thu, Jun 18, 2015 at 03:27:26PM +0530, Sreekanth Reddy wrote:
>> Hi,
>>
>> Any other review comments on this patch. please let us known if any
>> changes are required.
>>
>> Thanks,
>> Sreekanth
>>
>
> Have you sent a follow up on this I may have missed?
>
>> On Fri, Jun 12, 2015 at 4:46 PM, Sreekanth Reddy
>> <sreekanth.reddy@avagotech.com> wrote:
>> > Thanks Johannes, we will take care of this point in our current
>> > on-development mpt2sas/mpt3sas merging activity.
>> >>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>
> [...]
>
>> >>> index 14a781b..c13a365 100644
>> >>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>> >>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> >>> @@ -83,7 +83,7 @@ static int msix_disable = -1;
>> >>>  module_param(msix_disable, int, 0);
>> >>>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
>> >>>
>> >>> -static int max_msix_vectors = 8;
>> >>> +static int max_msix_vectors = -1;
>> >>>  module_param(max_msix_vectors, int, 0);
>> >>>  MODULE_PARM_DESC(max_msix_vectors,
>> >>>       " max msix vectors - (default=8)");
>                                  ^^^^^^^^^^^
>> >>
>> >> When changing the default value, please also update the description reflecting
>> >> this change.

Johannes, I didn't notice this previously, I will post next version of
this patch by updating the module parameter description

Thanks,
Sreekanth
>> >>
>
> Thanks
>
> --
> Johannes Thumshirn                                       Storage
> jthumshirn@suse.de                             +49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

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

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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
  2015-06-19  9:21             ` Sreekanth Reddy
@ 2015-06-19  9:55               ` Johannes Thumshirn
  -1 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-19  9:55 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Fri, Jun 19, 2015 at 02:51:00PM +0530, Sreekanth Reddy wrote:
> On Fri, Jun 19, 2015 at 2:44 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> > On Thu, Jun 18, 2015 at 03:27:26PM +0530, Sreekanth Reddy wrote:
> >> Hi,
> >>
> >> Any other review comments on this patch. please let us known if any
> >> changes are required.
> >>
> >> Thanks,
> >> Sreekanth
> >>
> >
> > Have you sent a follow up on this I may have missed?
> >
> >> On Fri, Jun 12, 2015 at 4:46 PM, Sreekanth Reddy
> >> <sreekanth.reddy@avagotech.com> wrote:
> >> > Thanks Johannes, we will take care of this point in our current
> >> > on-development mpt2sas/mpt3sas merging activity.
> >> >>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> >
> > [...]
> >
> >> >>> index 14a781b..c13a365 100644
> >> >>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> >> >>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> >> >>> @@ -83,7 +83,7 @@ static int msix_disable = -1;
> >> >>>  module_param(msix_disable, int, 0);
> >> >>>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
> >> >>>
> >> >>> -static int max_msix_vectors = 8;
> >> >>> +static int max_msix_vectors = -1;
> >> >>>  module_param(max_msix_vectors, int, 0);
> >> >>>  MODULE_PARM_DESC(max_msix_vectors,
> >> >>>       " max msix vectors - (default=8)");
> >                                  ^^^^^^^^^^^
> >> >>
> >> >> When changing the default value, please also update the description reflecting
> >> >> this change.
> 
> Johannes, I didn't notice this previously, I will post next version of
> this patch by updating the module parameter description

No problem :-)

> 
> Thanks,
> Sreekanth
> >> >>
> >
> > Thanks
> >
> > --
> > Johannes Thumshirn                                       Storage
> > jthumshirn@suse.de                             +49 911 74053 689
> > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> > HRB 21284 (AG Nürnberg)
> 
> 
> 
> -- 
> 
> Regards,
> Sreekanth

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
@ 2015-06-19  9:55               ` Johannes Thumshirn
  0 siblings, 0 replies; 123+ messages in thread
From: Johannes Thumshirn @ 2015-06-19  9:55 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Fri, Jun 19, 2015 at 02:51:00PM +0530, Sreekanth Reddy wrote:
> On Fri, Jun 19, 2015 at 2:44 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> > On Thu, Jun 18, 2015 at 03:27:26PM +0530, Sreekanth Reddy wrote:
> >> Hi,
> >>
> >> Any other review comments on this patch. please let us known if any
> >> changes are required.
> >>
> >> Thanks,
> >> Sreekanth
> >>
> >
> > Have you sent a follow up on this I may have missed?
> >
> >> On Fri, Jun 12, 2015 at 4:46 PM, Sreekanth Reddy
> >> <sreekanth.reddy@avagotech.com> wrote:
> >> > Thanks Johannes, we will take care of this point in our current
> >> > on-development mpt2sas/mpt3sas merging activity.
> >> >>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> >
> > [...]
> >
> >> >>> index 14a781b..c13a365 100644
> >> >>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> >> >>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> >> >>> @@ -83,7 +83,7 @@ static int msix_disable = -1;
> >> >>>  module_param(msix_disable, int, 0);
> >> >>>  MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
> >> >>>
> >> >>> -static int max_msix_vectors = 8;
> >> >>> +static int max_msix_vectors = -1;
> >> >>>  module_param(max_msix_vectors, int, 0);
> >> >>>  MODULE_PARM_DESC(max_msix_vectors,
> >> >>>       " max msix vectors - (default=8)");
> >                                  ^^^^^^^^^^^
> >> >>
> >> >> When changing the default value, please also update the description reflecting
> >> >> this change.
> 
> Johannes, I didn't notice this previously, I will post next version of
> this patch by updating the module parameter description

No problem :-)

> 
> Thanks,
> Sreekanth
> >> >>
> >
> > Thanks
> >
> > --
> > Johannes Thumshirn                                       Storage
> > jthumshirn@suse.de                             +49 911 74053 689
> > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> > HRB 21284 (AG Nürnberg)
> 
> 
> 
> -- 
> 
> Regards,
> Sreekanth

-- 
Johannes Thumshirn                                       Storage
jthumshirn@suse.de                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives
  2015-06-19  9:19     ` Johannes Thumshirn
@ 2015-06-19 10:53       ` Sreekanth Reddy
  -1 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-19 10:53 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Fri, Jun 19, 2015 at 2:49 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 03:12:18PM +0530, Sreekanth Reddy wrote:
>> This Patch will provide more details of the devices such as slot number, enclosure logical id, enclosure level & connector name in the following scenarios,
>>
>> - When end device is added in the topology,
>> - When the end device is removed from the setup,
>> - When the SCSI mid layer issues TASK ABORT/ DEVICE RESET/ TARGET RESET during error handling,
>> - When any command to the device fails with Sense key Hardware error or Medium error or Unit Attention,
>> - When firmware returns device error or device not ready status for the end device,
>> - When a Predicted fault is detected on an end device.
>>
>> This information can be used by the user to identify the location of the desired drive in the topology.
>>
>> Driver will get these information by reading the sas device page0.
>>
>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_base.h  |   2 +
>>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 238 +++++++++++++++++++++++++++++------
>>  2 files changed, 201 insertions(+), 39 deletions(-)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> index b79ad4f..293ad23 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> @@ -317,6 +317,8 @@ struct _sas_device {
>>       u8      fast_path;
>>       u8      pfa_led_on;
>>       u8      pend_sas_rphy_add;
>> +     u8   enclosure_level;
>> +     u8   connector_name[4];
>
> Minor nit of different indent here, don't know if it is worth re-sending?

Not an Issue. I will post the next version of this patch by adjusting
this indent.

Thanks,
Sreekanth
>
> Other than that:
>
> 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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

Regards,
Sreekanth
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives
@ 2015-06-19 10:53       ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-19 10:53 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: jejb, Christoph Hellwig, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

On Fri, Jun 19, 2015 at 2:49 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Fri, Jun 12, 2015 at 03:12:18PM +0530, Sreekanth Reddy wrote:
>> This Patch will provide more details of the devices such as slot number, enclosure logical id, enclosure level & connector name in the following scenarios,
>>
>> - When end device is added in the topology,
>> - When the end device is removed from the setup,
>> - When the SCSI mid layer issues TASK ABORT/ DEVICE RESET/ TARGET RESET during error handling,
>> - When any command to the device fails with Sense key Hardware error or Medium error or Unit Attention,
>> - When firmware returns device error or device not ready status for the end device,
>> - When a Predicted fault is detected on an end device.
>>
>> This information can be used by the user to identify the location of the desired drive in the topology.
>>
>> Driver will get these information by reading the sas device page0.
>>
>> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_base.h  |   2 +
>>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 238 +++++++++++++++++++++++++++++------
>>  2 files changed, 201 insertions(+), 39 deletions(-)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> index b79ad4f..293ad23 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
>> @@ -317,6 +317,8 @@ struct _sas_device {
>>       u8      fast_path;
>>       u8      pfa_led_on;
>>       u8      pend_sas_rphy_add;
>> +     u8   enclosure_level;
>> +     u8   connector_name[4];
>
> Minor nit of different indent here, don't know if it is worth re-sending?

Not an Issue. I will post the next version of this patch by adjusting
this indent.

Thanks,
Sreekanth
>
> Other than that:
>
> 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: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
> HRB 21284 (AG Nürnberg)



-- 

Regards,
Sreekanth

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

* Re: [PATCH 03/20] [SCSI] mpt3sas: Don't block the drive when drive addition under the control of SML
  2015-06-12  9:42 ` [PATCH 03/20] [SCSI] mpt3sas: Don't block the drive when drive addition under the control of SML Sreekanth Reddy
@ 2015-06-19 15:05     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 15:05 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel


> During hot-plugging of a disk(having a flaky link), the disk addition
> stops and any further disk addition or removal doesn't happen on that
> controller.

> This is because, when driver receives DELAY_NOT_RESPONDING event for
> a disk while it is undergoing addition at the SCSI Transport layer,
> the driver would block the I/O to that disk resulting in a
> deadlock. i.e the disk addition work couldn't be completed at the
> SCSI Transport Layer as it can't send any I/Os (such as Inquiry,
> Report LUNs etc) to the disk as I/Os are blocked to this drive. Also
> any subsequent device removal (TARGET_NOT_RESPONDING) or link
> update(RC_PHY_CHANGED) event couldn't be processed as they are in the
> queue to get processed after disk addition event.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 03/20] [SCSI] mpt3sas: Don't block the drive when drive addition under the control of SML
@ 2015-06-19 15:05     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 15:05 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel


> During hot-plugging of a disk(having a flaky link), the disk addition
> stops and any further disk addition or removal doesn't happen on that
> controller.

> This is because, when driver receives DELAY_NOT_RESPONDING event for
> a disk while it is undergoing addition at the SCSI Transport layer,
> the driver would block the I/O to that disk resulting in a
> deadlock. i.e the disk addition work couldn't be completed at the
> SCSI Transport Layer as it can't send any I/Os (such as Inquiry,
> Report LUNs etc) to the disk as I/Os are blocked to this drive. Also
> any subsequent device removal (TARGET_NOT_RESPONDING) or link
> update(RC_PHY_CHANGED) event couldn't be processed as they are in the
> queue to get processed after disk addition event.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
  2015-06-12  9:42 ` [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources Sreekanth Reddy
@ 2015-06-19 15:09     ` Martin K. Petersen
  2015-06-18 10:08   ` Johannes Thumshirn
  2015-06-19 15:09     ` Martin K. Petersen
  2 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 15:09 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Removed the redundancy code while freeing the controller resources.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources.
@ 2015-06-19 15:09     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 15:09 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Removed the redundancy code while freeing the controller resources.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 05/20] [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.
  2015-06-12  9:42 ` [PATCH 05/20] [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications Sreekanth Reddy
@ 2015-06-19 15:10     ` Martin K. Petersen
  2015-06-19 15:10     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 15:10 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Update MPI 2.5 Release: MPI 2.5 Rev I (2.5.4) specification and
> 2.00.33 header files Below is the change set from the MPI
> specification for I Rev

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 05/20] [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.
@ 2015-06-19 15:10     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 15:10 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Update MPI 2.5 Release: MPI 2.5 Rev I (2.5.4) specification and
> 2.00.33 header files Below is the change set from the MPI
> specification for I Rev

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 07/20] [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00
  2015-06-12  9:42 ` [PATCH 07/20] [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00 Sreekanth Reddy
@ 2015-06-19 20:22     ` Martin K. Petersen
  2015-06-19 20:22     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:22 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Bump mpt3sas Driver version to v5.100.00.00

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 07/20] [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00
@ 2015-06-19 20:22     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:22 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Bump mpt3sas Driver version to v5.100.00.00

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5
  2015-06-12  9:42 ` [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5 Sreekanth Reddy
@ 2015-06-19 20:24     ` Martin K. Petersen
  2015-06-19 20:24     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:24 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Update MPI2 strings to MPI2.5.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5
@ 2015-06-19 20:24     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:24 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Update MPI2 strings to MPI2.5.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
  2015-06-12  9:42 ` [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files Sreekanth Reddy
@ 2015-06-19 20:27     ` Martin K. Petersen
  2015-06-19 20:27     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:27 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> @@ -1334,9 +1336,17 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
>  	*PTR_MPI2_CONFIG_PAGE_BIOS_1,
>  	Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
>  
> -#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x05)
> +#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x06)
>  
>  /*values for BIOS Page 1 BiosOptions field */
> +#define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS		    (0x00000400)

Looks like you may have some bad whitespace here ^^^.

> +
> +#define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD	(0x00000300)
> +#define MPI2_BIOSPAGE1_OPTIONS_USE_BIT0_REGISTRATION_UEFI_BSD	(0x00000000)
> +#define MPI2_BIOSPAGE1_OPTIONS_FULL_REGISTRATION_UEFI_BSD	(0x00000100)
> +#define MPI2_BIOSPAGE1_OPTIONS_ADAPTER_REGISTRATION_UEFI_BSD	(0x00000200)
> +#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_REGISTRATION_UEFI_BSD	(0x00000300)

Otherwise OK.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
@ 2015-06-19 20:27     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:27 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> @@ -1334,9 +1336,17 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
>  	*PTR_MPI2_CONFIG_PAGE_BIOS_1,
>  	Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
>  
> -#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x05)
> +#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x06)
>  
>  /*values for BIOS Page 1 BiosOptions field */
> +#define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS		    (0x00000400)

Looks like you may have some bad whitespace here ^^^.

> +
> +#define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD	(0x00000300)
> +#define MPI2_BIOSPAGE1_OPTIONS_USE_BIT0_REGISTRATION_UEFI_BSD	(0x00000000)
> +#define MPI2_BIOSPAGE1_OPTIONS_FULL_REGISTRATION_UEFI_BSD	(0x00000100)
> +#define MPI2_BIOSPAGE1_OPTIONS_ADAPTER_REGISTRATION_UEFI_BSD	(0x00000200)
> +#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_REGISTRATION_UEFI_BSD	(0x00000300)

Otherwise OK.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
  2015-06-12  9:42 ` [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA Sreekanth Reddy
@ 2015-06-19 20:30     ` Martin K. Petersen
  2015-06-18 10:09     ` Johannes Thumshirn
  2015-06-19 20:30     ` Martin K. Petersen
  2 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:30 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Added the following Dell branding to the mpt3sas driver.  "VendorID"
> "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Dell Branding
> String 0x1000 0x0097 0x1028 0x1F46 DELL 12Gbps HBA

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA
@ 2015-06-19 20:30     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:30 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Added the following Dell branding to the mpt3sas driver.  "VendorID"
> "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Dell Branding
> String 0x1000 0x0097 0x1028 0x1F46 DELL 12Gbps HBA

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA
  2015-06-12  9:42 ` [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA Sreekanth Reddy
@ 2015-06-19 20:34     ` Martin K. Petersen
  2015-06-19 20:34     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:34 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Add the following OEM's branding to the mpt3sas driver.  "VendorID"
> "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Cisco Branding
> String 0x1000 0x97 SVID = 0x1137 0x014C Cisco 9300-8E 12G SAS HBA

I'm not so keen on all this branding stuff. It is purely cosmetic and
doesn't change driver behavior.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA
@ 2015-06-19 20:34     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:34 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Add the following OEM's branding to the mpt3sas driver.  "VendorID"
> "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Cisco Branding
> String 0x1000 0x97 SVID = 0x1137 0x014C Cisco 9300-8E 12G SAS HBA

I'm not so keen on all this branding stuff. It is purely cosmetic and
doesn't change driver behavior.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00
  2015-06-12  9:42 ` [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00 Sreekanth Reddy
@ 2015-06-19 20:35     ` Martin K. Petersen
  2015-06-19 20:35     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:35 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Bump mpt3sas driver version to v6.100.00.00.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00
@ 2015-06-19 20:35     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:35 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Bump mpt3sas driver version to v6.100.00.00.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
  2015-06-12  9:42 ` [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications Sreekanth Reddy
@ 2015-06-19 20:36     ` Martin K. Petersen
  2015-06-19 20:36     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:36 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Below are the new changes to MPI 2.5 Rev K(2.5.6) specification and
> 2.00.35 header files 1) Added a minimum size requirement for target
> mode command buffers.  2) Added MinMSIxIndex and MaxMSIxIndex fields
> to CommandBufferPostBase Request.  3) For BIOS Page 1, added
> SSUTimeout field, and added Product Name String Format bits to the
> BiosOptions field

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
@ 2015-06-19 20:36     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:36 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Below are the new changes to MPI 2.5 Rev K(2.5.6) specification and
> 2.00.35 header files 1) Added a minimum size requirement for target
> mode command buffers.  2) Added MinMSIxIndex and MaxMSIxIndex fields
> to CommandBufferPostBase Request.  3) For BIOS Page 1, added
> SSUTimeout field, and added Product Name String Format bits to the
> BiosOptions field

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 15/20] [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command
  2015-06-12  9:42 ` [PATCH 15/20] [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command Sreekanth Reddy
@ 2015-06-19 20:40     ` Martin K. Petersen
  2015-06-19 20:40     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:40 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> scsi_dma_map API will return a negative value (i.e. -ENOMEM) if DMA
> mapping of sg lists fails and zero if the sg list in the SCSI cmd is
> NULL. But drivers doesn't handled sg list DMA mapping failure case
> properly.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 15/20] [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command
@ 2015-06-19 20:40     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:40 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> scsi_dma_map API will return a negative value (i.e. -ENOMEM) if DMA
> mapping of sg lists fails and zero if the sg list in the SCSI cmd is
> NULL. But drivers doesn't handled sg list DMA mapping failure case
> properly.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding
  2015-06-12  9:42 ` [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding Sreekanth Reddy
@ 2015-06-19 20:44     ` Martin K. Petersen
  2015-06-19 20:44     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:44 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Added support for below customer specific brandings "VendorID"
> "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Cisco Branding
> String 0x1000 0x97 0x1137 0x154 Cisco 9300-8i 12Gbps SAS HBA 0x1000
> 0x97 0x1137 0x155 Cisco 12G Modular SAS Pass through Controller 0x1000
> 0x97 0x1137 0x156 UCS C3X60 12G SAS Pass through Controller

Same comment about not actually changing driver behavior.

These changes belong in pci.ids, not in a driver.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding
@ 2015-06-19 20:44     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:44 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Added support for below customer specific brandings "VendorID"
> "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Cisco Branding
> String 0x1000 0x97 0x1137 0x154 Cisco 9300-8i 12Gbps SAS HBA 0x1000
> 0x97 0x1137 0x155 Cisco 12G Modular SAS Pass through Controller 0x1000
> 0x97 0x1137 0x156 UCS C3X60 12G SAS Pass through Controller

Same comment about not actually changing driver behavior.

These changes belong in pci.ids, not in a driver.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 18/20] [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API
  2015-06-12  9:42 ` [PATCH 18/20] [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API Sreekanth Reddy
@ 2015-06-19 20:47     ` Martin K. Petersen
  2015-06-19 20:47     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:47 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Added dma_mapping_error() API after mapping an address with
> dma_map_single() API.  Otherwise when CONFIG_DMA_API_DEBUG is enabled
> in the kernel, then it complains about mpt3sas driver not calling
> dma_mapping_error after mapping an address with dma_map_single

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 18/20] [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API
@ 2015-06-19 20:47     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 20:47 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Added dma_mapping_error() API after mapping an address with
> dma_map_single() API.  Otherwise when CONFIG_DMA_API_DEBUG is enabled
> in the kernel, then it complains about mpt3sas driver not calling
> dma_mapping_error after mapping an address with dma_map_single

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 20/20] [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00
  2015-06-12  9:42 ` [PATCH 20/20] [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00 Sreekanth Reddy
@ 2015-06-19 21:01     ` Martin K. Petersen
  2015-06-19 21:01     ` Martin K. Petersen
  1 sibling, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 21:01 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Bump mpt3sas driver version to 9.100.00.00

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 20/20] [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00
@ 2015-06-19 21:01     ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-19 21:01 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, linux-kernel

>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Bump mpt3sas driver version to 9.100.00.00

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
  2015-06-19 20:27     ` Martin K. Petersen
@ 2015-06-22 12:18       ` Sreekanth Reddy
  -1 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-22 12:18 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: jejb, Christoph Hellwig, linux-scsi, James E.J. Bottomley,
	Sathya Prakash, linux-kernel

On Sat, Jun 20, 2015 at 1:57 AM, Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:
>
>> @@ -1334,9 +1336,17 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
>>       *PTR_MPI2_CONFIG_PAGE_BIOS_1,
>>       Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
>>
>> -#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x05)
>> +#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x06)
>>
>>  /*values for BIOS Page 1 BiosOptions field */
>> +#define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS                  (0x00000400)
>
> Looks like you may have some bad whitespace here ^^^.

Accepted. will post next version of this patch by removing these extra
white spaces.

Thanks,
Sreekanth

>
>> +
>> +#define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD    (0x00000300)
>> +#define MPI2_BIOSPAGE1_OPTIONS_USE_BIT0_REGISTRATION_UEFI_BSD        (0x00000000)
>> +#define MPI2_BIOSPAGE1_OPTIONS_FULL_REGISTRATION_UEFI_BSD    (0x00000100)
>> +#define MPI2_BIOSPAGE1_OPTIONS_ADAPTER_REGISTRATION_UEFI_BSD (0x00000200)
>> +#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_REGISTRATION_UEFI_BSD (0x00000300)
>
> Otherwise OK.
>
> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
>
> --
> Martin K. Petersen      Oracle Linux Engineering



-- 

Regards,
Sreekanth
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
@ 2015-06-22 12:18       ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-22 12:18 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: jejb, Christoph Hellwig, linux-scsi, James E.J. Bottomley,
	Sathya Prakash, linux-kernel

On Sat, Jun 20, 2015 at 1:57 AM, Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:
>
>> @@ -1334,9 +1336,17 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 {
>>       *PTR_MPI2_CONFIG_PAGE_BIOS_1,
>>       Mpi2BiosPage1_t, *pMpi2BiosPage1_t;
>>
>> -#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x05)
>> +#define MPI2_BIOSPAGE1_PAGEVERSION                      (0x06)
>>
>>  /*values for BIOS Page 1 BiosOptions field */
>> +#define MPI2_BIOSPAGE1_OPTIONS_X86_DISABLE_BIOS                  (0x00000400)
>
> Looks like you may have some bad whitespace here ^^^.

Accepted. will post next version of this patch by removing these extra
white spaces.

Thanks,
Sreekanth

>
>> +
>> +#define MPI2_BIOSPAGE1_OPTIONS_MASK_REGISTRATION_UEFI_BSD    (0x00000300)
>> +#define MPI2_BIOSPAGE1_OPTIONS_USE_BIT0_REGISTRATION_UEFI_BSD        (0x00000000)
>> +#define MPI2_BIOSPAGE1_OPTIONS_FULL_REGISTRATION_UEFI_BSD    (0x00000100)
>> +#define MPI2_BIOSPAGE1_OPTIONS_ADAPTER_REGISTRATION_UEFI_BSD (0x00000200)
>> +#define MPI2_BIOSPAGE1_OPTIONS_DISABLE_REGISTRATION_UEFI_BSD (0x00000300)
>
> Otherwise OK.
>
> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
>
> --
> Martin K. Petersen      Oracle Linux Engineering



-- 

Regards,
Sreekanth
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding
  2015-06-19 20:44     ` Martin K. Petersen
@ 2015-06-22 12:26       ` Sreekanth Reddy
  -1 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-22 12:26 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: jejb, Christoph Hellwig, linux-scsi, James E.J. Bottomley,
	Sathya Prakash, linux-kernel

On Sat, Jun 20, 2015 at 2:14 AM, Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:
>
>> Added support for below customer specific brandings "VendorID"
>> "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Cisco Branding
>> String 0x1000 0x97 0x1137 0x154 Cisco 9300-8i 12Gbps SAS HBA 0x1000
>> 0x97 0x1137 0x155 Cisco 12G Modular SAS Pass through Controller 0x1000
>> 0x97 0x1137 0x156 UCS C3X60 12G SAS Pass through Controller
>
> Same comment about not actually changing driver behavior.
>
> These changes belong in pci.ids, not in a driver.

Yes Martin, I agree with you that these changes belong in pci.ids. But
Customers are asking us to print the HBA branding name while loading
the driver on their custom HBA's.

>
> --
> Martin K. Petersen      Oracle Linux Engineering



-- 

Regards,
Sreekanth
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding
@ 2015-06-22 12:26       ` Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-22 12:26 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: jejb, Christoph Hellwig, linux-scsi, James E.J. Bottomley,
	Sathya Prakash, linux-kernel

On Sat, Jun 20, 2015 at 2:14 AM, Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:
>
>> Added support for below customer specific brandings "VendorID"
>> "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Cisco Branding
>> String 0x1000 0x97 0x1137 0x154 Cisco 9300-8i 12Gbps SAS HBA 0x1000
>> 0x97 0x1137 0x155 Cisco 12G Modular SAS Pass through Controller 0x1000
>> 0x97 0x1137 0x156 UCS C3X60 12G SAS Pass through Controller
>
> Same comment about not actually changing driver behavior.
>
> These changes belong in pci.ids, not in a driver.

Yes Martin, I agree with you that these changes belong in pci.ids. But
Customers are asking us to print the HBA branding name while loading
the driver on their custom HBA's.

>
> --
> Martin K. Petersen      Oracle Linux Engineering



-- 

Regards,
Sreekanth
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding
  2015-06-22 12:26       ` Sreekanth Reddy
@ 2015-06-22 20:36         ` Martin K. Petersen
  -1 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-22 20:36 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: Martin K. Petersen, jejb, Christoph Hellwig, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

>>>>> "Sreekanth" == Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

Sreekanth> I agree with you that these changes belong in pci.ids. But
Sreekanth> Customers are asking us to print the HBA branding name while
Sreekanth> loading the driver on their custom HBA's.

Yes, and other HBA vendors have done the same (although thankfully this
practice appears to be going out of fashion).

Personally, I find SAS2308 orders of magnitude more useful and helpful
than WHIZ-BANG2010 since the former tells me exactly what chip I'm
dealing with.

Anyway. No big deal. I just think it's a bad habit to use the kernel for
marketing purposes.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding
@ 2015-06-22 20:36         ` Martin K. Petersen
  0 siblings, 0 replies; 123+ messages in thread
From: Martin K. Petersen @ 2015-06-22 20:36 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: Martin K. Petersen, jejb, Christoph Hellwig, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, linux-kernel

>>>>> "Sreekanth" == Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

Sreekanth> I agree with you that these changes belong in pci.ids. But
Sreekanth> Customers are asking us to print the HBA branding name while
Sreekanth> loading the driver on their custom HBA's.

Yes, and other HBA vendors have done the same (although thankfully this
practice appears to be going out of fashion).

Personally, I find SAS2308 orders of magnitude more useful and helpful
than WHIZ-BANG2010 since the former tells me exactly what chip I'm
dealing with.

Anyway. No big deal. I just think it's a bad habit to use the kernel for
marketing purposes.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

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

* Re: [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding
  2015-06-22 20:36         ` Martin K. Petersen
  (?)
@ 2015-06-25 13:40         ` Sreekanth Reddy
  -1 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-25 13:40 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: jejb, Christoph Hellwig, linux-scsi, James E.J. Bottomley,
	Sathya Prakash, linux-kernel

On Tue, Jun 23, 2015 at 2:06 AM, Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>
> >>>>> "Sreekanth" == Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:
>
> Sreekanth> I agree with you that these changes belong in pci.ids. But
> Sreekanth> Customers are asking us to print the HBA branding name while
> Sreekanth> loading the driver on their custom HBA's.
>
> Yes, and other HBA vendors have done the same (although thankfully this
> practice appears to be going out of fashion).
>
> Personally, I find SAS2308 orders of magnitude more useful and helpful
> than WHIZ-BANG2010 since the former tells me exactly what chip I'm
> dealing with.
>
> Anyway. No big deal. I just think it's a bad habit to use the kernel for
> marketing purposes.

Agreed. Can you please consider this patch for this time. Next time
onwards we take some actions to not encourage these types of request
from customers.

>
>
> --
> Martin K. Petersen      Oracle Linux Engineering




-- 

Regards,
Sreekanth

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

* [PATCH 00/20] mpt3sas: driver update
@ 2015-06-30  6:54 Sreekanth Reddy
  0 siblings, 0 replies; 123+ messages in thread
From: Sreekanth Reddy @ 2015-06-30  6:54 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	linux-kernel, jthumshirn, Sreekanth Reddy

This patch set contains all the features and defect fixes from Phase4 to Phase8.

Except below patch, all other patches have Reviewed-by signature from either
Martin K. Petersen, Johannes Thumshirn, Tomas Henzl and Joe Lawrence. Thanks for
reviewing these patches.
[PATCH v2 16/20] [SCSI] mpt3sas: Added support for customer specific branding

I am posting this patch set once again by promoting all the patches to v2,
so that it will be easy to pick up this patch set for next kernel release.

Thanks,
Sreekanth

Sreekanth Reddy (20):
  [SCSI] mpt3sas: Added Combined Reply Queue feature to extend
    up-to 96 MSIX vector support
  [SCSI] mpt3sas: Get IOC_FACTS information using  handshake
    protocol only after HBA card gets into READY or Operational
    state.
  [SCSI] mpt3sas: Don't block the drive when drive addition under
    the control of SML
  [SCSI] mpt3sas: Remove redundancy code while freeing the
    controller resources.
  [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.
  [SCSI] mpt3sas: Provides the physical location of sas  drives
  [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00
  [SCSI] mpt3sas: Update MPI2 strings to MPI2.5
  [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and  2.00.34
    header files
  [SCSI] mpt3sas: Add branding string support for OEM's HBA
  [SCSI] mpt3sas: Add branding string support for OEM custom HBA
  [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00
  [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
  [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status
    for log_info value 0x0x32010081
  [SCSI] mpt3sas: Return host busy error status to SML when DMA
    mapping of scatter gather list fails for a SCSI command
  [SCSI] mpt3sas: Added support for customer specific branding
  [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of
    create_singlethread_workqueue() API
  [SCSI] mpt3sas: Call dma_mapping_error() API after  mapping an
    address with dma_map_single() API
  [SCSI] mpt3sas: When device is blocked followed by unblock fails,
    unfreeze the I/Os
  [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00

 drivers/scsi/mpt3sas/mpi/mpi2.h          |   8 +-
 drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h     |  52 ++++-
 drivers/scsi/mpt3sas/mpi/mpi2_ioc.h      |   4 +-
 drivers/scsi/mpt3sas/mpi/mpi2_tool.h     |   4 +-
 drivers/scsi/mpt3sas/mpt3sas_base.c      | 310 +++++++++++++++++++++++++---
 drivers/scsi/mpt3sas/mpt3sas_base.h      |  57 ++++-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c     | 343 ++++++++++++++++++++++++++-----
 drivers/scsi/mpt3sas/mpt3sas_transport.c |  22 +-
 8 files changed, 694 insertions(+), 106 deletions(-)

-- 
2.0.2


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

* RE: [PATCH 00/20] mpt3sas: driver update
  2015-04-21 12:13     ` Christoph Hellwig
@ 2015-04-24 21:27       ` Sathya Prakash
  0 siblings, 0 replies; 123+ messages in thread
From: Sathya Prakash @ 2015-04-24 21:27 UTC (permalink / raw)
  To: Christoph Hellwig, Sreekanth Reddy
  Cc: jejb, Martin K. Petersen, linux-scsi, James E.J. Bottomley,
	Kashyap Desai, linux-kernel, Tomas Henzl

Christoph,
We had internal discussion with our engineering and management on this
topic.  We are committed to provide bug fixes ( Only bug fixes and no new
features) across both the SAS2 and SAS3 source trees.  We prefer the SAS2
and SAS3 drivers to stay separate and the reason is;  merging of the
drivers is a time consuming and error prone task and with SAS2 products at
the maintenance mode we are thinking it will be risky to do the merge for
now.

Going forward for our future products we will be providing a  merged
driver (with common source separated out and having multiple kernel
modules compiled out of single source directory for each of our products)
to avoid maintenance overhead.

So please let us know whether the current patches can be ACKED if we
provide the applicable bug fixes to SAS2 or you see any other issues?.

Thanks
Sathya

-----Original Message-----
From: Christoph Hellwig [mailto:hch@infradead.org]
Sent: Tuesday, April 21, 2015 6:14 AM
To: Sreekanth Reddy
Cc: Christoph Hellwig; jejb@kernel.org; Martin K. Petersen;
linux-scsi@vger.kernel.org; James E.J. Bottomley; Sathya Prakash; Kashyap
Desai; linux-kernel@vger.kernel.org; Tomas Henzl
Subject: Re: [PATCH 00/20] mpt3sas: driver update

On Wed, Apr 08, 2015 at 11:13:04AM +0530, Sreekanth Reddy wrote:
> Hi Chris,
>
> There are no corresponding mpt2sas driver's patches, The last phase
> for mpt2sas drivers is Phase20 and this phase driver is already exits
> in the upstream kernel. Also mpt2sas driver is completely in maintains
> mode and there won't be any new features.

But we'll still need all the bugfixes for existing users.

So a big NAK from me for any mpt3 patches that aren't urgen bug fixes
before we finally got the two drivers merged.

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

* Re: [PATCH 00/20] mpt3sas: driver update
  2015-04-08  5:43   ` Sreekanth Reddy
@ 2015-04-21 12:13     ` Christoph Hellwig
  2015-04-24 21:27       ` Sathya Prakash
  0 siblings, 1 reply; 123+ messages in thread
From: Christoph Hellwig @ 2015-04-21 12:13 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: Christoph Hellwig, jejb, Martin K. Petersen, linux-scsi,
	James E.J. Bottomley, Sathya Prakash, Kashyap Desai,
	linux-kernel, Tomas Henzl

On Wed, Apr 08, 2015 at 11:13:04AM +0530, Sreekanth Reddy wrote:
> Hi Chris,
> 
> There are no corresponding mpt2sas driver's patches, The last phase
> for mpt2sas drivers is Phase20 and this phase driver is already exits
> in the upstream kernel. Also mpt2sas driver is completely in maintains
> mode and there won't be any new features.

But we'll still need all the bugfixes for existing users.

So a big NAK from me for any mpt3 patches that aren't urgen bug fixes
before we finally got the two drivers merged.

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

* Re: [PATCH 00/20] mpt3sas: driver update
  2015-04-05 16:09 ` Christoph Hellwig
@ 2015-04-08  5:43   ` Sreekanth Reddy
  2015-04-21 12:13     ` Christoph Hellwig
  0 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-04-08  5:43 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: jejb, Martin K. Petersen, linux-scsi, James E.J. Bottomley,
	Sathya Prakash, Kashyap Desai, linux-kernel, Tomas Henzl

Hi Chris,

There are no corresponding mpt2sas driver's patches, The last phase
for mpt2sas drivers is Phase20 and this phase driver is already exits
in the upstream kernel. Also mpt2sas driver is completely in maintains
mode and there won't be any new features.

Whereas mpt3sas is at its initial baseline with a healthy road map
ahead and also we are planning to use same mpt3sas driver for next
upcoming Avago IT HBA's. So merging mpt2sas driver with mpt3sas driver
may break mpt2sas driver functionality in future, also it will be over
head of the maintainer to always check for the backward compatibility
of merged driver with the mpt2sas driver.

Regards,
Sreekanth

On Sun, Apr 5, 2015 at 9:39 PM, Christoph Hellwig <hch@infradead.org> wrote:
> This seems to be missing the corresponding mpt2 updates.  Nak to
> anything that gets these drivers further out of sync.
>
> Btw, I still need a second ACK for
> http://www.spinics.net/lists/linux-scsi/msg82027.html
> as well, so we can start getting rid of this duplication mess.

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

* Re: [PATCH 00/20] mpt3sas: driver update
  2015-03-30 13:55 Sreekanth Reddy
@ 2015-04-05 16:09 ` Christoph Hellwig
  2015-04-08  5:43   ` Sreekanth Reddy
  0 siblings, 1 reply; 123+ messages in thread
From: Christoph Hellwig @ 2015-04-05 16:09 UTC (permalink / raw)
  To: Sreekanth Reddy
  Cc: jejb, hch, martin.petersen, linux-scsi, JBottomley,
	Sathya.Prakash, kashyap.desai, linux-kernel, thenzl

This seems to be missing the corresponding mpt2 updates.  Nak to
anything that gets these drivers further out of sync.

Btw, I still need a second ACK for
http://www.spinics.net/lists/linux-scsi/msg82027.html
as well, so we can start getting rid of this duplication mess.

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

* [PATCH 00/20] mpt3sas: driver update
@ 2015-03-30 13:55 Sreekanth Reddy
  2015-04-05 16:09 ` Christoph Hellwig
  0 siblings, 1 reply; 123+ messages in thread
From: Sreekanth Reddy @ 2015-03-30 13:55 UTC (permalink / raw)
  To: jejb, hch
  Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
	kashyap.desai, linux-kernel, thenzl, Sreekanth Reddy

This patch set contains all the features and defect fixes from Phase4 to Phase8.

Please review this patch set and consider these patches for next kernel release.

Next time onwards we will make sure to post individual patches as and when we develop a feature & done basic testing instead of posting large set of patches
at once.

Regards,
Sreekanth

Sreekanth Reddy (20):
  [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96
    MSIX vector support
  [SCSI] mpt3sas: Get IOC_FACTS information using handshake protocol
    only after HBA card gets into READY or Operational state.
  [SCSI] mpt3sas: Added module parameter 'unblock_io' to unblock IO's
    during disk addition
  [SCSI] mpt3sas: Remove redundancy code while freeing the controller
    resources.
  [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.
  [SCSI] mpt3sas: Provides the physical location of sas drives
  [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00
  [SCSI] mpt3sas: Update MPI2 strings to MPI2.5
  [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header
    files
  [SCSI] mpt3sas: Add branding string support for OEM's HBA
  [SCSI] mpt3sas: Add branding string support for OEM custom HBA
  [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00
  [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
  [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status for
    log_info value 0x0x32010081
  [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping
    of scatter gather list fails for a SCSI command
  [SCSI] mpt3sas: Added support for customer specific branding
  [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of
    create_singlethread_workqueue() API
  [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address
    with dma_map_single() API
  [SCSI] mpt3sas: When device is blocked followed by unblock fails,
    unfreeze the I/Os
  [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00

 drivers/scsi/mpt3sas/mpi/mpi2.h          |   8 +-
 drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h     |  52 +++-
 drivers/scsi/mpt3sas/mpi/mpi2_ioc.h      |   4 +-
 drivers/scsi/mpt3sas/mpi/mpi2_tool.h     |   4 +-
 drivers/scsi/mpt3sas/mpt3sas_base.c      | 284 +++++++++++++++++++---
 drivers/scsi/mpt3sas/mpt3sas_base.h      |  48 +++-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c     | 399 ++++++++++++++++++++++++++-----
 drivers/scsi/mpt3sas/mpt3sas_transport.c |  18 +-
 8 files changed, 708 insertions(+), 109 deletions(-)

-- 
2.0.2


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

end of thread, other threads:[~2015-06-30  6:55 UTC | newest]

Thread overview: 123+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12  9:42 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
2015-06-12  9:42 ` [PATCH 01/20] [SCSI] mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support Sreekanth Reddy
2015-06-12 11:09   ` Johannes Thumshirn
2015-06-12 11:16     ` Sreekanth Reddy
2015-06-12 11:16       ` Sreekanth Reddy
2015-06-18  9:57       ` Sreekanth Reddy
2015-06-18  9:57         ` Sreekanth Reddy
2015-06-19  9:14         ` Johannes Thumshirn
2015-06-19  9:14           ` Johannes Thumshirn
2015-06-19  9:21           ` Sreekanth Reddy
2015-06-19  9:21             ` Sreekanth Reddy
2015-06-19  9:55             ` Johannes Thumshirn
2015-06-19  9:55               ` Johannes Thumshirn
2015-06-12  9:42 ` [PATCH 02/20] [SCSI] mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state Sreekanth Reddy
2015-06-16 15:59   ` Tomas Henzl
2015-06-17  9:08     ` Sreekanth Reddy
2015-06-12  9:42 ` [PATCH 03/20] [SCSI] mpt3sas: Don't block the drive when drive addition under the control of SML Sreekanth Reddy
2015-06-19 15:05   ` Martin K. Petersen
2015-06-19 15:05     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 04/20] [SCSI] mpt3sas: Remove redundancy code while freeing the controller resources Sreekanth Reddy
2015-06-12 11:28   ` Johannes Thumshirn
2015-06-12 12:18     ` Sreekanth Reddy
2015-06-12 12:40       ` Johannes Thumshirn
2015-06-15 10:26         ` Sreekanth Reddy
2015-06-15 10:26           ` Sreekanth Reddy
2015-06-15 10:48           ` Johannes Thumshirn
2015-06-15 10:48             ` Johannes Thumshirn
2015-06-18  9:52             ` Sreekanth Reddy
2015-06-18  9:52               ` Sreekanth Reddy
2015-06-18 10:08   ` Johannes Thumshirn
2015-06-19 15:09   ` Martin K. Petersen
2015-06-19 15:09     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 05/20] [SCSI] mpt3sas: MPI 2.5 Rev I (2.5.4) specifications Sreekanth Reddy
2015-06-15  9:51   ` Johannes Thumshirn
2015-06-19 15:10   ` Martin K. Petersen
2015-06-19 15:10     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 06/20] [SCSI] mpt3sas: Provides the physical location of sas drives Sreekanth Reddy
2015-06-18  9:56   ` Sreekanth Reddy
2015-06-19  9:19   ` Johannes Thumshirn
2015-06-19  9:19     ` Johannes Thumshirn
2015-06-19 10:53     ` Sreekanth Reddy
2015-06-19 10:53       ` Sreekanth Reddy
2015-06-12  9:42 ` [PATCH 07/20] [SCSI] mpt3sas: Bump mpt3sas Driver version to v5.100.00.00 Sreekanth Reddy
2015-06-15  9:52   ` Johannes Thumshirn
2015-06-19 20:22   ` Martin K. Petersen
2015-06-19 20:22     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 08/20] [SCSI] mpt3sas: Update MPI2 strings to MPI2.5 Sreekanth Reddy
2015-06-15  9:52   ` Johannes Thumshirn
2015-06-15  9:52     ` Johannes Thumshirn
2015-06-19 20:24   ` Martin K. Petersen
2015-06-19 20:24     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 09/20] [SCSI] mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files Sreekanth Reddy
2015-06-15  9:53   ` Johannes Thumshirn
2015-06-15  9:53     ` Johannes Thumshirn
2015-06-19 20:27   ` Martin K. Petersen
2015-06-19 20:27     ` Martin K. Petersen
2015-06-22 12:18     ` Sreekanth Reddy
2015-06-22 12:18       ` Sreekanth Reddy
2015-06-12  9:42 ` [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA Sreekanth Reddy
2015-06-15  9:46   ` Johannes Thumshirn
2015-06-15  9:46     ` Johannes Thumshirn
2015-06-15 11:11     ` Sreekanth Reddy
2015-06-15 11:11       ` Sreekanth Reddy
2015-06-15 11:53       ` Johannes Thumshirn
2015-06-15 12:00         ` Sreekanth Reddy
2015-06-18  9:51           ` Sreekanth Reddy
2015-06-18 10:09   ` Johannes Thumshirn
2015-06-18 10:09     ` Johannes Thumshirn
2015-06-19 20:30   ` Martin K. Petersen
2015-06-19 20:30     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA Sreekanth Reddy
2015-06-18  9:55   ` Sreekanth Reddy
2015-06-19 20:34   ` Martin K. Petersen
2015-06-19 20:34     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 12/20] [SCSI] mpt3sas: Bump mpt3sas driver version to v6.100.00.00 Sreekanth Reddy
2015-06-15  9:53   ` Johannes Thumshirn
2015-06-15  9:53     ` Johannes Thumshirn
2015-06-19 20:35   ` Martin K. Petersen
2015-06-19 20:35     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 13/20] [SCSI] mpt3sas: MPI 2.5 Rev K (2.5.6) specifications Sreekanth Reddy
2015-06-15  9:54   ` Johannes Thumshirn
2015-06-15  9:54     ` Johannes Thumshirn
2015-06-19 20:36   ` Martin K. Petersen
2015-06-19 20:36     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 14/20] [SCSI] mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081 Sreekanth Reddy
2015-06-15 10:01   ` Johannes Thumshirn
2015-06-15 11:01     ` Sreekanth Reddy
2015-06-15 11:01       ` Sreekanth Reddy
2015-06-12  9:42 ` [PATCH 15/20] [SCSI] mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command Sreekanth Reddy
2015-06-15  9:54   ` Johannes Thumshirn
2015-06-19 20:40   ` Martin K. Petersen
2015-06-19 20:40     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding Sreekanth Reddy
2015-06-18  9:53   ` Sreekanth Reddy
2015-06-19 20:44   ` Martin K. Petersen
2015-06-19 20:44     ` Martin K. Petersen
2015-06-22 12:26     ` Sreekanth Reddy
2015-06-22 12:26       ` Sreekanth Reddy
2015-06-22 20:36       ` Martin K. Petersen
2015-06-22 20:36         ` Martin K. Petersen
2015-06-25 13:40         ` Sreekanth Reddy
2015-06-12  9:42 ` [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API Sreekanth Reddy
2015-06-12 21:03   ` Joe Lawrence
2015-06-12 21:03     ` Joe Lawrence
2015-06-15 10:56     ` Sreekanth Reddy
2015-06-15 21:05       ` James Bottomley
2015-06-16  5:03         ` Sreekanth Reddy
2015-06-12  9:42 ` [PATCH 18/20] [SCSI] mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API Sreekanth Reddy
2015-06-15  9:55   ` Johannes Thumshirn
2015-06-19 20:47   ` Martin K. Petersen
2015-06-19 20:47     ` Martin K. Petersen
2015-06-12  9:42 ` [PATCH 19/20] [SCSI] mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os Sreekanth Reddy
2015-06-15  9:58   ` Johannes Thumshirn
2015-06-12  9:42 ` [PATCH 20/20] [SCSI] mpt3sas : Bump mpt3sas driver version to 9.100.00.00 Sreekanth Reddy
2015-06-15  9:56   ` Johannes Thumshirn
2015-06-19 21:01   ` Martin K. Petersen
2015-06-19 21:01     ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2015-06-30  6:54 [PATCH 00/20] mpt3sas: driver update Sreekanth Reddy
2015-03-30 13:55 Sreekanth Reddy
2015-04-05 16:09 ` Christoph Hellwig
2015-04-08  5:43   ` Sreekanth Reddy
2015-04-21 12:13     ` Christoph Hellwig
2015-04-24 21:27       ` Sathya Prakash

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.