Re: possible circular locking dependency detected [was: linux-next: Tree for Aug 22]

2017-08-23 Thread Peter Zijlstra
On Wed, Aug 23, 2017 at 09:03:04AM +0900, Byungchul Park wrote: > On Tue, Aug 22, 2017 at 09:43:56PM +, Bart Van Assche wrote: > The report is talking about the following lockup: > > A work in a worker A task work on exit to user > -- --

Re: [v4.13-rc BUG] system lockup when running big buffered write(4M) to IB SRP via mpath

2017-08-23 Thread Ming Lei
On Wed, Aug 09, 2017 at 05:10:01PM +, Bart Van Assche wrote: > On Wed, 2017-08-09 at 12:43 -0400, Laurence Oberman wrote: > > Your latest patch on stock upstream without Ming's latest patches is > > behaving for me. > > > > As already mentioned, the requeue -11 and clone failure messages are

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

2017-08-23 Thread Shivasharan S
Changes from v2: - Patch 9: Updated patch description - Dropped patch 11 of the last series. As per discussion with Christoph Hellwig, there was concern over the blk-mq specific hack in the changes. Also this needs to be tested with latest blk-mq performance improvements patchset from Ming.

[PATCH v3 02/14] megaraid_sas: set minimum value of resetwaittime to be 1 secs

2017-08-23 Thread Shivasharan S
Setting resetwaittime to 0 during a FW fault will result in driver not calling the OCR. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: sta...@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++- 1 file chan

[PATCH v3 05/14] megaraid_sas: Do not re-fire shutdown DCMD after OCR

2017-08-23 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/mega

[PATCH v3 03/14] megaraid_sas: Use synchronize_irq in target reset case

2017-08-23 Thread Shivasharan S
Similar to task abort case, use synchronize_irq API in target reset case. Also, remove redundant call to megasas_complete_cmd_dpc_fusion after calling megasas_sync_irqs in task abort case. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas

[PATCH v3 01/14] megaraid_sas: mismatch of allocated MFI frame size and length exposed in MFI MPT pass through command

2017-08-23 Thread Shivasharan S
Fix - Driver allocated 256 byte MFI frames bytes but while sending MFI frame (embedded inside chain frame of MPT frame) to firmware, driver sets the length as 4k. This results in DMA read error messages during boot. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: sta...@vger.ke

[PATCH v3 04/14] megaraid_sas: Call megasas_complete_cmd_dpc_fusion every 1 second while there are pending commands

2017-08-23 Thread Shivasharan S
Fix - megasas_wait_for_outstanding_fusion checks for pending commands every 1second. But megasas_complete_cmd_dpc_fusion is only called every 5seconds. If the commands are already completed by firmware, there is an additional delay of 5seconds before driver will process completion for these command

[PATCH v3 06/14] megaraid_sas: Fix endianness issues in DCMD handling

2017-08-23 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl --- drivers/scsi/megaraid/megaraid_sas_base.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/m

[PATCH v3 07/14] megaraid_sas: Check valid aen class range to avoid kernel panic

2017-08-23 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: sta...@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl --- drivers/scsi/megaraid/megaraid_sas_base.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/driv

[PATCH v3 09/14] megaraid_sas: use vmalloc for crash dump buffers and driver's local RAID map

2017-08-23 Thread Shivasharan S
Driver's local RAID map is accessed frequently. We will first try to get memory from __get_free_pages. If this fails, fall back to using vmalloc. For crash dump buffers always prefer vmalloc. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tom

[PATCH v3 08/14] megaraid_sas: Use SMID for Task abort case only

2017-08-23 Thread Shivasharan S
Fix - In TM code, smid_task is valid only in case of task aborts. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -

[PATCH v3 10/14] megaraid_sas: Return pended IOCTLs with cmd_status MFI_STAT_WRONG_STATE in case adapter is dead

2017-08-23 Thread Shivasharan S
Fix - After a kill adapter, since the cmd_status is not set the IOCTLs will be hung in driver resulting in application hang. Set cmd_status MFI_STAT_WRONG_STATE when completing pended IOCTLs. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: sta...@vger.kernel.org Reviewed-by: Hannes

[PATCH v3 12/14] megaraid_sas: modified few prints in OCR and IOC INIT path

2017-08-23 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion

[PATCH v3 14/14] megaraid_sas: driver version upgrade

2017-08-23 Thread Shivasharan S
Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl --- 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 6d9f111..a6722c9

[PATCH v3 13/14] megaraid_sas: call megasas_dump_frame with correct IO frame size

2017-08-23 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/m

[PATCH v3 11/14] megaraid_sas: replace internal FALSE/TRUE definitions with false/true

2017-08-23 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl --- drivers/scsi/megaraid/megaraid_sas_fp.c | 40 + 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas

Re: [Regression 4.13-rc1] Resume does not work on Lenovo X60t

2017-08-23 Thread Christoph Hellwig
Are you running with blk-mq enabled? Also this never occured with 4.12, right? Were you also running with or without blk-mq for scsi there?

Re: [Regression 4.13-rc1] Resume does not work on Lenovo X60t

2017-08-23 Thread Paul Menzel
Dear Christoph, On 08/23/17 13:48, Christoph Hellwig wrote: Are you running with blk-mq enabled? Also this never occured with 4.12, right? Were you also running with or without blk-mq for scsi there? To my knowledge, I am using the defaults from Debian 9. I’ll check in one week, as I am aw

Re: [v4.13-rc BUG] system lockup when running big buffered write(4M) to IB SRP via mpath

2017-08-23 Thread Ming Lei
On Wed, Aug 23, 2017 at 07:35:26PM +0800, Ming Lei wrote: > On Wed, Aug 09, 2017 at 05:10:01PM +, Bart Van Assche wrote: > > On Wed, 2017-08-09 at 12:43 -0400, Laurence Oberman wrote: > > > Your latest patch on stock upstream without Ming's latest patches is > > > behaving for me. > > > > > >

Re: [PATCH] storvsc: do not assume SG list is continuous when doing bounce buffers (for 4.1 stable only)

2017-08-23 Thread Greg KH
On Tue, Aug 22, 2017 at 11:43:19PM -0700, Christoph Hellwig wrote: > Ok. If the stable maintainers are ok with your small fix > I'm not going to complain too loudly. But I'm always worried about > stable trees divering too much from mainline. Given that 90% of the time we do this, something brea

[PATCH] scsi: lpfc: avoid false-positive gcc-8 warning

2017-08-23 Thread Arnd Bergmann
This is an interesting regression with gcc-8, showing a harmless warning for correct code: In file included from include/linux/kernel.h:13:0, ... from drivers/scsi/lpfc/lpfc_debugfs.c:23: include/linux/printk.h:301:2: error: 'eq' may be used uninitialized in this

Re: [GIT PULL] SCSI fixes for 4.13-rc6

2017-08-23 Thread Bart Van Assche
On Wed, 2017-08-23 at 07:42 +0100, James Bottomley wrote: > Six minor and error leg fixes, plus one major change: the reversion of > scsi-mq as the default. We're doing the latter temporarily (with a > backport to stable) to give us time to fix all the issues that turned > up with this default bef

Re: [v4.13-rc BUG] system lockup when running big buffered write(4M) to IB SRP via mpath

2017-08-23 Thread Bart Van Assche
On Wed, 2017-08-23 at 19:35 +0800, Ming Lei wrote: > soft lockup still can be observed easily with patch d4acf3650c7c( > block: Make blk_mq_delay_kick_requeue_list() rerun the queue at a quiet time), > but no hard lockup. Hello Ming, I never claimed that commit d4acf3650c7c was a full solution to

Re: [PATCH] storvsc: do not assume SG list is continuous when doing bounce buffers (for 4.1 stable only)

2017-08-23 Thread Martin K. Petersen
Christoph, > Ok. If the stable maintainers are ok with your small fix > I'm not going to complain too loudly. But I'm always worried about > stable trees divering too much from mainline. The seemingly innocuous transition from SG_GAPS to virt boundary has caused several data corruption regress

Re: [GIT PULL] SCSI fixes for 4.13-rc6

2017-08-23 Thread Martin K. Petersen
Hi Bart, > Had you noticed that Damien had asked not to send the "sd_zbc: Write > unlock zone from sd_uninit_cmnd()" patch to Linus without my "scsi-mq: > Always unprepare before requeuing a request" patch? He did change his mind later in that thread, though. However, what's more important is t

Re: [GIT PULL] SCSI fixes for 4.13-rc6

2017-08-23 Thread Bart Van Assche
On Wed, 2017-08-23 at 11:27 -0400, Martin K. Petersen wrote: > However, what's more important is that we still need a good version of > your patch for 4.13. I took Brian's workaround for ipr but I still think > Christoph's concerns need to be addressed for me to put your change back > in. Hello Ma

Re: [PATCH] scsi: qedf: Fix a potential NULL pointer dereference

2017-08-23 Thread Chad Dupuis
On Sun, 20 Aug 2017, 1:09pm, Christophe JAILLET wrote: > At the beginning of 'qedf_srr_compl()' and of 'qedf_rec_compl()', we check > if 'orig_io_req' is NULL. If this happens, a NULL pointer dereference will > occur in the error handling path. > > Fix it by adding an additionnal label in the er

Re: [v4.13-rc BUG] system lockup when running big buffered write(4M) to IB SRP via mpath

2017-08-23 Thread Ming Lei
On Wed, Aug 23, 2017 at 11:12 PM, Bart Van Assche wrote: > On Wed, 2017-08-23 at 19:35 +0800, Ming Lei wrote: >> soft lockup still can be observed easily with patch d4acf3650c7c( >> block: Make blk_mq_delay_kick_requeue_list() rerun the queue at a quiet >> time), >> but no hard lockup. > > Hello

Re: [PATCH] scsi: lpfc: remove useless code in lpfc_sli4_bsg_link_diag_test

2017-08-23 Thread James Smart
On 8/22/2017 1:53 PM, Gustavo A. R. Silva wrote: Remove variable assignments. The value stored in local variable _rc_ is overwritten at line 2448:rc = lpfc_sli4_bsg_set_link_diag_state(phba, 0); before it can be used. Addresses-Coverity-ID: 1226935 Signed-off-by: Gustavo A. R. Silva --- This is

Re: [PATCH] scsi: lpfc: avoid false-positive gcc-8 warning

2017-08-23 Thread James Smart
On 8/23/2017 8:01 AM, Arnd Bergmann wrote: This is an interesting regression with gcc-8, showing a harmless warning for correct code: In file included from include/linux/kernel.h:13:0, ... from drivers/scsi/lpfc/lpfc_debugfs.c:23: include/linux/printk.h:301:2:

[PATCH] scsi_transport_sas: Fix error handling in sas_smp_request()

2017-08-23 Thread Bart Van Assche
sas_function_template.smp_handler implementations either return 0 or a Unix error code. Convert that error code into a SCSI result. This patch is what I came up with after having analyzed the following sparse warnings: drivers/scsi/scsi_transport_sas.c:187:21: warning: incorrect type in assignment

Re: [PATCH] scsi: lpfc: avoid false-positive gcc-8 warning

2017-08-23 Thread Arnd Bergmann
On Wed, Aug 23, 2017 at 5:01 PM, Arnd Bergmann wrote: > This is an interesting regression with gcc-8, showing a harmless > warning for correct code: > > In file included from include/linux/kernel.h:13:0, > ... > from drivers/scsi/lpfc/lpfc_debugfs.c:23: > include/

Re: [GIT PULL] SCSI fixes for 4.13-rc6

2017-08-23 Thread Brian King
On 08/23/2017 10:44 AM, Bart Van Assche wrote: > On Wed, 2017-08-23 at 11:27 -0400, Martin K. Petersen wrote: >> However, what's more important is that we still need a good version of >> your patch for 4.13. I took Brian's workaround for ipr but I still think >> Christoph's concerns need to be addr

Re: [PATCH 0/2] generate uevent for SCSI sense code

2017-08-23 Thread Song Liu
Dear Hannes and James, Could you please kindly review this patch and let me know what do we need to move forward with this? Thanks and Regards, Song > On Aug 4, 2017, at 10:18 AM, Song Liu wrote: > > Hi all, > > Could you please share your feedback on this version of the change? > > Tha

[PATCH] Improve requeuing behavior

2017-08-23 Thread Bart Van Assche
Requests are unprepared and reprepared when being requeued. Avoid that requeuing resets .jiffies_at_alloc and .retries by initializing these two member variables from inside blk_get_request() and by preserving both member variables when preparing a request. This patch affects the requeuing behavior

[PATCH 00/19] SCSI patches for kernel v4.14

2017-08-23 Thread Bart Van Assche
Hello Martin, The patches in this series fall into two categories: - Two patches are related to using blk_mq_rq_to_pdu() instead of struct request.special. - Seventeen patches suppress warnings reported by static analysis tools. These tools are very useful but unfortunately the current code

[PATCH 03/19] Suppress gcc 7 fall-through warnings reported with W=1

2017-08-23 Thread Bart Van Assche
The conclusion of a recent discussion about the new warnings reported by gcc 7 is that the new warnings reported when building with W=1 should be suppressed. However, gcc 7 still warns about fall-through in switch statements when building with W=1. Suppress these warnings by annotating the SCSI cor

[PATCH 01/19] Remove an obsolete function declaration

2017-08-23 Thread Bart Van Assche
Commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request") removed the scsi_get_command() function. Hence also remove the declaration of that function. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn --- include/scsi/s

[PATCH 04/19] Convert a strncmp() call into a strcmp() call

2017-08-23 Thread Bart Van Assche
This patch avoids that smatch reports the following warning: drivers/scsi/scsi_sysfs.c:117: check_set() error: strncmp() '"-"' too small (2 vs 20) Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn --- drivers/scsi/scsi_sysfs.c | 2 +- 1 file cha

[PATCH 02/19] Avoid sign extension of scsi_device.type

2017-08-23 Thread Bart Van Assche
This patch avoids that smatch reports the following: drivers/scsi/scsi_sysfs.c:506 scsi_bus_uevent() warn: argument 3 to %02x specifier has type 'char' drivers/scsi/scsi_sysfs.c:872 sdev_show_modalias() warn: argument 4 to %02x specifier has type 'char' Signed-off-by: Bart Van Assche Cc: Chris

[PATCH 05/19] scsi_setup_fs_cmnd(): Call scsi_req_init() instead of open-coding it

2017-08-23 Thread Bart Van Assche
The functional changes in this patch for scsi_setup_fs_cmnd() are: - scsi_request.sense_len is cleared. This is OK since it is the responsibility of the LLD to set .sense_len before calling .scsi_done(). - scsi_request.cmd_len is changed to BLK_MAX_CDB. This is fine since scsi_driver.init_com

[PATCH 07/19] Fix RCU handling of scsi_device.vpd_pg8[03]

2017-08-23 Thread Bart Van Assche
Only annotate pointers that are shared across threads with __rcu. Use rcu_dereference() when dereferencing an RCU pointer. Protect also the RCU pointer dereferences when freeing RCU pointers. This patch suppresses about twenty sparse complaints about the vpd_pg8[03] pointers. Fixes: commit 09e2b0b

[PATCH 08/19] Use blk_mq_rq_to_pdu() to convert a request to a SCSI command pointer

2017-08-23 Thread Bart Van Assche
Since commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request") struct request and struct scsi_cmnd are adjacent. This means that there is now an alternative to reading req->special to convert a pointer to a prepared request into a SCSI command pointer, namely by using b

[PATCH 06/19] Document which queue type a function is intended for

2017-08-23 Thread Bart Van Assche
Document which queue type a function is intended for if this is not easy to derive from the function name. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Johannes Thumshirn --- drivers/scsi/scsi_lib.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/driv

[PATCH 09/19] sd, sr: Convert two assignments into warning statements

2017-08-23 Thread Bart Van Assche
Before scsi_prep_fn() calls the ULP .init_command() callback function it stores the SCSI command pointer in request.special. This means that the SCpnt = rq->special assignments in the sd and sr drivers assign a pointer to itself. Hence convert these two assignment statements into warning statements

[PATCH 11/19] sd: Remove a useless comparison

2017-08-23 Thread Bart Van Assche
This patch avoids that gcc reports the following warning when building with W=1: drivers/scsi/sd.c:315:10: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if (val >= 0 && val <= T10_PI_TYPE3_PROTECTION) Signed-off-by: Bart Van Assche --- drivers/scsi/sd.c | 2 +

[PATCH 10/19] sd: Fix indentation

2017-08-23 Thread Bart Van Assche
This patch avoids that smatch reports the following: drivers/scsi/sd.c:3540: sd_suspend_common() warn: inconsistent indenting Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH 13/19] libiscsi: Fix indentation

2017-08-23 Thread Bart Van Assche
This patch avoids that smatch reports the following: drivers/scsi/libiscsi.c:1081: iscsi_handle_reject() warn: inconsistent indenting Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn --- drivers/scsi/libiscsi.c | 2 +- 1 file changed, 1 insertio

[PATCH 12/19] sg: Fix type of last blk_trace_setup() argument

2017-08-23 Thread Bart Van Assche
Avoid that sparse reports the following: drivers/scsi/sg.c:1114:41: warning: incorrect type in argument 5 (different address spaces) drivers/scsi/sg.c:1114:41:expected char [noderef] *arg drivers/scsi/sg.c:1114:41:got char * This patch does not change any functionality. Signed-off-by: B

[PATCH 14/19] libsas: Remove a set-but-not-used variable

2017-08-23 Thread Bart Van Assche
This was detected by building with W=1. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn --- drivers/scsi/libsas/sas_scsi_host.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_

[PATCH 15/19] libsas: Annotate fall-through in a switch statement

2017-08-23 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Johannes Thumshirn --- drivers/scsi/libsas/sas_ata.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 87f5e694dbed..70be4425ae0b 100644 --- a/driv

[PATCH 16/19] scsi_transport_sas, sas_tlr_supported(): Check kzalloc() return value

2017-08-23 Thread Bart Van Assche
Check whether memory allocation succeeded before dereferencing the pointer to the allocated memory. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Johannes Thumshirn --- drivers/scsi/scsi_transport_sas.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driv

[PATCH 19/19] iscsi_tcp: Remove a set-but-not-used variable

2017-08-23 Thread Bart Van Assche
This patch avoids that gcc reports the following warning when building with W=1: drivers/scsi/iscsi_tcp.c:166:24: warning: variable ?session? set but not used [-Wunused-but-set-variable] Signed-off-by: Bart Van Assche Cc: Lee Duncan Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thum

[PATCH 18/19] scsi_debug: Remove a set-but-not-used variable

2017-08-23 Thread Bart Van Assche
This patch avoids that gcc reports the following warning when building with W=1: drivers/scsi/scsi_debug.c:2264:15: warning: variable ?pcontrol? set but not used [-Wunused-but-set-variable] Signed-off-by: Bart Van Assche Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Johan

[PATCH 17/19] scsi_transport_srp: Suppress a W=1 compiler warning

2017-08-23 Thread Bart Van Assche
Avoid that the following compiler warning is reported when building with W=1: drivers/scsi/scsi_transport_srp.c:92:19: warning: comparison is always false due to limited range of data type [-Wtype-limits] Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Th

[PATCH 01/31] qla2xxx: Correction to vha->vref_count timeout

2017-08-23 Thread Himanshu Madhani
From: Joe Carnuccio Fix incorrect second argument for wait_event_timeout() Fixes: c4a9b538ab2a ("qla2xxx: Allow vref count to timeout on vport delete.") Cc: Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_mid.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 03/31] qla2xxx: Update fw_started flags at qpair creation.

2017-08-23 Thread Himanshu Madhani
Fixes: 4b60c82736d0 ("scsi: qla2xxx: Add fw_started flags to qpair") Cc: Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 072ad1aa5505..8f83571afc7b 1006

[PATCH 00/31] qla2xxx: Patches for scsi "misc" branch

2017-08-23 Thread Himanshu Madhani
Hi Martin, This series contains various bug fixes and driver updates. Please apply the following patches to the 4.14/scsi-queue branch at your earliest convenience for inclusion in the next mainline merge window. Thanks, Himanshu Darren Trap (1): qla2xxx: Fix WWPN/WWNN in debug message Duan

[PATCH 02/31] qla2xxx: Fix target multiqueue configuration

2017-08-23 Thread Himanshu Madhani
From: Michael Hernandez Following error will be logged in to message file while trying to configure target with multiqueue. "Cmd 0x1f aborted with timeout since ISP Abort is pending" "qla25xx_init_queues Rsp que: 1 init failed." Fixes: 82de802ad46e ("scsi: qla2xxx: Preparation for Target MQ.")

[PATCH 08/31] qla2xxx: Use BIT_6 to acquire FAWWPN from switch

2017-08-23 Thread Himanshu Madhani
From: Sawan Chandak If FA-WWPN feature disabled on the switch side and enabled for the adapter, then driver would update the port name with switch port name. This patch fixes issue by checking correct BIT flag to validate. Fixes: 41dc529a4602 ("qla2xxx: Improve RSCN handling in driver") Cc: Si

[PATCH 07/31] qla2xxx: Fix system panic due to pointer access problem

2017-08-23 Thread Himanshu Madhani
From: Duane Grigsby [ 1013.772926] BUG: unable to handle kernel paging request at 00030020 [ 1013.772950] IP: qla24xx_els_ct_entry.isra.17+0x78/0x2a0 [qla2xxx] [ 1013.772951] PGD 0 [ 1013.772952] P4D 0 [ 1013.772952] [ 1013.772953] Oops: [#1] SMP [ 1013.772955] Modules linked in: qla

[PATCH 06/31] qla2xxx: Handle PCIe error for driver

2017-08-23 Thread Himanshu Madhani
From: Sawan Chandak Driver will perform following - Set PFLG_DRIVER_REMOVING flag and do not disable PCIe error reporting during adapter shutdown. - If PCIe device count is already zero, return correct error type from PCI error interface. - When device is offline, return correct error type f

[PATCH 05/31] qla2xxx: Fix WWPN/WWNN in debug message

2017-08-23 Thread Himanshu Madhani
From: Darren Trap Signed-off-by: Darren Trap Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_nvme.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 5692ae128655..1f59e7a74c7b 100644

[PATCH 09/31] qla2xxx: Fix NPIV host enable after chip reset

2017-08-23 Thread Himanshu Madhani
From: Quinn Tran For NPIV ports, call configure_hba() so that NPIV ports can proceed to loop initialization. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_mbx.c | 2 ++ dr

[PATCH 11/31] qla2xxx: Change ha->wq max_active value to default

2017-08-23 Thread Himanshu Madhani
From: Quinn Tran update ha->wq max_active from 1 to default. MQ interrupts are queued up via this work queue. This allows interrupts to be process in parrallel, instead of serialized by the work queue. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_os.c

[PATCH 12/31] qla2xxx: Use fabric name for Get Port Speed command

2017-08-23 Thread Himanshu Madhani
From: Quinn Tran The Get Port Speed switch command needs the fabric port name of the remote device. Current code uses the registered WWPN. Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery") Cc: # 4.10+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- dri

[PATCH 15/31] qla2xxx: Use sp->free instead of hard coded call.

2017-08-23 Thread Himanshu Madhani
From: Joe Carnuccio Calling sp->free() ensures the context-correct free routine is called. Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_os.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b

[PATCH 04/31] qla2xxx: Add command completion for error path

2017-08-23 Thread Himanshu Madhani
From: Duane Grigsby The driver held spinlocks during callbacks for NVME errors which resulted in a deadlock because recovery LS cmds needed the same lock. Signed-off-by: Duane Grigsby Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 2 ++ drivers/scsi/qla2xxx/qla_gbl.h

[PATCH 14/31] qla2xxx: Prevent sp->free null/uninitialized pointer dereference.

2017-08-23 Thread Himanshu Madhani
From: Joe Carnuccio Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 12 ++-- drivers/scsi/qla2xxx/qla_mr.c | 7 --- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/q

[PATCH 16/31] qla2xxx: Move logging default mask to execute once only.

2017-08-23 Thread Himanshu Madhani
From: Joe Carnuccio Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.c | 2 -- drivers/scsi/qla2xxx/qla_os.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c inde

[PATCH 10/31] qla2xxx: Remove extra register read

2017-08-23 Thread Himanshu Madhani
From: Quinn Tran Remove extra register read for each interrupt for performance improvement. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_isr.c| 9 - drivers/scsi/qla2xxx/qla_target.c | 1 - 2 files changed, 10 deletions(-) diff --git a/dr

[PATCH 24/31] qla2xxx: Cleanup NPIV host in target mode during config teardown

2017-08-23 Thread Himanshu Madhani
From: Quinn Tran When we tear down the NPIV host configuration in target mode, the qla_tgt struct was left dangling on the global list. This patch cleans up link list and frees memory. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 11 +++

[PATCH 13/31] qla2xxx: Add ability to autodetect SFP type

2017-08-23 Thread Himanshu Madhani
From: Quinn Tran SFP can come in 2 formats: short range/SR and long range/LR. For LR, user the can increase the number of Buffer to Buffer credits between end points, via Cavium's command line tool. By default, FW uses a lower BB Credit value optimized for SR. This patch will read the SFP for eac

[PATCH 19/31] qla2xxx: Fix task mgmt handling for NPIV

2017-08-23 Thread Himanshu Madhani
From: Quinn Tran Fix task management response for NPIV Target mode. Current code uses the wrong vp index. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 7 ++- drivers/scsi/qla2xxx/qla_target.h | 1 + 2 files changed, 7 insertions(+), 1 d

[PATCH 18/31] qla2xxx: Allow SNS fabric login to be retried

2017-08-23 Thread Himanshu Madhani
From: Joe Carnuccio If SNS fabric login fails, set loop resync flag to retry via dpc. Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/qla2xxx/q

[PATCH 17/31] qla2xxx: Add timeout ability to wait_for_sess_deletion().

2017-08-23 Thread Himanshu Madhani
From: Joe Carnuccio Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_os.c | 2 +- drivers/scsi/qla2xxx/qla_target.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.

[PATCH 25/31] qla2xxx: Enable Async TMF processing

2017-08-23 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali --- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index c217cec4dd49..0814ff4fa2c0 100644 --- a/drivers/scsi/qla2xxx/

[PATCH 26/31] qla2xxx: Increase ql2xmaxqdepth to 64

2017-08-23 Thread Himanshu Madhani
From: Michael Hernandez ql2xmaxqdepth is the module parameter that seeds the per target queue depth in the Scsi midlayer (sdev->queue_depth). Performance testing revealed that increasing this value would improve IOPS numbers under certain workloads. Signed-off-by: Michael Hernandez Signed-off-b

[PATCH 31/31] qla2xxx: Update driver version to 10.00.00.01-k

2017-08-23 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 005a378f7fab..8c4b505c9f66 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++

[PATCH 21/31] qla2xxx: Remove potential macro parameter side-effect in ql_dump_regs()

2017-08-23 Thread Himanshu Madhani
From: Joe Carnuccio Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 065449e0f347..3e9dc54b89a3 100644 --

[PATCH 28/31] qla2xxx: Skip zero queue count entry during FW dump capture

2017-08-23 Thread Himanshu Madhani
From: Joe Carnuccio If queue count is zero while reading FW dump template, for entry T263/T274, skip capturing those entries during FW dump capture. Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_tmpl.c | 19 --- 1 file changed, 12 in

[PATCH 30/31] qla2xxx: Do not call abort handler function during chip reset

2017-08-23 Thread Himanshu Madhani
From: Sawan Chandak If there are IO's running and host reset or chip reset is triggered, IO's can fail due to rport time out. During chip reset recovery process, driver notifies the transport layer that remote port no longer exist, by calling fc_remote_port_delete(). When this function is called,

[PATCH 29/31] qla2xxx: Ability to process multiple SGEs in Command SGL for CT passthrough commands.

2017-08-23 Thread Himanshu Madhani
From: Giridhar Malavali Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_iocb.c | 55 ++--- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/ql

[PATCH 22/31] qla2xxx: Add support for minimum link speed

2017-08-23 Thread Himanshu Madhani
From: Sawan Chandak Signed-off-by: Sawan Chandak Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_attr.c | 36 drivers/scsi/qla2xxx/qla_def.h | 4 drivers/scsi/qla2xxx/qla_fw.h | 4 +++- drivers/scsi/qla2xxx/q

[PATCH 20/31] qla2xxx: Print correct mailbox registers in failed summary

2017-08-23 Thread Himanshu Madhani
From: Joe Carnuccio Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_mbx.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 52cb9882bf3

[PATCH 23/31] qla2xxx: Add LR distance support from nvram bit

2017-08-23 Thread Himanshu Madhani
From: Joe Carnuccio Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 9 ++- drivers/scsi/qla2xxx/qla_fw.h | 24 +++--- drivers/scsi/qla2xxx/qla_mbx.c | 56 -- 3 files changed, 61 insertio

[PATCH 27/31] qla2xxx: Recheck session state after RSCN

2017-08-23 Thread Himanshu Madhani
From: Quinn Tran When RSCN is delivered for specific remote port, Use ADISC to verify the session is still valid or not. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gbl.h | 2 +- drivers/scsi/qla2xxx/qla_gs.c | 16 +++- drivers/scsi/q

Re: [v4.13-rc BUG] system lockup when running big buffered write(4M) to IB SRP via mpath

2017-08-23 Thread Mike Snitzer
On Wed, Aug 23 2017 at 11:12am -0400, Bart Van Assche wrote: > On Wed, 2017-08-23 at 19:35 +0800, Ming Lei wrote: > > soft lockup still can be observed easily with patch d4acf3650c7c( > > block: Make blk_mq_delay_kick_requeue_list() rerun the queue at a quiet > > time), > > but no hard lockup. >

[PATCH v3 03/20] lpfc: Fix rediscovery on switch blade pull

2017-08-23 Thread James Smart
From: Dick Kennedy When the switch blade is pulled out then plugged back in, the driver does not issue a PLOGI to the target When the switch blade is pulled out, it does not reset the link. The driver ends up issuing a LOGO to the target, and finally sees devloss. Since the driver believes that

[PATCH v3 00/20] lpfc updates for 11.4.0.3

2017-08-23 Thread James Smart
This patch set provides a number of bug fixes and one additions. The additions are BB credit support. The patches were cut against the Martin's 4.13/scsi-fixes tree. There are no outside dependencies. V2: removed redundant Expresslane patch removed if type 6 support. Will add later. Incorporat

[PATCH v3 02/20] lpfc: Fix loop mode target discovery

2017-08-23 Thread James Smart
From: Dick Kennedy The driver does not discover targets when in loop mode. The NLP type is correctly getting set when a fabric connection is detected but, not for loop. The unknown NLP type means that the driver does not issue a PRLI when in loop topology. Thus target discovery fails. Fix by ch

[PATCH v3 01/20] lpfc: Fix plogi collision that causes illegal state transition

2017-08-23 Thread James Smart
From: Dick Kennedy Message "0271 Illegal State Transition: node" seen in logs, all luns are unuseable for that target. A window exists in the rcv_plogi path where if the state is plogi issue but the driver has not issued a plogi, then two reglogins will be sent for the same RPI. The first one to

[PATCH v3 07/20] lpfc: Fix handling of FCP and NVME FC4 types in Pt2Pt topology

2017-08-23 Thread James Smart
From: Dick Kennedy After link bounce in a NVME Pt2Pt config, the driver managed to map the same nport twice, resulting in multiple device nodes for the same namespace. In Pt2Pt, the driver must send PRLI's for both (scsi) FCP and NVME rather than using fabric aids. The driver was inconsistent on

[PATCH v3 04/20] lpfc: Fix oops when NVME Target is discovered in a nonNVME environment

2017-08-23 Thread James Smart
From: Dick Kennedy lpfc oops when it discovers a NVME target but is configured for SCSI only operation. Oops is in lpfc_nvme_register_port+0x33/0x300. The localport is not valid so it should not have been referenced. Added validity check for localport Signed-off-by: Dick Kennedy Signed-off-by

[PATCH v3 16/20] lpfc: Fix bad sgl reposting after 2nd adapter reset

2017-08-23 Thread James Smart
From: Dick Kennedy Fix bad sgl reposting after 2nd adapter reset port issue was fixed, the hbacmd reset would take more than 8 minutes to complete. There were conflicting NVME SGL posting/reposting responsibilities between lpfc_online()/lpfc_sli4_hba_setup() and lpfc_nvme_create_localport(). T

[PATCH v3 10/20] lpfc: Fix NVME PRLI handling during RSCN

2017-08-23 Thread James Smart
From: Dick Kennedy A race condition was found whereby the initiator would receive the RSCN for a new NVME device before it had a chance to register its FC4 support with the fabric. Thus, when queried by the initiator, it would see that the target supported FC-NVME. Corrected by making the assump

[PATCH v3 11/20] lpfc: Correct issues with FAWWN and FDISCs

2017-08-23 Thread James Smart
From: Dick Kennedy When using fabric-assigned WWNs, the switch doesn't like copy of the FLOGI payload, which includes valid VVL bits, to be used as the FDISC paylaod. Rather than wait for corrected switch firmware, ensure the VVL bits are marked invalid on FDISCs. Signed-off-by: Dick Kennedy S

[PATCH v3 09/20] lpfc: Fix crash in lpfc nvmet when fc port is reset

2017-08-23 Thread James Smart
From: Dick Kennedy in adapter reset tests, an oops was seen with a NULL pointer in lpfc_free_rq_buffer+0x20/0x60 The driver is failing to properly repost the nvmet sgl list when recovering from the reset. Thus the driver eventually trys to walk an errant buffer list. Corrected the sgl buffer re

[PATCH v3 08/20] lpfc: Fix duplicate NVME rport entries and namespaces.

2017-08-23 Thread James Smart
From: Dick Kennedy After lip, the driver sometimes would have two rports for the same device, allowing the namespaces to be duplicated by nvme. In lpfc_plogi_confirm_nport() the driver was not swapping the nrport maintained by the ndlp's undergoing address swapping. This allowed the 2nd rport to

  1   2   >