RE: [RFC] hv_storvsc: error handling.

2017-03-04 Thread KY Srinivasan
> -Original Message- > From: KY Srinivasan > Sent: Saturday, March 4, 2017 1:40 PM > To: 'James Bottomley' ; Stephen Hemminger > > Cc: Hannes Reinecke ; Christoph Hellwig ; Jens > Axboe ;

Re: [PATCH 11/20] lpfc: Fix eh_deadline setting for sli3 adapters.

2017-03-04 Thread Laurence Oberman
- Original Message - > From: jsmart2...@gmail.com > To: linux-scsi@vger.kernel.org, linux-n...@lists.infradead.org > Cc: "James Smart" , "Dick Kennedy" > , "James Smart" > > Sent: Saturday, March 4, 2017

RE: [RFC] hv_storvsc: error handling.

2017-03-04 Thread KY Srinivasan
> -Original Message- > From: James Bottomley [mailto:j...@linux.vnet.ibm.com] > Sent: Saturday, March 4, 2017 1:37 PM > To: KY Srinivasan ; Stephen Hemminger > > Cc: Hannes Reinecke ; Christoph Hellwig ; Jens >

Re: [RFC] hv_storvsc: error handling.

2017-03-04 Thread James Bottomley
On Sat, 2017-03-04 at 21:03 +, KY Srinivasan wrote: > > > -Original Message- > > From: Stephen Hemminger [mailto:step...@networkplumber.org] > > Sent: Friday, March 3, 2017 4:50 PM > > To: James Bottomley > > Cc: Hannes Reinecke ;

RE: [RFC] hv_storvsc: error handling.

2017-03-04 Thread KY Srinivasan
> -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Friday, March 3, 2017 4:50 PM > To: James Bottomley > Cc: Hannes Reinecke ; Christoph Hellwig ; > James Bottomley

Re: [bug report] scsi: lpfc: NVME Initiator: Merge into FC discovery

2017-03-04 Thread James Smart
On 2/27/2017 8:34 AM, Dan Carpenter wrote: Hello James Smart, This is a semi-automatic email about new static checker warnings. The patch a0f2d3ef374f: "scsi: lpfc: NVME Initiator: Merge into FC discovery" from Feb 12, 2017, leads to the following Smatch complaint: Thanks. Issues

Re: [bug report] scsi: lpfc: NVME Target: Base modifications

2017-03-04 Thread James Smart
On 2/27/2017 8:48 AM, Dan Carpenter wrote: Hello James Smart, This is a semi-automatic email about new static checker warnings. The patch f358dd0ca26c: "scsi: lpfc: NVME Target: Base modifications" from Feb 12, 2017, leads to the following Smatch complaint: Thanks. Issues were

Re: [bug report] scsi: lpfc: NVME Initiator: Base modifications

2017-03-04 Thread James Smart
On 2/27/2017 7:55 AM, Dan Carpenter wrote: Hello James Smart, The patch 895427bd012c: "scsi: lpfc: NVME Initiator: Base modifications" from Feb 12, 2017, leads to the following static checker warning: Thanks. Issues addressed in the lpfc patch set just posted. see

Re: [bug report] scsi: lpfc: NVME Target: Receive buffer updates

2017-03-04 Thread James Smart
On 2/27/2017 8:44 AM, Dan Carpenter wrote: Hello James Smart, This is a semi-automatic email about new static checker warnings. The patch 2d7dbc4c2775: "scsi: lpfc: NVME Target: Receive buffer updates" from Feb 12, 2017, leads to the following Smatch complaint: Thanks. Issues were

Re: [PATCH] scsi: lpfc: don't dereference dma_buf->iocbq before null check

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 6:09 AM, Colin King wrote: From: Colin Ian King dma_buf->iocbq is being dereferenced immediately before it is being null checked, so we have a potential null pointer dereference bug.

Re: [PATCH] scsi: lpfc: fix missing spin_unlock on sql_list_lock

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 6:30 AM, Colin King wrote: From: Colin Ian King In the case where sglq is null, the current code just returns without unlocking the spinlock sql_list_lock. Fix this by breaking out

Re: [PATCH] scsi: lpfc: sanity check hrq is null before dereferencing it

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 5:56 AM, Colin King wrote: From: Colin Ian King The sanity check for hrq should be moved to before the deference of hrq to ensure we don't perform a null pointer deference. Detected

Re: [PATCH] scsi: lpfc: remove redundant assignment of sgel

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 5:45 AM, Colin King wrote: From: Colin Ian King In the NVMET_FCOP_RSP case, sgel is assigned but never used and hence is redundant and can be removed. Detected by CoverityScan,

[PATCH 16/20] lpfc: remove dead sli3 nvme code

2017-03-04 Thread jsmart2021
From: James Smart Remove nvme teardown calls that should not be there on sli3 devices Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 5 - 1 file changed, 5 deletions(-)

[PATCH 14/20] lpfc: Rename LPFC_MAX_EQ_DELAY to LPFC_MAX_EQ_DELAY_EQID_CNT

2017-03-04 Thread jsmart2021
From: James Smart Without apriori understanding of what the define is, the name gives a very different impression of what it is (a max delay value for an EQ). Rename the define so it reflects what it is: the number of EQ IDs that can be set in one instance of the

[PATCH 08/20] lpfc: Fix IO submission if WQ is full

2017-03-04 Thread jsmart2021
From: James Smart For both initiator and target: if WQ is full, return -EBUSY. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.c | 5 -

[PATCH 06/20] lpfc: Fix RCTL value on NVME LS request and response

2017-03-04 Thread jsmart2021
From: James Smart NVME LS requests and responses had wrong R_CTL values. Use the FC4 ELS Request and Response defines (defines badly named, they are FC4 LS's) instead of the base ELS values. Signed-off-by: Dick Kennedy Signed-off-by: James Smart

[PATCH 20/20] lpfc: revise version number to 11.2.0.10

2017-03-04 Thread jsmart2021
From: James Smart Revise lpfc version number to 11.2.0.10 Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 09/20] lpfc: Fix nvme allocation bug on failed nvme_fc_register_localport

2017-03-04 Thread jsmart2021
From: James Smart nvme bufs get allocated even when the registration fails. Move allocation into the rsgistration success path. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvme.c

[PATCH 18/20] lpfc: code cleanups in NVME initiator base

2017-03-04 Thread jsmart2021
From: James Smart This patch addresses the smatch issues identified by Dan Carpenter in http://www.spinics.net/lists/linux-scsi/msg105663.html The issues are: drivers/scsi/lpfc/lpfc_hbadisc.c:316 lpfc_dev_loss_tmo_handler() warn: we tested 'vport->load_flag & 2' before

[PATCH 07/20] lpfc: Fix NVME CMD IU byte swapped word 1 problem

2017-03-04 Thread jsmart2021
From: James Smart Word 1 in NVME CMD IU appears byte swapped from value placed in WQE Should be Big Endian value in WQE word 16 Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvme.c

[PATCH 11/20] lpfc: Fix eh_deadline setting for sli3 adapters.

2017-03-04 Thread jsmart2021
From: James Smart A previous change unilaterally removed the hba reset entry point from the sli3 host template. This was done to allow tape devices being used for back up from being removed. Why was this done ? When there was non-responding device on the fabric, the error

[PATCH 12/20] lpfc: add transport eh_timed_out reference

2017-03-04 Thread jsmart2021
From: James Smart Christoph's prior patch missed the template for the sli3 adapters, which is now the "no host reset" template. Add the transport eh_timed_out handler to the no host reset template Signed-off-by: Dick Kennedy Signed-off-by: James

[PATCH 04/20] scsi: lpfc: fix missing spin_unlock on sql_list_lock

2017-03-04 Thread jsmart2021
From: James Smart From: Colin Ian King In the case where sglq is null, the current code just returns without unlocking the spinlock sql_list_lock. Fix this by breaking out of the while loop and the exit path will then unlock and return NULL as

[PATCH 15/20] lpfc: correct double print

2017-03-04 Thread jsmart2021
From: James Smart Correct a merge error that had debug data printed twice for the same element Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_debugfs.c | 22 -- 1

[PATCH 13/20] lpfc: Rework lpfc Kconfig for NVME options

2017-03-04 Thread jsmart2021
From: James Smart Reworked Kconfig so that lfpc only requires the scsi stack. NVME Initiator and NVME Target support can be enabled if the other NVMe subsystems have been enabled. Signed-off-by: Dick Kennedy Signed-off-by: James Smart

[PATCH 19/20] lpfc: code cleanups in NVME initiator discovery

2017-03-04 Thread jsmart2021
From: James Smart This patch addresses the smatch issues identified by Dan Carpenter in http://www.spinics.net/lists/linux-scsi/msg105665.html The issues are: drivers/scsi/lpfc/lpfc_ct.c:943 lpfc_cmpl_ct_cmd_gft_id() error: we previously assumed 'ndlp' could be null (see

[PATCH 17/20] lpfc: correct rdp diag portnames

2017-03-04 Thread jsmart2021
From: James Smart NVME merge reverted diag port names to the physical port. They should be the vport. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 8 1 file

[PATCH 00/20] lpfc: Update lpfc to revision 11.2.0.10

2017-03-04 Thread jsmart2021
From: James Smart This set of patches are mainly cleanups and fixes to the large nvme post that was recently integrated. It includes a patch to break the mandate for both NVME and SCSI subystems. James Smart (20): scsi: lpfc: remove redundant assignment of sgel scsi:

[PATCH 10/20] lpfc: add NVME exchange aborts

2017-03-04 Thread jsmart2021
From: James Smart previous code did little more than log a message. This patch adds abort path support, modeled after the SCSI code paths. Currently addresses only the initiator path. Target path under development, but stubbed out. Signed-off-by: Dick Kennedy

[PATCH 02/20] scsi: lpfc: sanity check hrq is null before dereferencing it

2017-03-04 Thread jsmart2021
From: James Smart From: Colin Ian King The sanity check for hrq should be moved to before the deference of hrq to ensure we don't perform a null pointer deference. Detected by CoverityScan, CID#1411650 ("Dereference before null check")

[PATCH 03/20] scsi: lpfc: don't dereference dma_buf->iocbq before null check

2017-03-04 Thread jsmart2021
From: James Smart From: Colin Ian King dma_buf->iocbq is being dereferenced immediately before it is being null checked, so we have a potential null pointer dereference bug. Fix this by only dereferencing it only once we have passed a null check

[PATCH 05/20] lpfc: Fix crash during Hardware error recovery on SLI3 adapters

2017-03-04 Thread jsmart2021
From: James Smart if REG_VPI fails, the driver was incorrectly issuing INIT_VFI (a SLI4 command) on a SLI3 adapter. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 14

[PATCH 01/20] scsi: lpfc: remove redundant assignment of sgel

2017-03-04 Thread jsmart2021
From: James Smart From: Colin Ian King In the NVMET_FCOP_RSP case, sgel is assigned but never used and hence is redundant and can be removed. Detected by CoverityScan, CID#1411658 ("Unused value") Signed-off-by: Colin Ian King

Re: [RFC] hv_storvsc: error handling.

2017-03-04 Thread Hannes Reinecke
On 03/04/2017 01:50 AM, Stephen Hemminger wrote: Needs more testing but this does fix the observed problem. From: Stephen Hemminger Subject: [PATCH] hv_storvsc: fix error handling The Hyper-V storvsc SCSI driver was hiding all errors in INQUIRY and MODE_SENSE

[PATCH] scsi: qedf: Fix defective logging format and argument mismatches

2017-03-04 Thread Joe Perches
Add __printf compiler verification of format and arguments. Fix fallout. Signed-off-by: Joe Perches --- drivers/scsi/qedf/qedf_dbg.h | 13 - drivers/scsi/qedf/qedf_fip.c | 2 +- drivers/scsi/qedf/qedf_io.c | 4 ++-- 3 files changed, 11 insertions(+), 8