[PATCH 1/4] megaraid_sas: Fix calculation of target ID

2019-06-28 Thread Shivasharan S
could end up with the wrong queue depth due to this. Fix target id calculation for channel 1 and 3. Fixes: 96188a89cc6d ("scsi: megaraid_sas: NVME interface target prop added") Cc: sta...@vger.kernel.org Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 +

[PATCH 2/4] megaraid_sas: Enable msix_load_balance for Invader and later controllers

2019-06-28 Thread Shivasharan S
Load balance completions across all MSI-X") Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 932187

[PATCH 0/4] megaraid_sas: driver updates

2019-06-28 Thread Shivasharan S
99673.html Thanks, Shivasharan Shivasharan S (4): megaraid_sas: Fix calculation of target ID megaraid_sas: Enable msix_load_balance for Invader and later controllers megaraid_sas: Add module parameter for FW Async event logging megaraid_sas: Update driver version to 07.710.50.00 dr

[PATCH 4/4] megaraid_sas: Update driver version to 07.710.50.00

2019-06-28 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index dc0f71f..a6037db 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h

[PATCH 3/4] megaraid_sas: Add module parameter for FW Async event logging

2019-06-28 Thread Shivasharan S
Add module parameter to control logging levels of async event notifications from firmware that get logged to system log. Also, allow changing the value from sysfs after driver load. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 18 +- 1 file

[PATCH v2 00/21] megaraid_sas: Driver updates

2019-05-07 Thread Shivasharan S
: - Patch 2: updated applicable kernel versions in stable tag - Patch 6: Fixed kbuild test robot reported sparse warning - Patch 11: Fixed kbuild test robot reported sparse warning - Patch 12: Fixed a sparse warning Shivasharan S (21): megaraid_sas: remove unused variable target_index

[PATCH v2 15/21] megaraid_sas: Print FW fault information

2019-05-07 Thread Shivasharan S
When driver detects a firmware fault during load, dump additional information on fault code and subcode that will help in debugging. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 2 ++ drivers/scsi/megaraid/megaraid_sas_base.c

[PATCH v2 06/21] megaraid_sas: IRQ poll to avoid CPU hard lockups

2019-05-07 Thread Shivasharan S
one MSI-x vector is busy doing processing. Select CONFIG_IRQ_POLL from driver Kconfig for driver compilation. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- Changes in v2: Make megasas_enable_irq_poll static as reported by kbuild test robot drivers/scsi/megaraid/Kconfig.megaraid

[PATCH v2 18/21] megaraid_sas: Add debug prints for device list

2019-05-07 Thread Shivasharan S
Add debug prints related to device list being returned by firmware. The a debug flag to activate these prints. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_base.c | 35

[PATCH v2 16/21] megaraid_sas: Print firmware interrupt status

2019-05-07 Thread Shivasharan S
Add a print to dump the interrupt status in system log for debugging. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/megaraid

[PATCH v2 04/21] megaraid_sas: rework code around controller reset

2019-05-07 Thread Shivasharan S
No functional change. This patch reworks code around controller reset path which gets rid of a couple of goto labels. This is in preparation for the next patch which adds PCI config space access locking while controller reset is in progress. Signed-off-by: Shivasharan S --- drivers/scsi

[PATCH v2 12/21] megaraid_sas: Dump system registers for debugging

2019-05-07 Thread Shivasharan S
When controller fails to transition to READY state during driver probe, dump the system interface register set. This will give snapshot of the firmware status for debugging driver load issues. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- Changes in v2: Fixed the sparse warning

[PATCH v2 17/21] megaraid_sas: Add prints in suspend and resume path

2019-05-07 Thread Shivasharan S
Add prints in resume/suspend path to help in debugging hibernation issues. The print gives an indication when the driver entry points are called. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 +++ 1 file changed, 3 insertions

[PATCH v2 14/21] megaraid_sas: Export RAID map id through sysfs

2019-05-07 Thread Shivasharan S
Add a sysfs interface to get the raid map index that is being used by driver. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b

[PATCH v2 21/21] megaraid_sas: Update driver version to 07.708.03.00

2019-05-07 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 56b3204d3fc6..e138d1447e43 100644 --- a/drivers/scsi/megaraid

[PATCH v2 08/21] megaraid_sas: Enhance prints in OCR and TM path

2019-05-07 Thread Shivasharan S
adapter reset. Also, print FastPath IOs that are outstanding. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 4 +- drivers/scsi/megaraid/megaraid_sas_base.c | 69 ++--- drivers/scsi/megaraid/megaraid_sas_fusion.c

[PATCH v2 11/21] megaraid_sas: Dump system interface regs from sysfs

2019-05-07 Thread Shivasharan S
Add a sysfs interface to dump the controller's system interface registers. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- Changes in v2: Fixed the sparse warnings reported by kbuild_test_robot and removed the endianness conversion after readl. drivers/scsi/meg

[PATCH v2 03/21] megaraid_sas: fw_reset_no_pci_access required for MFI adapters only

2019-05-07 Thread Shivasharan S
fw_reset_no_pci_access is only applicable for MFI controllers and is not used for Fusion controllers. For all Fusion controllers, driver can check reset adapter bit in status register before performing a chip reset, without setting "fw_reset_no_pci_access". Signed-off-by: Shi

[PATCH v2 20/21] megaraid_sas: Export RAID map through debugfs

2019-05-07 Thread Shivasharan S
Create a debugfs interface for megaraid_sas driver. Provide interface to dump driver RAID map in debugfs. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/Makefile | 2 +- drivers/scsi/megaraid/megaraid_sas.h | 4 + drivers/scsi

[PATCH v2 13/21] megaraid_sas: Print BAR information from driver

2019-05-07 Thread Shivasharan S
Add prints for BAR address information during driver load. This helps in debugging issues with BAR address changing during OS boot. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH v2 09/21] megaraid_sas: Enhance internal DCMD timeout prints

2019-05-07 Thread Shivasharan S
Add prints to identify the internal DCMD opcode that has timed out, for debugging. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/megaraid

[PATCH v2 07/21] megaraid_sas: Load balance completions across all MSIx

2019-05-07 Thread Shivasharan S
enabled in firmware. This improves performance and also fixes soft lockups. When load balancing is enabled, IRQ affinity from driver needs to be disabled. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 3 +++ drivers/scs

[PATCH v2 05/21] megaraid_sas: Block PCI config space access from userspace during OCR

2019-05-07 Thread Shivasharan S
7;s config space from userland applications by calling pci_cfg_access_lock() while OCR is in progress and unlocking after controller comes back to ready state. Added helper function which locks the config space before initiating OCR and wait for controller to become READY. Signed-off-by: Shi

[PATCH v2 19/21] megaraid_sas: Fix MSI-x vector print

2019-05-07 Thread Shivasharan S
Print FW supported MSI-x vector count only if FW supports MSI-x. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b

[PATCH v2 10/21] megaraid_sas: Add formatting option for megasas_dump

2019-05-07 Thread Shivasharan S
Add option to format the buffer that is being dumped. Currently, the IO frame and chain frame dumped in the syslog is getting split across multiple lines based on the formatting. Fix this by using KERN_CONT in printk. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi

[PATCH v2 01/21] megaraid_sas: remove unused variable target_index

2019-05-07 Thread Shivasharan S
No functional change. Remove set but unused variable in megasas_set_static_target_properties. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid

[PATCH 12/21] megaraid_sas: Dump system registers for debugging

2019-04-26 Thread Shivasharan S
When controller fails to transition to READY state during driver probe, dump the system interface register set. This will give snapshot of the firmware status for debugging driver load issues. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid

[PATCH 10/21] megaraid_sas: Add formatting option for megasas_dump

2019-04-26 Thread Shivasharan S
Add option to format the buffer that is being dumped. Currently, the IO frame and chain frame dumped in the syslog is getting split across multiple lines based on the formatting. Fix this by using KERN_CONT in printk. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi

[PATCH 15/21] megaraid_sas: Print FW fault information

2019-04-26 Thread Shivasharan S
When driver detects a firmware fault during load, dump additional information on fault code and subcode that will help in debugging. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 2 ++ drivers/scsi/megaraid/megaraid_sas_base.c

[PATCH 19/21] megaraid_sas: Fix MSI-x vector print

2019-04-26 Thread Shivasharan S
Print FW supported MSI-x vector count only if FW supports MSI-x. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b

[PATCH 21/21] megaraid_sas: Update driver version to 07.708.03.00

2019-04-26 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 56b3204d3fc6..e138d1447e43 100644 --- a/drivers/scsi/megaraid

[PATCH 17/21] megaraid_sas: Add prints in suspend and resume path

2019-04-26 Thread Shivasharan S
Add prints in resume/suspend path to help in debugging hibernation issues. The print gives an indication when the driver entry points are called. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 +++ 1 file changed, 3 insertions

[PATCH 11/21] megaraid_sas: Dump system interface regs from sysfs

2019-04-26 Thread Shivasharan S
Add a sysfs interface to dump the controller's system interface registers. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 37 +++ 1 file changed, 37 insertions(+) diff --git a/drivers/scsi/meg

[PATCH 20/21] megaraid_sas: Export RAID map through debugfs

2019-04-26 Thread Shivasharan S
Create a debugfs interface for megaraid_sas driver. Provide interface to dump driver RAID map in debugfs. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/Makefile | 2 +- drivers/scsi/megaraid/megaraid_sas.h | 4 + drivers/scsi

[PATCH 13/21] megaraid_sas: Print BAR information from driver

2019-04-26 Thread Shivasharan S
Add prints for BAR address information during driver load. This helps in debugging issues with BAR address changing during OS boot. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH 14/21] megaraid_sas: Export RAID map id through sysfs

2019-04-26 Thread Shivasharan S
Add a sysfs interface to get the raid map index that is being used by driver. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b

[PATCH 18/21] megaraid_sas: Add debug prints for device list

2019-04-26 Thread Shivasharan S
Add debug prints related to device list being returned by firmware. The a debug flag to activate these prints. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_base.c | 35

[PATCH 16/21] megaraid_sas: Print firmware interrupt status

2019-04-26 Thread Shivasharan S
Add a print to dump the interrupt status in system log for debugging. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/megaraid

[PATCH 07/21] megaraid_sas: Load balance completions across all MSIx

2019-04-26 Thread Shivasharan S
enabled in firmware. This improves performance and also fixes soft lockups. When load balancing is enabled, IRQ affinity from driver needs to be disabled. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 3 +++ drivers/scs

[PATCH 08/21] megaraid_sas: Enhance prints in OCR and TM path

2019-04-26 Thread Shivasharan S
adapter reset. Also, print FastPath IOs that are outstanding. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 4 +- drivers/scsi/megaraid/megaraid_sas_base.c | 69 ++--- drivers/scsi/megaraid/megaraid_sas_fusion.c

[PATCH 05/21] megaraid_sas: Block PCI config space access from userspace during OCR

2019-04-26 Thread Shivasharan S
7;s config space from userland applications by calling pci_cfg_access_lock() while OCR is in progress and unlocking after controller comes back to ready state. Added helper function which locks the config space before initiating OCR and wait for controller to become READY. Signed-off-by: Shi

[PATCH 03/21] megaraid_sas: fw_reset_no_pci_access required for MFI adapters only

2019-04-26 Thread Shivasharan S
fw_reset_no_pci_access is only applicable for MFI controllers and is not used for Fusion controllers. For all Fusion controllers, driver can check reset adapter bit in status register before performing a chip reset, without setting "fw_reset_no_pci_access". Signed-off-by: Shi

[PATCH 06/21] megaraid_sas: IRQ poll to avoid CPU hard lockups

2019-04-26 Thread Shivasharan S
one MSI-x vector is busy doing processing. Select CONFIG_IRQ_POLL from driver Kconfig for driver compilation. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/Kconfig.megaraid | 1 + drivers/scsi/megaraid/megaraid_sas.h| 5 ++ drivers/scsi/meg

[PATCH 02/21] megaraid_sas: Fix calculation of target ID

2019-04-26 Thread Shivasharan S
could end up with the wrong queue depth due to this. Fix target id calculation for channel 1 and 3. Cc: sta...@vger.kernel.org Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/megaraid

[PATCH 09/21] megaraid_sas: Enhance internal DCMD timeout prints

2019-04-26 Thread Shivasharan S
Add prints to identify the internal DCMD opcode that has timed out, for debugging. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/megaraid

[PATCH 01/21] megaraid_sas: remove unused variable target_index

2019-04-26 Thread Shivasharan S
No functional change. Remove set but unused variable in megasas_set_static_target_properties. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid

[PATCH 00/21] megaraid_sas: Driver updates

2019-04-26 Thread Shivasharan S
balancing of IO completions across the available reply queues when combined MSIx mode is disabled in firmware. Patch 8 onwards adds few enhancements to improve debuggability of the driver by printing additional information and provding a debugfs interface to help debug field issues better. Shivasharan S

[PATCH 04/21] megaraid_sas: rework code around controller reset

2019-04-26 Thread Shivasharan S
No functional change. This patch reworks code around controller reset path which gets rid of a couple of goto labels. This is in preparation for the next patch which adds PCI config space access locking while controller reset is in progress. Signed-off-by: Shivasharan S --- drivers/scsi

[PATCH 0/2] megaraid_sas: Update structures for HOST_DEVICE_LIST DCMD

2019-02-08 Thread Shivasharan S
This patchset updates the structures required for HOST_DEVICE_LIST DCMD feature. The second patch updates the driver version for tracking purpose. Patches are based off latest 5.1/scsi-queue. Shivasharan S (2): megaraid_sas: Update structures for HOST_DEVICE_LIST DCMD megaraid_sas: driver

[PATCH 2/2] megaraid_sas: driver version update

2019-02-08 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index eb48ca17dca0..6fd57f7f0b1e 100644 --- a/drivers/scsi/megaraid

[PATCH 1/2] megaraid_sas: Update structures for HOST_DEVICE_LIST DCMD

2019-02-08 Thread Shivasharan S
Add padding to make the structure variables in MR_HOST_DEVICE_LIST_ENTRY 64-bit aligned. Also, add reserved fields to MR_HOST_DEVICE_LIST for future firmware usage. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH V3 3/3] megaraid_sas: Add support for DEVICE_LIST DCMD in driver

2019-01-29 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 49 +- drivers/scsi/megaraid/megaraid_sas_base.c | 222 +--- drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 + drivers/scsi/megaraid/megaraid_sas_fusion.h | 1 + 4 files changed, 250

[PATCH V3 2/3] megaraid_sas: Rework device add code in AEN path

2019-01-29 Thread Shivasharan S
In preparation of adding support for the DEVICE_LIST DCMD, this patch refactors the code in the AEN event handling path. Add new function to update the PD and LD list in driver. Move the code to scan PD and VD channels into separate function. Signed-off-by: Shivasharan S --- drivers/scsi

[PATCH V3 1/3] megaraid_sas: Rework code to get PD and LD list

2019-01-29 Thread Shivasharan S
During FW init, combine the code to get the PD and LD list from FW into a single function. This patch is in preparation for adding support for HOST_DEVICE_LIST DCMD. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 44 ++- 1 file changed

[PATCH V3 0/3] megaraid_sas: Add support for FW device list DCMD

2019-01-29 Thread Shivasharan S
functions added. Shivasharan S (3): megaraid_sas: Rework code to get PD and LD list megaraid_sas: Rework device add code in AEN path megaraid_sas: Add support for DEVICE_LIST DCMD in driver drivers/scsi/megaraid/megaraid_sas.h| 49 +++- drivers/scsi/megaraid/megaraid_sas_base.c | 403

[PATCH V2 3/3] megaraid_sas: Add support for DEVICE_LIST DCMD in driver

2019-01-24 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 49 ++- drivers/scsi/megaraid/megaraid_sas_base.c | 220 +--- drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 + drivers/scsi/megaraid/megaraid_sas_fusion.h | 1 + 4 files changed, 248

[PATCH V2 1/3] megaraid_sas: Rework code to get PD and LD list

2019-01-24 Thread Shivasharan S
During FW init, combine the code to get the PD and LD list from FW into a single function. This patch is in preparation for adding support for HOST_DEVICE_LIST DCMD. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 47 ++- 1 file changed

[PATCH V2 0/3] megaraid_sas: Add support for FW device list DCMD

2019-01-24 Thread Shivasharan S
GET_PD_LIST/GET_LD_LIST_QUERY DCMDs. Changes in V2: - Fixed smatch warnings in Patch 2 as reported by Dan Carpenter - Fixed few checkpatch warnings about unaligned paranthesis in Patches 1 and 3. - Removed one left over debug print in Patch 3 Shivasharan S (3): megaraid_sas: Rework code to get PD and LD

[PATCH V2 2/3] megaraid_sas: Rework device add code in AEN path

2019-01-24 Thread Shivasharan S
In preparation of adding support for the DEVICE_LIST DCMD, this patch refactors the code in the AEN event handling path. Add new function to update the PD and LD list in driver. Move the code to scan PD and VD channels into separate function. Signed-off-by: Shivasharan S --- drivers/scsi

[PATCH 0/3] megaraid_sas: Add support for FW device list DCMD

2019-01-18 Thread Shivasharan S
GET_PD_LIST/GET_LD_LIST_QUERY DCMDs. Shivasharan S (3): megaraid_sas: Rework code to get PD and LD list megaraid_sas: Rework device add code in AEN path megaraid_sas: Add support for DEVICE_LIST DCMD in driver drivers/scsi/megaraid/megaraid_sas.h| 49 +++- drivers/scsi/megaraid

[PATCH 3/3] megaraid_sas: Add support for DEVICE_LIST DCMD in driver

2019-01-18 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 49 +- drivers/scsi/megaraid/megaraid_sas_base.c | 227 +--- drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 + drivers/scsi/megaraid/megaraid_sas_fusion.h | 1 + 4 files changed, 253

[PATCH 2/3] megaraid_sas: Rework device add code in AEN path

2019-01-18 Thread Shivasharan S
In preparation of adding support for the DEVICE_LIST DCMD, this patch refactors the code in the AEN event handling path. Add new function to update the PD and LD list in driver. Move the code to scan PD and VD channels into separate function. Signed-off-by: Shivasharan S --- drivers/scsi

[PATCH 1/3] megaraid_sas: Rework code to get PD and LD list

2019-01-18 Thread Shivasharan S
During FW init, combine the code to get the PD and LD list from FW into a single function. This patch is in preparation for adding support for HOST_DEVICE_LIST DCMD. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 47 ++- 1 file changed

[PATCH] megaraid_sas: Retry reads of outbound_intr_status reg

2019-01-09 Thread Shivasharan S
commit 272652fcbf1a ("scsi: megaraid_sas: add retry logic in megasas_readl") missed changing readl to megasas_readl in megasas_clear_intr_fusion(). For Aero controllers, reads of outbound_intr_status register needs to be retried. Reported-by: Tomas Henzl Signed-off-by: Shi

[PATCH 0/2] megaraid_sas: Fix 64-bit DMA addressing

2018-12-18 Thread Shivasharan S
This patchset fixes an issue with enabling 64-bit DMA for megaraid controllers. The second patch updates the driver version for tracking. Shivasharan S (2): megaraid_sas: Use 63-bit DMA addressing megaraid_sas: driver version update drivers/scsi/megaraid/megaraid_sas.h | 4

[PATCH 1/2] megaraid_sas: Use 63-bit DMA addressing

2018-12-18 Thread Shivasharan S
: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index b2d11e8f56b5..634cc8aed1c7 100644 --- a/drivers/scsi

[PATCH 2/2] megaraid_sas: driver version update

2018-12-18 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 8bfe4c54e4ae..2099c8e9d629 100644 --- a/drivers/scsi/megaraid

[PATCH 4/4] megaraid_sas: add retry logic in megasas_readl

2018-12-17 Thread Shivasharan S
be retried for maximum three times, if read returns zero. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 39 +++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 28 + 2 files changed, 49 insertions(+), 18 deletions

[PATCH 1/4] megaraid_sas: Fix Ventura series based checks

2018-12-17 Thread Shivasharan S
In preparation for the new Aero series adapter type, all the places where we check adapter type for Ventura series needs to include any later adapter types. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 10 +- drivers/scsi/megaraid/megaraid_sas_fp.c

[PATCH 3/4] megaraid_sas: changes to function prototypes

2018-12-17 Thread Shivasharan S
Instead of the register address, pass the instance pointer to clear_intr and read_fw_status_reg functions. This is done in preparation for adding adapter type based checks in these functions in later patches of this series. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h

[PATCH 0/4] megaraid_sas: Fix HW errata in Aero controllers

2018-12-17 Thread Shivasharan S
Below patch series adds workaround for Aero controllers due to a HW errata that returns zero intermittently for read operations. Shivasharan S (4): megaraid_sas: Fix Ventura series based checks megaraid_sas: Introduce new Aero adapter type megaraid_sas: change function prototypes in

[PATCH 2/4] megaraid_sas: Introduce new Aero adapter type

2018-12-17 Thread Shivasharan S
Identify all Aero controller PCI IDs with new adapter type. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_base.c | 18 -- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/megaraid

[PATCH v2] megaraid_sas: Add support for MegaRAID Aero controllers

2018-11-09 Thread Shivasharan S
This patch adds support for MegaRAID Aero controller PCI IDs. Throw a message when a Configurable secure type controller is encountered. Signed-off-by: Shivasharan S --- Changes in v2: Change dev_warn to dev_info. drivers/scsi/megaraid/megaraid_sas.h | 4 drivers/scsi/megaraid

[PATCH] megaraid_sas: Add support for MegaRAID Aero controllers

2018-11-07 Thread Shivasharan S
This patch adds support for MegaRAID Aero controller PCI IDs. Throw a warning message when a Configurable secure type controller is encountered. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 4 drivers/scsi/megaraid/megaraid_sas_base.c | 15

[PATCH V2 19/19] megaraid_sas: Update driver version

2018-10-16 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 994c6ac6f920..8edba2227cd3 100644 --- a/drivers/scsi/megaraid

[PATCH V2 18/19] megaraid_sas: modify max supported lds related print

2018-10-16 Thread Shivasharan S
The print related to number of VDs that a particular firmware supports is misleading in some cases. Even though supportMaxExtLDs is set, certain firmware profiles only supports upto 64VDs. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 6 +++--- 1 file changed, 3

[PATCH V2 16/19] megaraid_sas: increase timeout for IOC INIT to 180seconds

2018-10-16 Thread Shivasharan S
IOC INIT frame needs to be fired with a timeout of 180seconds. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid

[PATCH V2 15/19] megaraid_sas: Remove double endian conversion

2018-10-16 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index b13fd1c601d7..a26abc041435 100644 --- a/drivers

[PATCH V2 14/19] megaraid_sas: Re-use max_mfi_cmds to calculate queue sizes

2018-10-16 Thread Shivasharan S
In megasas_init_adapter_fusion(), max_mfi_cmds is being calcuated as (MEGASAS_FUSION_INTERNAL_CMDS + MEGASAS_FUSION_IOCTL_CMDS). max_mfi_cmds can be used in megasas_configure_queue_sizes. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 +--- 1 file changed, 1

[PATCH V2 17/19] megaraid_sas: remove unused macro

2018-10-16 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 2c044106c35f..994c6ac6f920 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers

[PATCH V2 11/19] megaraid_sas: optimize raid context access in IO path

2018-10-16 Thread Shivasharan S
No functional change. Use local variables when accessing raid context in IO path. Improves code readability. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 74 - 1 file changed, 31 insertions(+), 43 deletions(-) diff --git a/drivers

[PATCH V2 12/19] megaraid_sas: Remove spin lock for dpc operation

2018-10-16 Thread Shivasharan S
Optimization - No need to hold hba_lock in dpc context for reading atomic variable. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi

[PATCH V2 10/19] megaraid_sas: Fail init if heartbeat timer fails

2018-10-16 Thread Shivasharan S
When driver fails to start the heartbeat timer, exit from FW init. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid

[PATCH V2 13/19] megaraid_sas: Rename scratch_pad registers

2018-10-16 Thread Shivasharan S
No functional change. Rename the scratch pad registers to match firmware headers. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 9 +++ drivers/scsi/megaraid/megaraid_sas_base.c | 40 +-- drivers/scsi

[PATCH V2 09/19] megaraid_sas: For SRIOV, do not set STOP_ADP bit

2018-10-16 Thread Shivasharan S
Fix - For SRIOV based adapters, driver should not set the STOP_ADP bit as part of kill adapter. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b

[PATCH V2 08/19] megaraid_sas: Fix combined reply queue mode detection

2018-10-16 Thread Shivasharan S
Fix - For Invader series, if FW supports more than 8 MSI-x vectors, driver needs to enable combined reply queue mode. For Ventura series, driver enables combined reply queue mode in case of more than 16 MSI-x vectors. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi

[PATCH V2 07/19] megaraid_sas: Fix module parameter description

2018-10-16 Thread Shivasharan S
Module parameter description for rdpq_enable incorrectly lists the default as enabled. Also, provide range of valid values for resetwaittime in the description. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[PATCH V2 03/19] megaraid_sas: Fix msleep granularity

2018-10-16 Thread Shivasharan S
much more than 180 seconds causing unnecessary delays during load. Fix - Change the granularity of msleep() call from 1ms to 1000ms. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi

[PATCH V2 01/19] megaraid_sas: Add watchdog thread to detect Firmware fault

2018-10-16 Thread Shivasharan S
immediately. As an additional gain, removing PCI reads from ISR to check FW state results in improved performance as well. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 12 +- drivers/scsi/megaraid/megaraid_sas_base.c | 34

[PATCH V2 06/19] megaraid_sas: Fix goto labels in error handling

2018-10-16 Thread Shivasharan S
Fix - During init, if pci_alloc_irq_vectors() fails, the driver has not yet setup the IRQs. Fix the goto labels and error handling for this case. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a

[PATCH V2 05/19] megaraid_sas: Update copyright information

2018-10-16 Thread Shivasharan S
Change copyright to Broadcom Inc. Also update any references to Avago with Broadcom. Update copyright duration wherever required. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 14 ++ drivers/scsi/megaraid/megaraid_sas_base.c | 18

[PATCH V2 02/19] megaraid_sas: Add support for FW snap dump

2018-10-16 Thread Shivasharan S
. Before initiating an OCR, driver needs to inform FW to save a snapdump and then wait for a specified time for the snapdump to complete. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- Changes in V2: Replace PCI DMA APIs with generic DMA APIs drivers/scsi/megaraid/megaraid_sas.h

[PATCH V2 04/19] megaraid_sas: Add check for reset adapter bit

2018-10-16 Thread Shivasharan S
: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 33 --- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 23cdeca26c53

[PATCH V2 00/19] megaraid_sas: Driver updates

2018-10-16 Thread Shivasharan S
Changes in V2: - Rebased the entire series on top of below patches - "scsi: megaraid_sas: fix a missing-check bug" "megaraid_sas: switch to generic DMA API" - Patch 2/19: Replace PCI DMA APIs with generic DMA APIs. Shivasharan S (19): megaraid_sas: Add watchdog threa

[PATCH 19/19] megaraid_sas: Update driver version

2018-10-12 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 994c6ac6f920..8edba2227cd3 100644 --- a/drivers/scsi/megaraid

[PATCH 17/19] megaraid_sas: remove unused macro

2018-10-12 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 2c044106c35f..994c6ac6f920 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers

[PATCH 18/19] megaraid_sas: modify max supported lds related print

2018-10-12 Thread Shivasharan S
The print related to number of VDs that a particular firmware supports is misleading in some cases. Even though supportMaxExtLDs is set, certain firmware profiles only supports upto 64VDs. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 6 +++--- 1 file changed, 3

[PATCH 15/19] megaraid_sas: Remove double endian conversion

2018-10-12 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 0a8b7167d05d..76ea5dc656b1 100644 --- a/drivers

[PATCH 16/19] megaraid_sas: increase timeout for IOC INIT to 180seconds

2018-10-12 Thread Shivasharan S
IOC INIT frame needs to be fired with a timeout of 180seconds. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid

[PATCH 14/19] megaraid_sas: Re-use max_mfi_cmds to calculate queue sizes

2018-10-12 Thread Shivasharan S
In megasas_init_adapter_fusion(), max_mfi_cmds is being calcuated as (MEGASAS_FUSION_INTERNAL_CMDS + MEGASAS_FUSION_IOCTL_CMDS). max_mfi_cmds can be used in megasas_configure_queue_sizes. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 +--- 1 file changed, 1

  1   2   3   4   >