[V3 09/10] mpt3sas: Introduce perf_mode module parameter

2019-05-31 Thread Suganath Prabu S
498.10 usec | |-|--|--| |latency | 97.10 usec |689.26 usec | - Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 144

[V3 03/10] mpt3sas: Add flag high_iops_queues

2019-05-31 Thread Suganath Prabu S
max_msix_vectors module parameter and - System booted in non kdump mode. Reply queues with interrupt coalescing enabled are called "high iops reply queues" and reply queues with interrupt coalescing disabled are called "low latency reply queues". Signed-off-by: Suganath Prabu

[V3 07/10] mpt3sas: Affinity high iops queues IRQs to local node

2019-05-31 Thread Suganath Prabu S
. In general, high iops queue and low latency queue together should fit into 128 reply queue (max reply queue supported by Aero/Sea). Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 73 - 1 file changed, 62 insertions(+), 11 deletions(-) diff

[V3 10/10] mpt3sas: Update driver version to 29.100.00.00

2019-05-31 Thread Suganath Prabu S
Update driver version from 28.100.00.00 to 29.100.00.00 This is equivalent to Phase 10 OOB driver. Signed-off-by: Suganath Prabu S --- 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

[V3 05/10] mpt3sas: Use highiops queues if more in-flights

2019-05-31 Thread Suganath Prabu S
Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 36 - drivers/scsi/mpt3sas/mpt3sas_base.h | 14 ++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 57d0e7d

[V3 06/10] mpt3sas:save msix index and use same while posting RD

2019-05-31 Thread Suganath Prabu S
descriptor and save determined msix index in msix_io field. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 42 ++-- drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 + 3 files changed, 35 insertions(+), 9

[V3 08/10] mpt3sas: Enable interrupt coalescing on high iops

2019-05-31 Thread Suganath Prabu S
user), current modified changes on ioc page1 won't take effect. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 16 ++ drivers/scsi/mpt3sas/mpt3sas_base.h | 5 ++ drivers/scsi/mpt3sas/mpt3sas_config.c

[V3 04/10] mpt3sas: change _base_get_msix_index prototype

2019-05-31 Thread Suganath Prabu S
Code refactoring. In function _base_get_msix_index add scmd as second argument. This change is required for creating function pointer in next patch, where we introduce new function to get the msix index for high iops queues Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas

[V3 01/10] mpt3sas: function pointers of request descriptor

2019-05-31 Thread Suganath Prabu S
statements Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 38 +--- drivers/scsi/mpt3sas/mpt3sas_base.h | 3 ++ drivers/scsi/mpt3sas/mpt3sas_config.c| 2 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 20 ++--- drivers/scsi

[V3 02/10] mpt3sas: Add Atomic RequestDescriptor support on Aero

2019-05-31 Thread Suganath Prabu S
Request Descriptor is an atomic operation, providing a safe mechanism for multiple processors on the host to post requests without synchronization. This Atomic Request Descriptor format is identical to first 32 bits of Default Request Descriptor and uses only 32 bits Signed-off-by: Suganath Prabu S

[V3 00/10] mpt3sas: Aero/Sea HBA feature addition

2019-05-31 Thread Suganath Prabu S
warnings reported by kbuild test robot v3: - In patch6, For readability use if statement instead of ternary operator. Suganath Prabu S (10): mpt3sas: function pointers of request descriptor mpt3sas: Add Atomic RequestDescriptor support on Aero mpt3sas: Add flag high_iops_queues mpt3sas: change

[PATCH v2 00/10] mpt3sas: Aero/Sea HBA feature addition

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu In this patch series we are adding below two features for Aero/Sea HBA device. Aero/Sea series HBA is PCI4.0 based controllers. 1. Add Atomic Request descriptor support: Atomic Request Descriptor is an alternative method for posting an entry onto a request queue. The posting

[PATCH v2 10/10] mpt3sas: Update driver version to 29.100.00.00

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu Update driver version from 28.100.00.00 to 29.100.00.00 This is equivalent to Phase 10 OOB driver. Signed-off-by: Suganath Prabu --- drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_bas

[PATCH v2 06/10] mpt3sas:save msix index and use same while posting RD

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu Code refactor: In the IO submission path _base_get_msix_index is called twice, one while getting the smid; msix index is saved in msix_io filed in scsiio tracker and anther while posting the request descriptor(RD). now code refactor is done to determine msix index only while

[PATCH v2 09/10] mpt3sas: Introduce perf_mode module parameter

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu 1. Introduce module parameter perf_mode for only Aero/Sea generation HBAs. 2. Update IOC page1 fields according to performance mode. Below are the performance modes that can be enabled with module parameter perf_mode. 0: Balanced - Few high iops reply queues will be enab

[PATCH v2 07/10] mpt3sas: Affinity high iops queues IRQs to local node

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu High iops queues are mapped to non-managed irqs. Set affinity of non-managed irqs to local numa node. Low latency queues are mapped to managed irq. Driver reserves some reply queues (pci_alloc_irq_vectors_affinity and .pre_vectors interface is used to meet the goal) for max

[PATCH v2 04/10] mpt3sas: change _base_get_msix_index prototype

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu Code refactoring. In function _base_get_msix_index add scmd as second argument. This change is required for creating function pointer in next patch, where we introduce new function to get the msix index for high iops queues Signed-off-by: Suganath Prabu --- drivers/scsi/m

[PATCH v2 03/10] mpt3sas: Add flag high_iops_queues

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu Aero controllers supports balanced performance mode and driver enables set of high iops and low latency reply queue only if, - HBA is an AERO controller, - MSIXs vector supported by the HBA is 128, - Total CPU count in the system more than high iops queue count, - Loaded

[PATCH v2 08/10] mpt3sas: Enable interrupt coalescing on high iops

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu Enable interrupt coalescing only on high iops queues when high iops queues are enabled. In ioc config page 1, offset 0x14 (ProductSpecific field) is used to determine interrupt coalescing enabled/disabled on per reply descriptor post queue group(8) basis. If 31st bit is zero

[PATCH v2 02/10] mpt3sas: Add Atomic RequestDescriptor support on Aero

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu If the Aero HBA supports Atomic Request Descriptors, it sets the Atomic Request Descriptor Capable bit in the IOCCapabilities field of the IOCFacts Reply message. Driver uses an Atomic Request Descriptor as an alternative method for posting an entry onto a request queue. The

[PATCH v2 05/10] mpt3sas: Use highiops queues if more in-flights

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu Driver will use round robin method for io submission in batches within the high iops queues when in-flight ios on the target device is more than 8. If in-flight ios per SCSI device more than 8, driver will use high iops queue else driver will use low latency reply queues. S

[PATCH v2 01/10] mpt3sas: function pointers of request descriptor

2019-05-20 Thread Suganath Prabu S
From: Suganath Prabu This code refactoring introduces function pointers. Host uses Request Descriptors of different types for posting an entry onto a request queue. Based on controller type and capabilities, host can also use atomic descriptors other than normal descriptors. Using function point

[PATCH 10/10] mpt3sas: Update driver version to 29.100.00.00

2019-05-17 Thread Suganath Prabu S
Update driver version from 28.100.00.00 to 29.100.00.00 This is equivalent to Phase 10 OOB driver. Signed-off-by: Suganath Prabu S --- 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

[PATCH 09/10] mpt3sas: Introduce perf_mode module parameter

2019-05-17 Thread Suganath Prabu S
498.10 usec | |-|--|--| |latency | 97.10 usec |689.26 usec | - Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 144 +++

[PATCH 08/10] mpt3sas: Enable interrupt coalescing on high iops

2019-05-17 Thread Suganath Prabu S
user), current modified changes on ioc page1 won't take effect. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 16 drivers/scsi/mpt3sas/mpt3sas_base.h | 5 +++ drivers/scsi/mpt3sas/mpt3sas_config.c

[PATCH 04/10] mpt3sas: change _base_get_msix_index prototype

2019-05-17 Thread Suganath Prabu S
Code refactoring. In function _base_get_msix_index add scmd as second argument. This change is required for creating function pointer in next patch, where we introduce new function to get the msix index for high iops queues Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas

[PATCH 05/10] mpt3sas: Use highiops queues if more in-flights

2019-05-17 Thread Suganath Prabu S
Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 36 +++- drivers/scsi/mpt3sas/mpt3sas_base.h | 14 +- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index

[PATCH 06/10] mpt3sas: save msix index and use same while posting RD

2019-05-17 Thread Suganath Prabu S
descriptor and save determined msix index in msix_io field. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 42 drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 + 3 files changed, 35 insertions

[PATCH 07/10] mpt3sas: Affinity high iops queues IRQs to local node

2019-05-17 Thread Suganath Prabu S
. In general, high iops queue and low latency queue together should fit into 128 reply queue (max reply queue supported by Aero/Sea) Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 73 +++-- 1 file changed, 62 insertions(+), 11 deletions

[PATCH 03/10] mpt3sas: Add flag high_iops_queues

2019-05-17 Thread Suganath Prabu S
max_msix_vectors module parameter and - System booted in non kdump mode. Reply queues with interrupt coalescing enabled are called "high iops reply queues" and reply queues with interrupt coalescing disabled are called "low latency reply queues". Signed-off-by: Suganath Prabu

[PATCH 02/10] mpt3sas: Add Atomic Request Descriptor support on Aero

2019-05-17 Thread Suganath Prabu S
Request Descriptor is an atomic operation, providing a safe mechanism for multiple processors on the host to post requests without synchronization. This Atomic Request Descriptor format is identical to first 32 bits of Default Request Descriptor and uses only 32 bits Signed-off-by: Suganath Prabu S

[PATCH 01/10] mpt3sas: function pointers of request descriptor

2019-05-17 Thread Suganath Prabu S
statements Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 32 ++-- drivers/scsi/mpt3sas/mpt3sas_base.h | 3 +++ drivers/scsi/mpt3sas/mpt3sas_config.c| 2 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 20

[PATCH 00/10] mpt3sas: Aero/Sea HBA feature addition

2019-05-17 Thread Suganath Prabu S
(i.e use low latency reply queue). If outstanding IOs per scsi device is more than 8 - Driver should do round robin io submission in batches on high iops queue. Example: Batches of the 16. “First 16 IOS submitted to reply queue 0, next 16 IOS submitted to reply queue 1 etc”. Suganath Prabu S (10

[PATCH 4/4] mpt3sas: Update driver version to 27.102.00.00

2019-01-29 Thread Suganath Prabu S
Updated driver version to 27.102.00.00 from 27.101.00.00. Signed-off-by: Suganath Prabu S --- 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 db12c1b

[PATCH 3/4] mpt3sas: Add support for ATLAS PCIe switch.

2019-01-29 Thread Suganath Prabu S
Add Atlas PCIe Switch Management Port device PNPID, Vendor Id: 0x1000 device Id: 0x00B2 This device is based on MPI 2.6 spec and it exposes one SES device to accept management commands for the PCIe switch. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.h | 3

[PATCH 1/4] mpt3sas: Rename mpi endpoint device ID macro.

2019-01-29 Thread Suganath Prabu S
MPI Endpoint is a PCIe switch based on MPI2, Renaming device ID macro from MPI2_MFGPAGE_DEVID_SAS2308_MPI_EP to MPI2_MFGPAGE_DEVID_SWITCH_MPI_EP Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 6 +++--- 2 files changed, 4

[PATCH 0/4] mpt3sas: Add Atlas and Ambrosia device support.

2019-01-29 Thread Suganath Prabu S
MPI2.6 and it exposes one SES device to accept management commands. Suganath Prabu S (4): mpt3sas: Rename mpi endpoint device ID macro. mpt3sas: Add support for NVMe Switch Adapter mpt3sas: Add support for ATLAS PCIe switch. mpt3sas: Update driver version to 27.102.00.00 drivers/scsi

[PATCH 2/4] mpt3sas: Add support for NVMe Switch Adapter

2019-01-29 Thread Suganath Prabu S
Added device ID for NVMe Switch Adapter (Ambrosia). VID: 0x1000 DID: 0x02B1 Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 1 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 2 files changed, 5 insertions(+) diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h b

[PATCH v4 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available

2018-09-25 Thread Suganath Prabu S
d made inline. v4 Changes: === Dont split strings in print statement. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 39 drivers/scsi/mpt3sas/mpt3sas_base.h | 3 ++- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 50 ++

[PATCH v4 2/6] mpt3sas: Separate out mpt3sas_wait_for_ioc_to_operational

2018-09-25 Thread Suganath Prabu S
nd this returns with error code EFAULT, if it detects HBA is hot unplugged or IOC is not in operational state. V2 change set: used pci_device_is_present instead of mpt3sas_base_pci_device_is_unplugged v4 Change set: Dont split strings in print statement Signed-off-by: Suganath Prabu S ---

[PATCH v4 0/6] mpt3sas: Hot-Plug Surprise removal support on IOC.

2018-09-25 Thread Suganath Prabu S
print statement, to avoid warning from checkpatch.pl. Suganath Prabu S (6): mpt3sas: Introduce mpt3sas_base_pci_device_is_available mpt3sas: Separate out mpt3sas_wait_for_ioc_to_operational mpt3sas: Introdude _scsih_get_shost_and_ioc. mpt3sas: Fix Sync cache command failure durin

[PATCH v4 3/6] mpt3sas: Introdude _scsih_get_shost_and_ioc.

2018-09-25 Thread Suganath Prabu S
The code for getting shost and IOC is redundant so moved that to function "scsih_get_shost_and_ioc". Also checks for NULL are added to IOC and shost. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 98 ++-- 1 file changed, 82

[PATCH v4 6/6] mpt3sas: Bump driver version to 27.100.00.00.

2018-09-25 Thread Suganath Prabu S
Modify driver version to 27.100.00.00 (which is equivalent to PH8 OOB driver) Signed-off-by: Suganath Prabu S --- 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

[PATCH v4 5/6] mpt3sas: Fix driver modifying NVRAM/persistent data.

2018-09-25 Thread Suganath Prabu S
. Driver should change only current copy of Manufacturing page11 Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_config.c | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b

[PATCH v4 4/6] mpt3sas: Fix Sync cache command failure during driver unload.

2018-09-25 Thread Suganath Prabu S
function mpt3sas_base_pci_device_is_unplugged with pci_device_is_present Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 41 ++-- drivers/scsi/mpt3sas/mpt3sas_transport.c | 7 -- 2 files changed, 44 insertions(+), 4 deletions(-) diff

[PATCH v3 6/6] mpt3sas: Bump driver version to 27.100.00.00.

2018-09-23 Thread Suganath Prabu S
Modify driver version to 27.100.00.00 (which is equivalent to PH8 OOB driver) Signed-off-by: Suganath Prabu S --- 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

[PATCH v3 5/6] mpt3sas: Fix driver modifying NVRAM/persistent data.

2018-09-23 Thread Suganath Prabu S
. Driver should change only current copy of Manufacturing page11 Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_config.c | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b

[PATCH v3 3/6] mpt3sas: Introdude _scsih_get_shost_and_ioc.

2018-09-23 Thread Suganath Prabu S
The code for getting shost and IOC is redundant so moved that to function "scsih_get_shost_and_ioc". Also checks for NULL are added to IOC and shost. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 98 ++-- 1 file changed, 82

[PATCH v3 4/6] mpt3sas: Fix Sync cache command failure during driver unload.

2018-09-23 Thread Suganath Prabu S
function mpt3sas_base_pci_device_is_unplugged with pci_device_is_present Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 41 ++-- drivers/scsi/mpt3sas/mpt3sas_transport.c | 7 -- 2 files changed, 44 insertions(+), 4 deletions(-) diff

[PATCH v3 0/6] mpt3sas: Hot-Plug Surprise removal support on IOC.

2018-09-23 Thread Suganath Prabu S
hanges: In Patch 0001 - unlock mutex, if active reset is in progress. V2 changes: Replaced mpt3sas_base_pci_device_is_unplugged with pci_device_is_present. V3 Change Set: Simplified function "mpt3sas_base_pci_device_is_available" and made inline Suganath Prabu S (6):

[PATCH v3 2/6] mpt3sas: Separate out mpt3sas_wait_for_ioc_to_operational

2018-09-23 Thread Suganath Prabu S
nd this returns with error code EFAULT, if it detects HBA is hot unplugged or IOC is not in operational state. V2 change set: used pci_device_is_present instead of mpt3sas_base_pci_device_is_unplugged Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3

[PATCH v3 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available

2018-09-23 Thread Suganath Prabu S
of mpt3sas_base_pci_device_is_unplugged. 2) As suggested by Lukas, removed using watchdog thread for checking hba hot unplug(Patch 02 of V1). Added Hot unplug checks in scan finish and reset paths. v3 Change Set: = Simplified function "mpt3sas_base_pci_device_is_available"

[PATCH v2 5/6] mpt3sas: Fix driver modifying NVRAM/persistent data.

2018-09-20 Thread Suganath Prabu S
. Driver should change only current copy of Manufacturing page11 Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_config.c | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b

[PATCH v2 4/6] mpt3sas: Fix Sync cache command failure during driver unload.

2018-09-20 Thread Suganath Prabu S
function mpt3sas_base_pci_device_is_unplugged with pci_device_is_present Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 41 ++-- drivers/scsi/mpt3sas/mpt3sas_transport.c | 7 -- 2 files changed, 44 insertions(+), 4 deletions(-) diff

[PATCH v2 6/6] mpt3sas: Bump driver version to 27.100.00.00.

2018-09-20 Thread Suganath Prabu S
Modify driver version to 27.100.00.00 (which is equivalent to PH8 OOB driver) Signed-off-by: Suganath Prabu S --- 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

[PATCH v2 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available

2018-09-20 Thread Suganath Prabu S
of mpt3sas_base_pci_device_is_unplugged. 2) As suggested by Lukas, removed using watchdog thread for checking hba hot unplug(Patch 02 of V1). Added Hot unplug checks in scan finish and reset paths. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 46 +++

[PATCH v2 0/6] mpt3sas: Hot-Plug Surprise removal support on IOC.

2018-09-20 Thread Suganath Prabu S
hanges: In Patch 0001 - unlock mutex, if active reset is in progress. V2 changes: Replaced mpt3sas_base_pci_device_is_unplugged with pci_device_is_present. Suganath Prabu S (6): mpt3sas: Introduce mpt3sas_base_pci_device_is_available mpt3sas: Separate out mpt3sas_wait_for_ioc_to_o

[PATCH v2 3/6] mpt3sas: Introdude _scsih_get_shost_and_ioc.

2018-09-20 Thread Suganath Prabu S
The code for getting shost and IOC is redundant so moved that to function "scsih_get_shost_and_ioc". Also checks for NULL are added to IOC and shost. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 98 ++-- 1 file changed, 82

[PATCH v2 2/6] mpt3sas: Separate out mpt3sas_wait_for_ioc_to_operational

2018-09-20 Thread Suganath Prabu S
nd this returns with error code EFAULT, if it detects HBA is hot unplugged or IOC is not in operational state. V2 change set: used pci_device_is_present instead of mpt3sas_base_pci_device_is_unplugged Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3

[Patch v1 5/7] mpt3sas: Fix Sync cache command failure during driver unload.

2018-08-30 Thread Suganath Prabu S
This is to fix Sync cache and start stop command failures with DID_NO_CONNECT during driver unload. 1) Release drives first from SML, then remove internally in driver. 2) And allow sync cache and Start stop commands to firmware, even when remove_host flag is set Signed-off-by: Suganath Prabu S

[Patch v1 1/7] mpt3sas: Introduce mpt3sas_base_pci_device_is_unplugged

2018-08-30 Thread Suganath Prabu S
ing IOs even if diag reset fails and also if driver detects that HBA is hot unplugged. v1 change set: unlock mutex before goto "out_unlocked", if active reset is in progress. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 62

[Patch v1 2/7] mpt3sas: Add HBA hot plug watchdog thread.

2018-08-30 Thread Suganath Prabu S
e IOC becomes operational. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 92 +++- drivers/scsi/mpt3sas/mpt3sas_base.h | 6 +++ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 7 +++ 3 files changed, 104 insertions(+), 1 deletion(-) diff --g

[Patch v1 6/7] mpt3sas: Fix driver modifying NVRAM/persistent data.

2018-08-30 Thread Suganath Prabu S
. Driver should change only current copy of Manufacturing page11 Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_config.c | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b

[Patch v1 0/7] mpt3sas: Hot-Plug Surprise removal support on IOC.

2018-08-30 Thread Suganath Prabu S
hanges: In Patch 0001 - unlock mutex, if active reset is in progress. Suganath Prabu S (7): mpt3sas: Introduce mpt3sas_base_pci_device_is_unplugged mpt3sas: Add HBA hot plug watchdog thread. mpt3sas: Seperate out mpt3sas_wait_for_ioc_to_operational mpt3sas: Introdude _scsih_get_sho

[Patch v1 3/7] mpt3sas: Seperate out mpt3sas_wait_for_ioc_to_operational

2018-08-30 Thread Suganath Prabu S
nd this returns with error code EFAULT, if it detects HBA is hot unplugged or IOC is not in operational state. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 92 +++- drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++ drivers/scsi/mpt3

[Patch v1 7/7] mpt3sas: Bump driver version to 27.100.00.00.

2018-08-30 Thread Suganath Prabu S
Modify driver version to 27.100.00.00 (which is equivalent to PH8 OOB driver) Signed-off-by: Suganath Prabu S --- 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

[Patch v1 4/7] mpt3sas: Introdude _scsih_get_shost_and_ioc.

2018-08-30 Thread Suganath Prabu S
The code for getting shost and IOC is redundant so moved that to function "scsih_get_shost_and_ioc". Also checks for NULL are added to IOC and shost. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 98 ++-- 1 file changed, 82

[PATCH 5/7] mpt3sas: Fix Sync cache command failure during driver unload.

2018-08-29 Thread Suganath Prabu S
This is to fix Sync cache and start stop command failures with DID_NO_CONNECT during driver unload. 1) Release drives first from SML, then remove internally in driver. 2) And allow sync cache and Start stop commands to firmware, even when remove_host flag is set. Signed-off-by: Suganath Prabu S

[PATCH 0/7] mpt3sas: Hot-Plug Surprise removal support on IOC.

2018-08-29 Thread Suganath Prabu S
remove HBA without bringing the system down. For surprise removal detection, driver does a PCI read of IOC's vendor field in IOC's PCI configuration space. If the read value is 0x this indicates that the device might have hot removed and the device will be removed from driver. Suga

[PATCH 6/7] mpt3sas: Fix driver modifying NVRAM/persistent data.

2018-08-29 Thread Suganath Prabu S
. Driver should change only current copy of Manufacturing page11. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_config.c | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b

[PATCH 1/7] mpt3sas: Introduce mpt3sas_base_pci_device_is_unplugged

2018-08-29 Thread Suganath Prabu S
ing IOs even if diag reset fails and also if driver detects that HBA is hot unplugged. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 61 +++- drivers/scsi/mpt3sas/mpt3sas_base.h | 3 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 42

[PATCH 7/7] mpt3sas: Bump driver version to 27.100.00.00.

2018-08-29 Thread Suganath Prabu S
Modify driver version to 27.100.00.00 (which is equivalent to PH8 OOB driver) Signed-off-by: Suganath Prabu S --- 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

[PATCH 3/7] mpt3sas: Seperate out mpt3sas_wait_for_ioc_to_operational

2018-08-29 Thread Suganath Prabu S
nd this returns with error code EFAULT, if it detects HBA is hot unplugged or IOC is not in operational state. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 92 +++- drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++ drivers/scsi/mpt3

[PATCH 2/7] mpt3sas: Add HBA hot plug watchdog thread.

2018-08-29 Thread Suganath Prabu S
e IOC becomes operational. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 92 +++- drivers/scsi/mpt3sas/mpt3sas_base.h | 6 +++ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 7 +++ 3 files changed, 104 insertions(+), 1 deletion(-) diff --g

[PATCH 4/7] mpt3sas: Introdude _scsih_get_shost_and_ioc.

2018-08-29 Thread Suganath Prabu S
The code for getting shost and IOC is redundant so moved that to function "scsih_get_shost_and_ioc". Also checks for NULL are added to IOC and shost. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 98 ++-- 1 file changed, 82

[V1] mpt3sas: Do not use 32-bit atomic request descriptor for Ventura controllers.

2018-02-14 Thread Suganath Prabu S
and use 64 bit Descriptors V1 Change set: 1) In this patch removed callbacks as suggested by Hannes. Note: This patch Should be applied on top of https://www.spinics.net/lists/linux-scsi/msg117405.html "Adding MPI Endpoint device support" patches. Signed-off-by: Suganath Prabu S --

[V1 4/6] mpt3sas: Introduce Base function for cloning.

2018-02-07 Thread Suganath Prabu S
All scsi IO's and config requests data buffer and sgl are cloned to system memory in _clone_sg_entries before submitting it to Firmware. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 215 +- drivers/scsi/mpt3sas/mpt3sas_b

[V1 5/6] mpt3sas: Introduce function to clone mpi request.

2018-02-07 Thread Suganath Prabu S
,_base_writeq function is identical to _base_mpi_ep_writeq, Removed duplicate code as suggested. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 140 1 file changed, 125 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/mpt3sas

[V1 6/6] mpt3sas: Introduce function to clone mpi reply.

2018-02-07 Thread Suganath Prabu S
If the posted request has an error of any type, the IOC writes a Reply message into a host-based system reply message frame. This functions clone it in the BAR0 mapped region. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 37 - 1

[V1 0/6] mpt3sas: Adding MPI Endpoint device support.

2018-02-07 Thread Suganath Prabu S
the entry point in IOC FW module. Once PLX management calls relevant callbackfrom IOC FW, rest of the processing will behandled within IOC FW. IOC FW should release TLP packet as soon as possible to avoid any TLP timeout. Suganath Prabu S (6): mpt3sas: Add PCI device ID for Andromeda. mpt3

[V1 2/6] mpt3sas: Configure reply post queue depth, DMA and sgl tablesize.

2018-02-07 Thread Suganath Prabu S
This configures shost max sector to 128, single reply descriptor post queue, sgl table size to 16 and 32 bit DMA for MPI Endpoint and it supports 64K as max IO. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 47 +++- drivers/scsi

[V1 1/6] mpt3sas: Add PCI device ID for Andromeda.

2018-02-07 Thread Suganath Prabu S
Add device ID and flag for Andromeda/MPI Emdpont. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 1 + drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 14 -- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git

[V1 3/6] mpt3sas: Introduce API's to get BAR0 mapped buffer address.

2018-02-07 Thread Suganath Prabu S
uffer directly to the mCPU memory region via BAR-0 region. Introduced API's to calculate and return BAR0 mapped host buffer's physical and virtual address for the provided smid Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 93 +++

[PATCH 3/6] mpt3sas: Introduce API's to get BAR0 mapped buffer address.

2018-01-19 Thread Suganath Prabu S
uffer directly to the mCPU memory region via BAR-0 region. Introduced API's to calculate and return BAR0 mapped host buffer's physical and virtual address for the provided smid. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 93 +++

[PATCH 5/6] mpt3sas: Introduce function to clone mpi request.

2018-01-19 Thread Suganath Prabu S
Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 131 +--- 1 file changed, 123 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 40a1806..0248058 100644 --- a/drivers/scsi/mpt3sas

[PATCH 0/6] mpt3sas: Adding MPI Endpoint device support.

2018-01-19 Thread Suganath Prabu S
as possible to avoid any TLP timeout. Suganath Prabu S (6): mpt3sas: Add PCI device ID for Andromeda. mpt3sas: Configure reply post queue depth, DMA and sgl tablesize. mpt3sas: Introduce API's to get BAR0 mapped buffer address. mpt3sas: Introduce Base function for cloning. mpt3sas: I

[PATCH 4/6] mpt3sas: Introduce Base function for cloning.

2018-01-19 Thread Suganath Prabu S
All scsi IO's and config requests data buffer and sgl are cloned to system memory in _clone_sg_entries before submitting it to Firmware. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 212 +- drivers/scsi/mpt3sas/mpt3sas_b

[PATCH 1/6] mpt3sas: Add PCI device ID for Andromeda.

2018-01-19 Thread Suganath Prabu S
Add device ID and flag for Andromeda/MPI Emdpont. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 1 + drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 14 -- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git

[PATCH 2/6] mpt3sas: Configure reply post queue depth, DMA and sgl tablesize.

2018-01-19 Thread Suganath Prabu S
This configures shost max sector to 128, single reply descriptor post queue, sgl table size to 16 and 32 bit DMA for MPI Endpoint and it supports 64K as max IO. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 47 +++- drivers/scsi

[PATCH 6/6] mpt3sas: Introduce function to clone mpi reply.

2018-01-19 Thread Suganath Prabu S
If the posted request has an error of any type, the IOC writes a Reply message into a host-based system reply message frame. This functions clone it in the BAR0 mapped region. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 34 +- 1 file

[Resend 03/11] mpt3sas: separate out _base_recovery_check()

2018-01-04 Thread Suganath Prabu S
From: Hannes Reinecke No functional change. Signed-off-by: Hannes Reinecke Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi

[Resend 02/11] mpt3sas: use list_splice_init()

2018-01-04 Thread Suganath Prabu S
From: Hannes Reinecke Use 'list_splice_init()' instead of hand-crafted function. No functional change. Signed-off-by: Hannes Reinecke Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) di

[Resend 04/11] mpt3sas: open-code _scsih_scsi_lookup_get()

2018-01-04 Thread Suganath Prabu S
From: Hannes Reinecke Just a wrapper around the scsi lookup array and only used in one place, so open-code it. Signed-off-by: Hannes Reinecke Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff

[Resend PATCH 00/11] mpt3sas: Enable scsi MQ & lockless command submission

2018-01-04 Thread Suganath Prabu S
from converting it to full multiqueue support. Suganath Prabu S (11): mpt3sas: set default value for cb_idx mpt3sas: use list_splice_init() mpt3sas: separate out _base_recovery_check() mpt3sas: open-code _scsih_scsi_lookup_get() mpt3sas: Introduce mpt3sas_get_st_from_smid() mpt3sas: check

[Resend 05/11] mpt3sas: Introduce mpt3sas_get_st_from_smid()

2018-01-04 Thread Suganath Prabu S
From: Hannes Reinecke Abstract accesses to the scsi_lookup array by introducing mpt3sas_get_st_from_smid(). Signed-off-by: Hannes Reinecke Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 22 ++ drivers/scsi/mpt3sas/mpt3sas_base.h | 2

[Resend 07/11] mpt3sas: always use first reserved smid for ioctl passthrough

2018-01-04 Thread Suganath Prabu S
igned-off-by: Hannes Reinecke Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 19 +-- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 10 ++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers

[Resend 08/11] mpt3sas: simplify task management functions

2018-01-04 Thread Suganath Prabu S
From: Hannes Reinecke No functional change. Code optimization. One can simply check 'target_busy' or 'device_busy' when figuring out if there are outstanding commands; no need to painstakingly counting them by hand. Signed-off-by: Hannes Reinecke Signed-off-by: Suganath P

[Resend 06/11] mpt3sas: check command status before attempting abort

2018-01-04 Thread Suganath Prabu S
From: Hannes Reinecke When attempting a command abort we should check the command status prior to sending the abort; the command might've been completed already. Signed-off-by: Hannes Reinecke Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 11 --- 1

[Resend 09/11] mpt3sas: simplify mpt3sas_scsi_issue_tm()

2018-01-04 Thread Suganath Prabu S
From: Hannes Reinecke Move the check for outstanding commands out of the function allowing us to simplify the overall code. Signed-off-by: Hannes Reinecke Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.h | 6 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 4 +- drivers

[Resend 11/11] mpt3sas: lockless command submission

2018-01-04 Thread Suganath Prabu S
s preallocated by scsi mid layer for each scsi command. Signed-off-by: Hannes Reinecke Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 147 ++- drivers/scsi/mpt3sas/mpt3sas_base.h | 25 ++ drivers/scsi/mpt3sas/mpt3sas_ctl.c

  1   2   3   >