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

2017-08-23 Thread Sergey Senozhatsky
Hi, On (08/24/17 12:39), Boqun Feng wrote: > On Wed, Aug 23, 2017 at 02:55:17PM +0900, Sergey Senozhatsky wrote: > > On (08/23/17 13:35), Boqun Feng wrote: > > > > KERN_CONT and "\n" should not be together. "\n" flushes the cont > > > > buffer immediately. > > > > > > > > > > Hmm.. Not quite

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

2017-08-23 Thread Boqun Feng
On Wed, Aug 23, 2017 at 02:55:17PM +0900, Sergey Senozhatsky wrote: > On (08/23/17 13:35), Boqun Feng wrote: > > > KERN_CONT and "\n" should not be together. "\n" flushes the cont > > > buffer immediately. > > > > > > > Hmm.. Not quite familiar with printk() stuffs, but I could see several > >

Re: [PATCH] scsi: ufs: reqs and tasks were put in the wrong order

2017-08-23 Thread Martin K. Petersen
Zang, Applied to 4.14/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v3 00/20] lpfc updates for 11.4.0.3

2017-08-23 Thread Martin K. Petersen
James, > 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. Applied to 4.14/scsi-queue. Thank you! -- Martin K. Petersen Oracle

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

2017-08-23 Thread Martin K. Petersen
Shivasharan, > Shivasharan S (14): > megaraid_sas: mismatch of allocated MFI frame size and length exposed > in MFI MPT pass through command > megaraid_sas: set minimum value of resetwaittime to be 1 secs > megaraid_sas: Use synchronize_irq in target reset case > megaraid_sas: Call

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

2017-08-23 Thread Martin K. Petersen
Himanshu, > 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. Applied to 4.14/scsi-queue. Thank you! -- Martin K. Petersen Oracle

[PATCH] scsi: ufs: reqs and tasks were put in the wrong order

2017-08-23 Thread Zang Leigang
Signed-off-by: Zang Leigang diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 5bc9dc14e075..794a4600e952 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -438,7 +438,7 @@ static void ufshcd_print_host_state(struct ufs_hba

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

2017-08-23 Thread Martin K. Petersen
Gustavo, > 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. Applied to 4.14/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

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

2017-08-23 Thread Martin K. Petersen
Christophe, > 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. Applied to 4.13/scsi-fixes. Thanks! -- Martin K. Petersen Oracle Linux Engineering

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

2017-08-23 Thread Damien Le Moal
On 8/24/17 00:27, Martin K. Petersen wrote: > > 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

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

2017-08-23 Thread James Smart
Arnd Bergmann, testing gcc-8, encountered the following: > 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 v2 0/1] bsg: fix regression resulting in panics when sending commands via BSG

2017-08-23 Thread Benjamin Block
Hello all, This is the second try for fixing the regression in the BSG-interface that exists since v4.11 (for more infos see the first series). I separated my other changes from the bug-fix so that it is easier to apply if judged good. I will rebase my cleanups I sent in v1 and send them when I

[PATCH v2 1/1] bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer

2017-08-23 Thread Benjamin Block
Since we split the scsi_request out of struct request bsg fails to provide a reply-buffer for the drivers. This was done via the pointer for sense-data, that is not preallocated anymore. Failing to allocate/assign it results in illegal dereferences because LLDs use this pointer unquestioned. An

[PATCH v3 20/20] lpfc: lpfc version bump 11.4.0.3

2017-08-23 Thread James Smart
From: Dick Kennedy Update driver version to 11.4.0.3 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file

[PATCH v3 18/20] lpfc: Add Buffer to Buffer credit recovery support

2017-08-23 Thread James Smart
Add Buffer to buffer credit recovery support to the driver. This is a negotiated feature with the peer that allows for both sides to detect dropped RRDY's and FC Frames and recover credit. Signed-off-by: Dick Kennedy Signed-off-by: James Smart

[PATCH v3 05/20] lpfc: convert info messages to standard messages

2017-08-23 Thread James Smart
From: Dick Kennedy Transitioned some informational discovery messages to now always be displayed when log_verbose is set. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn

[PATCH v3 12/20] lpfc: Limit amount of work processed in IRQ

2017-08-23 Thread James Smart
From: Dick Kennedy Various oops being seen on being in the ISR too long and cpu lockups, when under heavy load. The amount of work being posted off of completion queues kept the ISR running almost all the time Correct the issue by limiting the amount of work per

[PATCH v3 06/20] lpfc: Correct return error codes to align with nvme_fc transport

2017-08-23 Thread James Smart
From: Dick Kennedy Modify driver return error codes to align with host nvme transport. Driver isn't returning Exxx error codes to properly reflect out of resource or connectivity conditions (-EBUSY), yet there were hard error conditions returning -EBUSY. Ensure the

[PATCH v3 17/20] lpfc: remove console log clutter

2017-08-23 Thread James Smart
Change hw queue binding messages to info - not error. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 15/20] lpfc: Fix nvme target failure after 2nd adapter reset

2017-08-23 Thread James Smart
From: Dick Kennedy Fix nvme target failure after 2nd adapter reset The nonrecovery occurred because the lpfc nvme initiator function did not reestablish its localport creation with the nvme host transport in lpfc_oneline. Because of that, an NVME rport binding could

[PATCH v3 19/20] scsi: lpfc: fix "integer constant too large" error on 32bit archs

2017-08-23 Thread James Smart
From: Maurizio Lombardi cc1: warnings being treated as errors drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_get_wwpn': drivers/scsi/lpfc/lpfc_init.c:3253: error: integer constant is too large for 'long' type Signed-off-by: Maurizio Lombardi

[PATCH v3 13/20] lpfc: Fix MRQ > 1 context list handling

2017-08-23 Thread James Smart
From: Dick Kennedy Various oops including cpu LOCKUPs were seen. For asynchronously received ius where the driver must assign exchange resources, the resources were on a single get (free) list and put list (finished, waiting to be put on get list). As all cpus are

[PATCH v3 14/20] lpfc: Fix relative offset error on large nvmet target ios

2017-08-23 Thread James Smart
From: Dick Kennedy if the nvmet_fc transport breaks an io into multiple sequences, the driver will improperly set the relative offset on the 2nd through N sequences. Correct by properly formatting the hw cmd so the relative offset is picked up from the hw cmd.

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

[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

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

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

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

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

[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

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

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

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

[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

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),

[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

[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

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

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

[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

[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

[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().

[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

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

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

[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

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

[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

[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

[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

[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

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

[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

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

[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

[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

[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

[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

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

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

[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

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

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

[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

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

[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

[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

[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

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

[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

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

[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

[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

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

[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

[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

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

[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

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

[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

[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

[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

[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

[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

[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

[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

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

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

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

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

[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

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:

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

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

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

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

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

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

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

  1   2   >