[PATCH v2 13/39] megaraid_sas: raid 1 write performance for large io

2017-02-08 Thread Shivasharan S
3870 256K 39203920 Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.c

[PATCH v2 03/39] megaraid_sas: raid 1 fast path code optimize

2017-02-08 Thread Shivasharan S
. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/scsi/megaraid/megaraid_sas_fp.c | 14 +- drivers/scsi/megaraid/megaraid_

[PATCH v2 11/39] megaraid_sas: NVME interface target prop added

2017-02-08 Thread Shivasharan S
This patch fetch true values of NVME property from FW using New DCMD interface MR_DCMD_DEV_GET_TARGET_PROP Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@sus

[PATCH v2 17/39] megaraid_sas: reduce size of fusion_context and use vmalloc if kmalloc fails

2017-02-08 Thread Shivasharan S
Currently fusion context has fixed array load_balance_info. Use dynamic allocation. In few places, driver do not want physically contigious memory. Attempt to use vmalloc if physical contiguous memory is not available. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com>

[PATCH v2 20/39] megaraid_sas: Big endian RDPQ mode fix

2017-02-08 Thread Shivasharan S
Fix if RDPQ mode enabled MR FW is deployed on big endian host machine, driver does not setup reply address correctly. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke &l

[PATCH v2 19/39] megaraid_sas: MR_TargetIdToLdGet u8 to u16 and avoid invalid raid-map access

2017-02-08 Thread Shivasharan S
the only two places where we may see out of range target ids and wants to protect raid map access based on range provided by Firmware API. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> ---

[PATCH v2 12/39] megaraid_sas: NVME fast path io support

2017-02-08 Thread Shivasharan S
This patch provide true fast path IO support. Driver creates PRP for NVME drives and send Fast Path for performance. Certain h/w requirement needs to be taken care in driver. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <k

[PATCH v2 28/39] megaraid_sas: megasas_return_cmd does not memset IO frame to zero

2017-02-08 Thread Shivasharan S
Memset the IO frame to zero after release. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --

[PATCH v2 24/39] megaraid_sas: set pd_after_lb from MR_BuildRaidContext and initialize pDevHandle to MR_DEVHANDLE_INVALID

2017-02-08 Thread Shivasharan S
Issue is limited for Syncro firmware where pd_after_lb is not set but is accidentally used. Not a functional issue, but results in low performance due to improper load balancing between two LUNs. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivash

[PATCH v2 27/39] megaraid_sas: max_fw_cmds are decremented twice, remove duplicate

2017-02-08 Thread Shivasharan S
igned-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/scsi/megara

[PATCH v2 16/39] megaraid_sas: add print in device removal path

2017-02-08 Thread Shivasharan S
Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 19 +++

[PATCH v2 09/39] megaraid_sas: change issue_dcmd to return void from int

2017-02-08 Thread Shivasharan S
return type of issue_dcmd to void and change all callers appropriately. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h| 2 +- drivers/scsi/megaraid/megarai

[PATCH v2 32/39] megaraid_sas: Change build_mpt_mfi_pass_thru to return void

2017-02-08 Thread Shivasharan S
Code refactoring to build_mpt_mfi_pass_thru to return void. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.c

[PATCH v2 14/39] megaraid_sas: set residual bytes count during IO completion

2017-02-08 Thread Shivasharan S
Fixing issue of not setting residual bytes correctly. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.c

[PATCH v2 21/39] megaraid_sas: big endian support changes

2017-02-08 Thread Shivasharan S
Fix endiannes fixes for Ventura specific. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --

[PATCH v2 26/39] megaraid_sas: update can_queue only if the new value is less

2017-02-08 Thread Shivasharan S
Minor Optimization: No need to update HBA can_queue value if the current max FW commands is equal to earlier value. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke &l

[PATCH v2 31/39] megaraid_sas: During OCR, if get_ctrl_info fails do not continue with OCR

2017-02-08 Thread Shivasharan S
Error handling: If controller reset is not able to recover, kill HBA and quit immediately. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Review

[PATCH v2 37/39] megaraid_sas: Indentation and smatch warning fixes

2017-02-08 Thread Shivasharan S
Fix indentation issues and smatch warning reported by Dan Carpenter for previous series as discussed below. http://www.spinics.net/lists/linux-scsi/msg103635.html http://www.spinics.net/lists/linux-scsi/msg103603.html Reported-by: Dan Carpenter Signed-off-by: Kashyap

[PATCH v2 25/39] megaraid_sas: Change max_cmd from u32 to u16 in all functions

2017-02-08 Thread Shivasharan S
Since maximum supported FW commands are all defined as u16, change all local variables referring to max_cmd from u32 to u16. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke &l

[PATCH v2 34/39] megaraid_sas: Use synchronize_irq to wait for IRQs to complete

2017-02-08 Thread Shivasharan S
FIX - Do not use random delay to synchronize with IRQ. Use kernel API. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl

[PATCH v2 36/39] megaraid_sas: Cleanup VD_EXT_DEBUG and SPAN_DEBUG related debug prints

2017-02-08 Thread Shivasharan S
Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas.h| 2

[PATCH v2 08/39] megaraid_sas: megasas_get_request_descriptor always return valid desc

2017-02-08 Thread Shivasharan S
controllers, if there is a valid message frame available, we are guaranteed to get a corresponding request descriptor. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_f

[PATCH v2 02/39] megaraid_sas: cpu select rework.

2017-02-08 Thread Shivasharan S
No functional change. Code refactor. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --

[PATCH v2 07/39] megaraid_sas: Use DID_REQUEUE

2017-02-08 Thread Shivasharan S
Moving to use DID_REQUEUE return type for reliable unconditional retries. Driver wants unconditional re-queue, so replace DID_RESET with DID_REQUEUE Discussed below - https://www.spinics.net/lists/linux-scsi/msg102848.html Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.

[PATCH v2 04/39] megaraid_sas: 32 bit descriptor fire cmd optimization

2017-02-08 Thread Shivasharan S
No functional change. Code refactor. megasas_fire_cmd_fusion can always use 32 bit descriptor write for ventura. No need to pass extra flag. Only IOC INIT required 64 bit Descriptor write. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap

[PATCH v2 15/39] megaraid_sas: enhance debug logs in OCR context

2017-02-08 Thread Shivasharan S
Add additional logging from driver in OCR context. Add debug logs for partial completion of IOs is iodone context. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@sus

[PATCH v2 30/39] megaraid_sas: Do not set fp_possible if TM capable for non-RW syspdIO, change fp_possible to bool

2017-02-08 Thread Shivasharan S
FIX - firmware wants non-RW SYS PD IOs to avoid FastPath for better tracking and other functionalities if the device is task management capable. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewe

[PATCH v2 10/39] megaraid_sas: NVME Interface detection and prop settings

2017-02-08 Thread Shivasharan S
of NVME device. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h| 23 ++-- drivers/scsi/megaraid/megaraid_sas_base.c | 170

[PATCH v2 33/39] megaraid_sas: Bail out the driver load if ld_list_query fails

2017-02-08 Thread Shivasharan S
Error handling: Bail out the driver load if key FW cmds (LD_LIST) are not return successful. Clean up error handling in megasas_init_fw. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes

[PATCH v2 00/39] megaraid_sas: Updates for scsi-next

2017-02-08 Thread Shivasharan S
for flush_scheduled_work Shivasharan S (39): Revert "scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth" megaraid_sas: cpu select rework. megaraid_sas: raid 1 fast path code optimize megaraid_sas: 32 bit descriptor fire cmd optimization megaraid_sas

[PATCH v2 05/39] megaraid_sas: Refactor MEGASAS_IS_LOGICAL macro using sdev

2017-02-08 Thread Shivasharan S
Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas.h

[PATCH v2 01/39] Revert "scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth"

2017-02-08 Thread Shivasharan S
st path did not work as expected. Patch 0013 describes new algorithm and performance number. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas

[PATCH v2 39/39] megaraid_sas: driver version upgrade

2017-02-08 Thread Shivasharan S
Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas.h | 4

[PATCH v2 35/39] megaraid_sas: Increase internal command pool

2017-02-08 Thread Shivasharan S
Fix - increase internal command pool to 8. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --

[PATCH v2 38/39] megaraid_sas: Change RAID_1_10_RMW_CMDS to RAID_1_PEER_CMDS and set value to 2

2017-02-08 Thread Shivasharan S
to RAID_1_PEER_CMDS. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas_fusio

[PATCH v2 06/39] megaraid_sas: RAID map is accessed for SYS PDs when use_seqnum_jbod_fp is not set

2017-02-08 Thread Shivasharan S
Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/s

[PATCH v2 18/39] megaraid_sas: In validate raid map, raid capability is not converted to cpu format for all lds

2017-02-08 Thread Shivasharan S
. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas_fp.c | 13 +

[PATCH v2 23/39] megaraid_sas: latest controller OCR capability from FW before sending shutdown DCMD

2017-02-08 Thread Shivasharan S
sending the DCMD. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_s

[PATCH v2 22/39] megaraid_sas: avoid unaligned access in ioctl path

2017-02-08 Thread Shivasharan S
Fix kernel warning for accessing unaligned memory access in driver. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl

[PATCH v2 29/39] megaraid_sas: Remove unused pd_index from megasas_build_ld_nonrw_fusion

2017-02-08 Thread Shivasharan S
Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c |

[PATCH 01/39] Revert "scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth"

2017-02-06 Thread Shivasharan S
st path did not work as expected. Patch 0011 describes new algorithm and performance number. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h| 8 - drivers/s

[PATCH 06/39] megaraid_sas: RAID map is accessed for SYS PDs when use_seqnum_jbod_fp is not set

2017-02-06 Thread Shivasharan S
Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/s

[PATCH 05/39] megaraid_sas: Refactor MEGASAS_IS_LOGICAL macro using sdev

2017-02-06 Thread Shivasharan S
Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h| 4 ++-- drivers/scsi/megaraid/megaraid_sas_base.c | 20 ++-- drivers/s

[PATCH 03/39] megaraid_sas: raid 1 fast path code optimize

2017-02-06 Thread Shivasharan S
command is decided using r1_alt_dev_handle only. Move resetting megasas_cmd_fusion fields at common function megasas_return_cmd_fusion. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/s

[PATCH 04/39] megaraid_sas: 32 bit descriptor fire cmd optimization

2017-02-06 Thread Shivasharan S
No functional change. Code refactor. megasas_fire_cmd_fusion can always use 32 bit descriptor write for ventura. No need to pass extra flag. Only IOC INIT required 64 bit Descriptor write. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap

[PATCH 00/39] megaraid_sas: Updates for scsi-next

2017-02-06 Thread Shivasharan S
Shivasharan S (39): Revert "scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth" megaraid_sas: cpu select rework. megaraid_sas: raid 1 fast path code optimize megaraid_sas: 32 bit descriptor fire cmd optimization megaraid_sas

[PATCH 02/39] megaraid_sas: cpu select rework.

2017-02-06 Thread Shivasharan S
No functional change. Code refactor. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 175 1 file changed, 100 inser

[PATCH 08/39] megaraid_sas: megasas_get_request_descriptor always return valid desc

2017-02-06 Thread Shivasharan S
No functional change. Code clean up. Removing error code which is not valid scenario. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 4 +--- drivers/s

[PATCH 09/39] megaraid_sas: NVME Interface detection and prop settings

2017-02-06 Thread Shivasharan S
of NVME device. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h| 23 ++-- drivers/scsi/megaraid/megaraid_sas_base.c | 170

[PATCH 11/39] megaraid_sas: NVME interface target prop added

2017-02-06 Thread Shivasharan S
This patch depends on patch 0008. This patch fetch true values of NVME property from FW using New DCMD interface MR_DCMD_DEV_GET_TARGET_PROP Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/s

[PATCH 10/39] megaraid_sas: NVME interface target prop added

2017-02-06 Thread Shivasharan S
This patch depends on patch 0008. This patch fetch true values of NVME property from FW using New DCMD interface MR_DCMD_DEV_GET_TARGET_PROP Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/s

[PATCH 14/39] megaraid_sas: enhance debug logs in OCR context

2017-02-06 Thread Shivasharan S
Add additional logging from driver in OCR context. Add debug logs for partial completion of IOs is iodone context. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h

[PATCH 20/39] megaraid_sas: big endian support changes

2017-02-06 Thread Shivasharan S
Fix endiannes fixes for Ventura specific. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_fp.c | 15 ++-- drivers/scsi/megaraid/megaraid_sas_fu

[PATCH 17/39] megaraid_sas: In validate raid map, raid capability is not converted to cpu format for all lds

2017-02-06 Thread Shivasharan S
. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_fp.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid

[PATCH 16/39] megaraid_sas: reduce size of fusion_context and use vmalloc if kmalloc fails

2017-02-06 Thread Shivasharan S
Currently fusion context has fixed array load_balance_info. Use dynamic allocation. In few places, driver do not want physically contigious memory. Attempt to use vmalloc if physical contiguous memory is not available. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com>

[PATCH 28/39] megaraid_sas: Remove unused pd_index from megasas_build_ld_nonrw_fusion

2017-02-06 Thread Shivasharan S
Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas

[PATCH 23/39] megaraid_sas: set pd_after_lb from MR_BuildRaidContext and initialize pDevHandle to MR_DEVHANDLE_INVALID

2017-02-06 Thread Shivasharan S
Issue is limited for Syncro firmware where pd_after_lb is not set but is accidentally used. Not a functional issue, but results in low performance due to improper load balancing between two LUNs. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivash

[PATCH 15/39] megaraid_sas: add print in device removal path

2017-02-06 Thread Shivasharan S
Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/s

[PATCH 25/39] megaraid_sas: update can_queue only if the new value is less

2017-02-06 Thread Shivasharan S
Minor Optimization: No need to update HBA can_queue value if the current max FW commands is equal to earlier value. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_

[PATCH 29/39] megaraid_sas: Do not set fp_possible if TM capable for non-RW syspdIO, change fp_possible to bool

2017-02-06 Thread Shivasharan S
FIX - firmware wants non-RW SYS PD IOs to avoid FastPath for better tracking and other functionalities if the device is task management capable. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> ---

[PATCH 21/39] megaraid_sas: avoid unaligned access in ioctl path

2017-02-06 Thread Shivasharan S
Fix kernel warning for accessing unaligned memory access in driver. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 4 +++- 1 file changed, 3 insertions(+)

[PATCH 07/39] megaraid_sas: Use DID_REQUEUE

2017-02-06 Thread Shivasharan S
Moving to use DID_REQUEUE return type for reliable unconditional retries. Driver wants unconditional re-queue, so replace DID_RESET with DID_REQUEUE Discussed below - https://www.spinics.net/lists/linux-scsi/msg102848.html Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.

[PATCH 12/39] megaraid_sas: raid 1 write performance for large io

2017-02-06 Thread Shivasharan S
3870 256K 39203920 Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h| 5 + drivers/scsi/megaraid/megaraid_sas_f

[PATCH 32/39] megaraid_sas: Bail out the driver load if ld_list_query fails

2017-02-06 Thread Shivasharan S
Error handling: Bail out the driver load if key FW cmds (LD_LIST) are not return successful. Clean up error handling in megasas_init_fw. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/s

[PATCH 30/39] megaraid_sas: During OCR, if get_ctrl_info fails do not continue with OCR

2017-02-06 Thread Shivasharan S
Error handling: If controller reset is not able to recover, kill HBA and quit immediately. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 + 1 fil

[PATCH 26/39] megaraid_sas: max_fw_cmds are decremented twice, remove duplicate

2017-02-06 Thread Shivasharan S
igned-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 2bfdf6b..e74cbe6d 10064

[PATCH 19/39] megaraid_sas: Big endian RDPQ mode fix

2017-02-06 Thread Shivasharan S
Fix if RDPQ mode enabled MR FW is deployed on big endian host machine, driver does not setup reply address correctly. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_

[PATCH 27/39] megaraid_sas: megasas_return_cmd does not memset IO frame to zero

2017-02-06 Thread Shivasharan S
Memset the IO frame to zero after release. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_base.c | 10 ++-

[PATCH 24/39] megaraid_sas: Change max_cmd from u32 to u16 in all functions

2017-02-06 Thread Shivasharan S
Since maximum supported FW commands are all defined as u16, change all local variables referring to max_cmd from u32 to u16. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/s

[PATCH 18/39] megaraid_sas: MR_TargetIdToLdGet u8 to u16 and avoid invalid raid-map access

2017-02-06 Thread Shivasharan S
If MR_TargetIdToLdGet return >= 0xFF, it is invalid entry. Consider that entry as invalid and do not access raid map for further operation. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- driver

[PATCH 22/39] megaraid_sas: latest controller OCR capability from FW before sending shutdown DCMD

2017-02-06 Thread Shivasharan S
sending the DCMD. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_s

[PATCH 13/39] megaraid_sas : set residual bytes count during IO compeltion

2017-02-06 Thread Shivasharan S
Fixing issue of not setting residual bytes correctly. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 10 ++ 1 file changed, 10 insertions(+)

[PATCH 39/39] megaraid_sas: driver version upgrade

2017-02-06 Thread Shivasharan S
Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/

[PATCH 36/39] megaraid_sas: Cleanup VD_EXT_DEBUG and SPAN_DEBUG related debug prints

2017-02-06 Thread Shivasharan S
Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h| 2 - drivers/scsi/megaraid/megaraid_sas_base.c | 15 -- drivers/scsi/megaraid/megaraid_sas_fp

[PATCH 38/39] megaraid_sas: Change RAID_1_10_RMW_CMDS to RAID_1_PEER_CMDS and set value to 2

2017-02-06 Thread Shivasharan S
to RAID_1_PEER_CMDS. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 +- 2 files changed, 2 insertions(+),

[PATCH 37/39] megaraid_sas: Indentation and smatch warning fixes

2017-02-06 Thread Shivasharan S
Fix indentation issues and smatch warning reported by Dan Carpenter for previous series as discussed below. http://www.spinics.net/lists/linux-scsi/msg103635.html http://www.spinics.net/lists/linux-scsi/msg103603.html Reported-by: Dan Carpenter Signed-off-by: Kashyap

[PATCH 35/39] megaraid_sas: Increase internal command pool

2017-02-06 Thread Shivasharan S
Fix - increase internal command pool to 8. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas.h| 2 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- 2 f

[PATCH 34/39] megaraid_sas: Use synchronize_irq to wait for IRQs to complete

2017-02-06 Thread Shivasharan S
FIX - Do not use random delay to synchronize with IRQ. Use kernel API. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 20 ++-- 1 file

[PATCH 33/39] megaraid_sas: call flush_scheduled_work during controller shutdown/detach

2017-02-06 Thread Shivasharan S
Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/s

[PATCH 31/39] megaraid_sas: Change build_mpt_mfi_pass_thru to return void

2017-02-06 Thread Shivasharan S
Code refactoring to build_mpt_mfi_pass_thru to return void. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 10 ++ 1 file changed, 2 inse

[PATCH v3 12/39] megaraid_sas: NVME fast path io support

2017-02-10 Thread Shivasharan S
This patch provide true fast path IO support. Driver creates PRP for NVME drives and send Fast Path for performance. Certain h/w requirement needs to be taken care in driver. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <k

[PATCH v3 31/39] megaraid_sas: During OCR, if get_ctrl_info fails do not continue with OCR

2017-02-10 Thread Shivasharan S
Error handling: If controller reset is not able to recover, kill HBA and quit immediately. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Review

[PATCH v3 22/39] megaraid_sas: avoid unaligned access in ioctl path

2017-02-10 Thread Shivasharan S
Fix kernel warning for accessing unaligned memory access in driver. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl

[PATCH v3 09/39] megaraid_sas: change issue_dcmd to return void from int

2017-02-10 Thread Shivasharan S
With the changes to remove checks for a valid request descriptor, issue_dcmd will now always return DCMD_SUCCESS. This patch changes return type of issue_dcmd to void and change all callers appropriately. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Sign

[PATCH v3 19/39] megaraid_sas: MR_TargetIdToLdGet u8 to u16 and avoid invalid raid-map access

2017-02-10 Thread Shivasharan S
of range target ids and wants to protect raid map access based on range provided by Firmware API. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> --- fix in v2 - updated description content.

[PATCH v3 17/39] megaraid_sas: reduce size of fusion_context and use vmalloc if kmalloc fails

2017-02-10 Thread Shivasharan S
Currently fusion context has fixed array load_balance_info. Use dynamic allocation. In few places, driver do not want physically contigious memory. Attempt to use vmalloc if physical contiguous memory is not available. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com>

[PATCH v3 16/39] megaraid_sas: add print in device removal path

2017-02-10 Thread Shivasharan S
Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas_base.c | 19 +++

[PATCH v3 01/39] Revert "scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth"

2017-02-10 Thread Shivasharan S
st path did not work as expected. Patch 0013 describes new algorithm and performance number. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas

[PATCH v3 05/39] megaraid_sas: Refactor MEGASAS_IS_LOGICAL macro using sdev

2017-02-10 Thread Shivasharan S
Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas.h

[PATCH v3 02/39] megaraid_sas: cpu select rework.

2017-02-10 Thread Shivasharan S
No functional change. Code refactor. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --

[PATCH v3 10/39] megaraid_sas: NVME Interface detection and prop settings

2017-02-10 Thread Shivasharan S
of NVME device. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/meg

[PATCH v3 04/39] megaraid_sas: 32 bit descriptor fire cmd optimization

2017-02-10 Thread Shivasharan S
No functional change. Code refactor. megasas_fire_cmd_fusion can always use 32 bit descriptor write for ventura. No need to pass extra flag. Only IOC INIT required 64 bit Descriptor write. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap

[PATCH v3 14/39] megaraid_sas: set residual bytes count during IO completion

2017-02-10 Thread Shivasharan S
Fixing issue of not setting residual bytes correctly. Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.c

[PATCH v3 23/39] megaraid_sas: latest controller OCR capability from FW before sending shutdown DCMD

2017-02-10 Thread Shivasharan S
sending the DCMD. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_s

[PATCH v3 33/39] megaraid_sas: Bail out the driver load if ld_list_query fails

2017-02-10 Thread Shivasharan S
Error handling: Bail out the driver load if key FW cmds (LD_LIST) are not return successful. Clean up error handling in megasas_init_fw. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes

[PATCH v3 06/39] megaraid_sas: RAID map is accessed for SYS PDs when use_seqnum_jbod_fp is not set

2017-02-10 Thread Shivasharan S
Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/

[PATCH v3 26/39] megaraid_sas: update can_queue only if the new value is less

2017-02-10 Thread Shivasharan S
Minor Optimization: No need to update HBA can_queue value if the current max FW commands is equal to earlier value. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke &l

[PATCH v3 29/39] megaraid_sas: Remove unused pd_index from megasas_build_ld_nonrw_fusion

2017-02-10 Thread Shivasharan S
Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --- drivers/scsi/megaraid/megaraid_sas_fusion.c |

[PATCH v3 28/39] megaraid_sas: megasas_return_cmd does not memset IO frame to zero

2017-02-10 Thread Shivasharan S
Memset the IO frame to zero after release. Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Tomas Henzl <the...@redhat.com> --

[PATCH v3 07/39] megaraid_sas: Use DID_REQUEUE

2017-02-10 Thread Shivasharan S
Moving to use DID_REQUEUE return type for reliable unconditional retries. Driver wants unconditional re-queue, so replace DID_RESET with DID_REQUEUE Discussed below - https://www.spinics.net/lists/linux-scsi/msg102848.html Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.

  1   2   3   >