Re: [PATCH] sd_zbc: Fix report zones buffer allocation

2019-06-20 Thread Bart Van Assche
On 6/20/19 5:58 PM, Damien Le Moal wrote: The REPORT_ZONES command is executed using scsi_execute_req(). Can we pass a vmalloc-ed buffer to that function ? It does look like it since scsi_execute_rq calls bio_rq_map_kern() which then calls bio_map_kern() which goes through the list of pages of th

Re: [PATCH] sd_zbc: Fix report zones buffer allocation

2019-06-20 Thread Damien Le Moal
Bart, On 2019/06/21 0:25, Bart Van Assche wrote: > On 6/19/19 8:48 PM, Damien Le Moal wrote: >> +/* >> + * Limit the command buffer size to the arbitrary SD_ZBC_REPORT_SIZE >> + * size (1MB), allowing up to 16383 zone descriptors being reported with >> + * a single command. And mak

Re: [PATCH v2 3/3] qla2xxx: Fix NVME cmd and LS cmd timeout race condition

2019-06-20 Thread Quinn Tran
Bart, Yes. It does make sense to combine SRB into nvme_private/scsi_cmnd private. That's is a larger discussion that require our team to buy in + test effort. We are actively discussing this subject. In the mean time, we like other NVME users to not run into this crash until the next submis

Re: [PATCH] scsi: vmw_pscsi: Fix use-after-free in pvscsi_queue_lck()

2019-06-20 Thread Martin K. Petersen
Jan, > Once we unlock adapter->hw_lock in pvscsi_queue_lck() nothing prevents > just queued scsi_cmnd from completing and freeing the request. Thus > cmd->cmnd[0] dereference can dereference already freed request leading > to kernel crashes or other issues (which one of our customers > observed)

Re: [PATCH 0/2] mpt3sas

2019-06-20 Thread Martin K. Petersen
Tomas, > Just few small changes, octal numbers instead of constants etc. Applied to 5.3/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: mvumi: fix build warning

2019-06-20 Thread Martin K. Petersen
Ming, > The local variable 'sg' should be initialized in the failure path of > mvumi_make_sgl(), otherwise the following build warning is triggered: Rolled this fix into the mvumi commit. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: mvumi: fix build warning

2019-06-20 Thread James Bottomley
On Thu, 2019-06-20 at 14:26 +0800, Ming Lei wrote: > The local variable 'sg' should be initialized in the failure path of > mvumi_make_sgl(), otherwise the following build warning is triggered: > > In file included from include/linux/pci-dma-compat.h:8, >from include/

Re: [PATCH] scsi: mvumi: fix build warning

2019-06-20 Thread Bart Van Assche
On 6/19/19 11:26 PM, Ming Lei wrote: The local variable 'sg' should be initialized in the failure path of mvumi_make_sgl(), otherwise the following build warning is triggered: In file included from include/linux/pci-dma-compat.h:8, from include/linux/pci.h:2408,

Re: [PATCH] sd_zbc: Fix report zones buffer allocation

2019-06-20 Thread Bart Van Assche
On 6/19/19 8:48 PM, Damien Le Moal wrote: + /* +* Limit the command buffer size to the arbitrary SD_ZBC_REPORT_SIZE +* size (1MB), allowing up to 16383 zone descriptors being reported with +* a single command. And make sure that this size does not exceed the +

[PATCH v2 03/18] megaraid_sas: Remove few debug counters from IO path

2019-06-20 Thread Chandrakanth Patil
Signed-off-by: Kashyap Desai Signed-off-by: Chandrakanth Patil --- drivers/scsi/megaraid/megaraid_sas.h| 5 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 5 - 2 files changed, 10 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_s

[PATCH v2 08/18] megaraid_sas: Handle sequence JBOD map failure at driver level

2019-06-20 Thread Chandrakanth Patil
Issue: This issue is applicable to scenario when JBOD sequence map is unavailable (memory allocation for JBOD sequence map failed) to driver but feature is supported by firmware. If the driver sends a JBOD IO by not adding 255(MAX_PHYSICAL_DEVICES - 1) to device ID when underlying firmware supports

[PATCH v2 05/18] megaraid_sas: Release Mutex lock before OCR in case of DCMD timeout

2019-06-20 Thread Chandrakanth Patil
Issue: There is possibility of few DCMDs timing out with 'reset_mutex' lock held. As part of DCMD timeout handling, driver calls function megasas_reset_fusion which also tries to acquire same lock 'reset_mutex' and end up with deadlock. Fix: Upon timeout of DCMDs(which are fired with 'reset_mutex'

[PATCH v2 04/18] megaraid_sas: Call disable_irq from process IRQ poll

2019-06-20 Thread Chandrakanth Patil
On PowerPC architecture, calling disable_irq_nosync from IRQ context is not providing the required effect. In current megaraid_sas driver, disable_irq_nosync is being called from IRQ context before enabling IRQ poll. But due to the issue seen on PPC, after IRQ poll disable and legacy ISR is enable

[PATCH v2 09/18] megaraid_sas: megaraid_sas: Add check for count returned by HOST_DEVICE_LIST DCMD

2019-06-20 Thread Chandrakanth Patil
Signed-off-by: Shivasharan S Signed-off-by: Chandrakanth Patil --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 554ec72..a886de3e3 100644 --- a/drivers

[PATCH v2 07/18] megaraid_sas: Don't send FPIO to RL Bypass queue

2019-06-20 Thread Chandrakanth Patil
Firmware does not expect FastPath IO sent through Region Lock Bypass queue. Though firmware never exposes such settings when fastpath IO can be sent to RL bypass queue but it's safer to remove dead code which directs fastpath IO to RL Bypass queue. Signed-off-by: Sumit Saxena Signed-off-by: Chand

[PATCH v2 06/18] megaraid_sas: In probe context, retry IOC INIT once if firmware is in fault

2019-06-20 Thread Chandrakanth Patil
Issue: Under certain conditions, controller goes in FAULT state after IOC INIT fired to firmware. Such Fault can be recovered through controller reset. Fix: In driver probe context, if firmware fault is observed post IOC INIT, driver would do controller reset followed by retry logic for IOC INIT c

[PATCH v2 18/18] megaraid_sas: Update driver version to 07.710.06.00-rc1

2019-06-20 Thread Chandrakanth Patil
Signed-off-by: Chandrakanth Patil --- 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 0b38691..dc0f71f 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h

[PATCH v2 12/18] megaraid_sas: Add support for MPI toolbox commands

2019-06-20 Thread Chandrakanth Patil
Added driver support to allow passthrough MPI toolbox type MFI commands to firmware based on firmware capability. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil --- drivers/scsi/megaraid/megaraid_sas.h| 36 - drivers/scsi/megaraid/megaraid_sas_

[PATCH v2 13/18] megaraid_sas: Add support for High IOPs queues

2019-06-20 Thread Chandrakanth Patil
Aero controllers support balanced performance mode through the ability to configure queues with different properties. 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". The d

[PATCH v2 17/18] megaraid_sas: Introduce various Aero performance modes

2019-06-20 Thread Chandrakanth Patil
For Aero adapters, driver provides three different performance modes controlled through module parameter named- 'perf_mode'. Below are those performance modes: 0: Balanced - Additional high IOPs reply queues will be enabled along with low latency queues. Interrupt coalescing will be enabled

[PATCH v2 11/18] megaraid_sas: Offload Aero RAID5/6 division calculations to driver

2019-06-20 Thread Chandrakanth Patil
For RAID5/RAID6 volumes configured behind Aero, driver will be doing 64bit division operations on behalf of firmware as controller's ARM CPU is very slow in this division. Later, driver calculate Q-ARM, P-ARM and Log-ARM and pass those values to firmware by writing these values to RAID_CONTEXT. Si

[PATCH v2 14/18] megaraid_sas: Enable coalescing for high IOPs queues

2019-06-20 Thread Chandrakanth Patil
Driver should enable interrupt coalescing(during driver load and after Controller Reset) for High IOPs queues by masking appropriate bits in IOC INIT frame. Signed-off-by: Kashyap Desai Signed-off-by: Chandrakanth Patil --- drivers/scsi/megaraid/megaraid_sas.h| 2 +- drivers/scsi/megar

[PATCH v2 15/18] megaraid_sas: Set affinity for high IOPs reply queues

2019-06-20 Thread Chandrakanth Patil
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 IRQs. Driver reserves some reply queues for high iops queues (through pci_alloc_irq_vectors_affinity and .pre_vectors interface). The rest of queues are f

[PATCH v2 10/18] megaraid_sas: RAID1 PCI bandwidth limit algorithm is applicable for only Ventura

2019-06-20 Thread Chandrakanth Patil
RAID1 PCI bandwidth limit algorithm is not applicable to Aero as it's PCIe Gen4 adapter. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 +++ drivers/scsi/megaraid/megaraid_sas_fusion.c | 24 +--- drivers/scs

[PATCH v2 16/18] megaraid_sas: Use high IOPs queues based on IO workload

2019-06-20 Thread Chandrakanth Patil
The driver will use round-robin method for IO submission in batches within the high iops queues when the number of in-flight ios on the target device is larger than 8. Otherwise the driver will use low latency reply queues. Signed-off-by: Kashyap Desai Signed-off-by: Chandrakanth Patil --- driv

[PATCH v2 00/18] megaraid_sas: driver updates to 07.710.06.00-rc1

2019-06-20 Thread Chandrakanth Patil
This patchset contains performance improvements in megaraid_sas driver for latest MegaRAID Aero family of adapters along with few driver fixes. V2: - Fixed sparse warnings reported by kbuild test robot in patch 11. - Fixed module parameter description in patch 17. Chandrakanth Patil (18

[PATCH v2 01/18] megaraid_sas: Add 32 bit atomic descriptor support to AERO adapters

2019-06-20 Thread Chandrakanth Patil
Aero adapters provides Atomic Request Descriptor as an alternative method for posting an entry onto a request queue. The posting of an Atomic Request Descriptor is an atomic operation, providing a safe mechanism for multiple processors on the host to post requests without synchronization. This Atom

[PATCH v2 02/18] megaraid_sas: Add support for Non-secure Aero PCI IDs

2019-06-20 Thread Chandrakanth Patil
This patch will add support for Non-secure Aero adapters' PCI IDs. Driver will throw an error message when a non-secure type controller is detected. Purpose of this interface is to avoid interacting with any firmware which is not secured/signed by Broadcom. Any tampering on Firmware component will

Re: [PATCH 2/2] scsi: mpt3sass: use DEVICE_ATTR_{RO, RW}

2019-06-20 Thread Suganath Prabu Subramani
Acked-by: Suganath Prabu On Fri, Jun 14, 2019 at 8:12 PM Tomas Henzl wrote: > > Use existing macros. No functional change. > > Signed-off-by: Tomas Henzl > --- > drivers/scsi/mpt3sas/mpt3sas_ctl.c | 210 + > 1 file changed, 97 insertions(+), 113 deletions(-) > > di

Re: [PATCH 1/2] scsi: mpt3sas: make driver options visible in sys

2019-06-20 Thread Suganath Prabu Subramani
Acked-by: Suganath Prabu On Fri, Jun 14, 2019 at 8:12 PM Tomas Henzl wrote: > > Support is easier with all driver parameters visible in sysfs. > Also I've replaced a constant with an octal permission. > > Signed-off-by: Tomas Henzl > --- > drivers/scsi/mpt3sas/mpt3sas_base.c | 14 +++-

Re: [PATCH 0/2] mpt3sas

2019-06-20 Thread Suganath Prabu Subramani
Acked-by: Suganath Prabu On Wed, Jun 19, 2019 at 6:34 AM Martin K. Petersen wrote: > > > > Just few small changes, octal numbers instead of constants etc. > > Broadcom folks: Please review! > > -- > Martin K. Petersen Oracle Linux Engineering