Re: [PATCH V7 9/9] nvme: hold request queue's refcount in ns's whole lifetime

2019-04-26 Thread Christoph Hellwig
On Sat, Apr 27, 2019 at 06:45:43AM +0800, Ming Lei wrote: > Still no difference between your suggestion and the way in this patch, given > driver specific change is a must. Even it is more clean to hold the > queue refocunt by drivers explicitly because we usually do the get/put pair > in one place

Re: [PATCH V3 1/3] lib/sg_pool.c: improve APIs for allocating sg pool

2019-04-26 Thread Christoph Hellwig
On Sat, Apr 27, 2019 at 06:23:39AM +0800, Ming Lei wrote: > On Fri, Apr 26, 2019 at 04:49:28PM +0200, Christoph Hellwig wrote: > > On Fri, Apr 26, 2019 at 08:53:44AM +0800, Ming Lei wrote: > > > Introduces __sg_alloc_table_chained() and __sg_free_table_chained() with > > > one extra parameter to sp

[PATCH AUTOSEL 5.0 53/79] scsi: csiostor: fix missing data copy in csio_scsi_err_handler()

2019-04-26 Thread Sasha Levin
From: Varun Prakash [ Upstream commit 5c2442fd78998af60e13aba506d103f7f43f8701 ] If scsi cmd sglist is not suitable for DDP then csiostor driver uses preallocated buffers for DDP, because of this data copy is required from DDP buffer to scsi cmd sglist before calling ->scsi_done(). Signed-off-b

[PATCH AUTOSEL 4.19 40/53] scsi: csiostor: fix missing data copy in csio_scsi_err_handler()

2019-04-26 Thread Sasha Levin
From: Varun Prakash [ Upstream commit 5c2442fd78998af60e13aba506d103f7f43f8701 ] If scsi cmd sglist is not suitable for DDP then csiostor driver uses preallocated buffers for DDP, because of this data copy is required from DDP buffer to scsi cmd sglist before calling ->scsi_done(). Signed-off-b

[PATCH AUTOSEL 4.14 22/32] scsi: csiostor: fix missing data copy in csio_scsi_err_handler()

2019-04-26 Thread Sasha Levin
From: Varun Prakash [ Upstream commit 5c2442fd78998af60e13aba506d103f7f43f8701 ] If scsi cmd sglist is not suitable for DDP then csiostor driver uses preallocated buffers for DDP, because of this data copy is required from DDP buffer to scsi cmd sglist before calling ->scsi_done(). Signed-off-b

[PATCH AUTOSEL 4.9 11/16] scsi: csiostor: fix missing data copy in csio_scsi_err_handler()

2019-04-26 Thread Sasha Levin
From: Varun Prakash [ Upstream commit 5c2442fd78998af60e13aba506d103f7f43f8701 ] If scsi cmd sglist is not suitable for DDP then csiostor driver uses preallocated buffers for DDP, because of this data copy is required from DDP buffer to scsi cmd sglist before calling ->scsi_done(). Signed-off-b

[PATCH AUTOSEL 4.4 7/9] scsi: csiostor: fix missing data copy in csio_scsi_err_handler()

2019-04-26 Thread Sasha Levin
From: Varun Prakash [ Upstream commit 5c2442fd78998af60e13aba506d103f7f43f8701 ] If scsi cmd sglist is not suitable for DDP then csiostor driver uses preallocated buffers for DDP, because of this data copy is required from DDP buffer to scsi cmd sglist before calling ->scsi_done(). Signed-off-b

[PATCH AUTOSEL 3.18 6/8] scsi: csiostor: fix missing data copy in csio_scsi_err_handler()

2019-04-26 Thread Sasha Levin
From: Varun Prakash [ Upstream commit 5c2442fd78998af60e13aba506d103f7f43f8701 ] If scsi cmd sglist is not suitable for DDP then csiostor driver uses preallocated buffers for DDP, because of this data copy is required from DDP buffer to scsi cmd sglist before calling ->scsi_done(). Signed-off-b

Re: [PATCH V7 9/9] nvme: hold request queue's refcount in ns's whole lifetime

2019-04-26 Thread Ming Lei
On Fri, Apr 26, 2019 at 10:04:23AM -0700, Bart Van Assche wrote: > On Fri, 2019-04-26 at 17:11 +0200, Christoph Hellwig wrote: > > On Thu, Apr 25, 2019 at 09:00:31AM +0800, Ming Lei wrote: > > > The issue is driver(NVMe) specific, the race window is just between > > > between blk_cleanup_queue() an

Re: [PATCH V7 9/9] nvme: hold request queue's refcount in ns's whole lifetime

2019-04-26 Thread Ming Lei
On Fri, Apr 26, 2019 at 05:11:14PM +0200, Christoph Hellwig wrote: > On Thu, Apr 25, 2019 at 09:00:31AM +0800, Ming Lei wrote: > > The issue is driver(NVMe) specific, the race window is just between > > between blk_cleanup_queue() and removing the ns from the controller namspace > > list in nvme_ns

Re: [PATCH V3 1/3] lib/sg_pool.c: improve APIs for allocating sg pool

2019-04-26 Thread Ming Lei
On Fri, Apr 26, 2019 at 04:49:28PM +0200, Christoph Hellwig wrote: > On Fri, Apr 26, 2019 at 08:53:44AM +0800, Ming Lei wrote: > > Introduces __sg_alloc_table_chained() and __sg_free_table_chained() with > > one extra parameter to specify size of the pre-allocated SGL, then the > > 'first_chunk' SG

Re: [PATCH 2/2] qla2xxx: Silence Sucessful ELS IOCB message

2019-04-26 Thread Ewan D. Milne
On Tue, 2019-04-23 at 14:52 -0700, Himanshu Madhani wrote: > ELS IOCB done message should be moved to verbose logging > to prevent confusion about the error case v/s sucessful > submission case. > > Signed-off-by: Himanshu Madhani > --- > drivers/scsi/qla2xxx/qla_isr.c | 2 +- > 1 file changed,

Re: [PATCH 1/2] qla2xxx: Fix device staying in blocked state

2019-04-26 Thread Ewan D. Milne
On Tue, 2019-04-23 at 14:52 -0700, Himanshu Madhani wrote: > From: Quinn Tran > > This patch fixes issue reported by some of the customers, > who discovered that after cable pull scenario the devices > disappear and path seems to remain in blocked state. Once > the device reappears, driver does n

Re: [PATCH V7 9/9] nvme: hold request queue's refcount in ns's whole lifetime

2019-04-26 Thread Bart Van Assche
On Fri, 2019-04-26 at 17:11 +0200, Christoph Hellwig wrote: > On Thu, Apr 25, 2019 at 09:00:31AM +0800, Ming Lei wrote: > > The issue is driver(NVMe) specific, the race window is just between > > between blk_cleanup_queue() and removing the ns from the controller namspace > > list in nvme_ns_remove

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

2019-04-26 Thread kbuild test robot
Hi Shivasharan, I love your patch! Perhaps something to improve: [auto build test WARNING on mkp-scsi/for-next] [also build test WARNING on v5.1-rc6 next-20190426] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com

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

2019-04-26 Thread kbuild test robot
Hi Shivasharan, I love your patch! Perhaps something to improve: [auto build test WARNING on mkp-scsi/for-next] [also build test WARNING on v5.1-rc6 next-20190426] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com

[RFC PATCH] megaraid_sas: megasas_enable_irq_poll() can be static

2019-04-26 Thread kbuild test robot
Fixes: 6fd317c8bbeb ("megaraid_sas: IRQ poll to avoid CPU hard lockups") Signed-off-by: kbuild test robot --- 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/megaraid_sas_fusion.c i

Re: [PATCH V7 9/9] nvme: hold request queue's refcount in ns's whole lifetime

2019-04-26 Thread Christoph Hellwig
On Thu, Apr 25, 2019 at 09:00:31AM +0800, Ming Lei wrote: > The issue is driver(NVMe) specific, the race window is just between > between blk_cleanup_queue() and removing the ns from the controller namspace > list in nvme_ns_remove() And I wouldn't be surprised if others have the same issue. > >

Re: [PATCH V7 4/9] blk-mq: move all hctx alloction & initialization into __blk_mq_alloc_and_init_hctx

2019-04-26 Thread Christoph Hellwig
On Thu, Apr 25, 2019 at 08:55:43AM +0800, Ming Lei wrote: > It prepares for the following patch, otherwise the whole patch may > become difficult to review. Honestly, I'd find it much easier to review if this was folded into the next patch. That way we only move things around once instead of twic

Re: [PATCH V3 1/3] lib/sg_pool.c: improve APIs for allocating sg pool

2019-04-26 Thread Christoph Hellwig
On Fri, Apr 26, 2019 at 08:53:44AM +0800, Ming Lei wrote: > Introduces __sg_alloc_table_chained() and __sg_free_table_chained() with > one extra parameter to specify size of the pre-allocated SGL, then the > 'first_chunk' SGL can include any number of entries. Can you just update the existing sg_a

Re: [PATCH V3 2/3] scsi: core: avoid to pre-allocate big chunk for protection meta data

2019-04-26 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH V3 3/3] scsi: core: avoid to pre-allocate big chunk for sg list

2019-04-26 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

[PATCH v2 0/2] Ramrod timer and ep state fixes.

2019-04-26 Thread Manish Rangankar
Hi Martin, Please apply the following patches to the scsi tree at your earliest convenience. Changes from v1 -> v2 - Updated commit with description. Thanks, Manish Manish Rangankar (2): qedi: Abort ep termination if offload not scheduled. qedi: Adjust termination and offload ramrod timers.

[PATCH v2 1/2] qedi: Abort ep termination if offload not scheduled.

2019-04-26 Thread Manish Rangankar
Sometimes during connection recovery when there is a failure to resolve ARP, and offload connection was not issued, driver tries to flush pending offload connection work which was not queued up. kernel: WARNING: CPU: 19 PID: 10110 at kernel/workqueue.c:3030 __flush_work.isra.34+0x19c/0x1b0 kernel

[PATCH v2 2/2] qedi: Adjust termination and offload ramrod timers.

2019-04-26 Thread Manish Rangankar
Whenever offload ramrod is issued, firmware wants driver to wait for max 5 sec, otherwise driver can initiate further corrective action. Similarly, when termination ramrod is issued, irrespective of abortive or non-abortive termination driver should wait for 60 sec * max TCP-RT timeout. Signed-off

[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/megaraid_sas_base.c

[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/meg

[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 | 5

[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/dri

[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/megaraid_s

[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(+) diff

[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/megaraid/megaraid_s

[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/megara

[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/dr

[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/megaraid_sas_fus

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

2019-04-26 Thread Shivasharan S
Driver will use "reply descriptor post queues" in round robin fashion when the combined MSI-x mode is not enabled. With this IO completions are distributed and loadbalanced across all the available reply descriptor post queues equally. This is enabled only if combined MSI-x mode is not enabled in

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

2019-04-26 Thread Shivasharan S
This patch enhances the existing debug prints in reset and task management path. These debug prints in adapter reset path helps with debugging issues related to IO timeouts that are seen frequently in the field. Add additional debug prints to dump the pending command frames before initiating a adap

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

2019-04-26 Thread Shivasharan S
While an online controller reset(OCR) is in progress, there is short duration where all access to controller's PCI config space from the host needs to be blocked. This is due to a hardware limitation of MegaRAID controllers. With this patch, driver will block all access to controller's config spac

[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: Shivasharan S --- driv

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

2019-04-26 Thread Shivasharan S
Issue Description: We have seen cpu lock up issues from field if system has greater (more than 96) logical cpu count. SAS3.0 controller (Invader series) supports at max 96 msix vector and SAS3.5 product (Ventura) supports at max 128 msix vectors. This may be a generic issue (if PCI device support

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

2019-04-26 Thread Shivasharan S
In megasas_get_target_prop(), driver is incorrectly calculating the target ID for devices with channel 1 and 3. Due to this, firmware will either fail the command (if there is no device with the target id sent from driver) or could return the properties for a target which was not intended. Devices

[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/megara

[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/megara

[PATCH 00/21] megaraid_sas: Driver updates

2019-04-26 Thread Shivasharan S
Update megaraid_sas to version 07.708.03.00. The initial patch contains a cleanup of unused variable. Next four patches contain driver fixes and enhancements. Patch 6 introduces IRQ polling in megaraid_sas driver to fix CPU hard/soft lockups that we have seen in the field. Patch 7 adds load balanc

[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/megaraid

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-26 Thread Arnd Bergmann
On Thu, Apr 25, 2019 at 11:25 PM Johannes Berg wrote: > On Thu, 2019-04-25 at 17:55 +0200, Arnd Bergmann wrote: > > On Thu, Apr 25, 2019 at 5:35 PM Al Viro wrote: > > > > > > On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote: > > > > > > > If I understand your patch descriptio