["PATCH-v2" 02/22] Fix nvme unregister port timeout.

2017-04-20 Thread jsmart2021
From: James Smart During some link event testing it was observed that the wait_for_completion_timeout in the lpfc_nvme_unregister_port was timing out all the time. The initiator is claiming the nvme_fc_unregister_remoteport upcall is not completing the unregister in the

["PATCH-v2" 01/22] Standardize nvme SGL segment count

2017-04-20 Thread jsmart2021
From: James Smart Standardize default SGL segment count for nvme target and initiator The driver needs to make them the same for clarity. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes

["PATCH-v2" 18/22] Add Fabric assigned WWN support.

2017-04-20 Thread jsmart2021
From: James Smart Adding support for Fabric assigned WWPN and WWNN. Firmware sends first FLOGI to fabric with vendor version changes. On link up driver gets updated service parameter with FAWWN assigned port name. Driver sends 2nd FLOGI with updated fawwpn and modifies

["PATCH-v2" 05/22] Add debug messages for nvme/fcp resource allocation.

2017-04-20 Thread jsmart2021
From: James Smart The xri resources are split into pools for NVME and FCP IO when NVME is enabled. There was not message in the log that identified this allocation. Added debug message to log XRI split. Signed-off-by: Dick Kennedy

["PATCH-v2" 14/22] Remove hba lock from NVMET issue WQE.

2017-04-20 Thread jsmart2021
From: James Smart Unnecessary lock is taken. ring lock should be sufficient to protect the work queue submission. This was noticed when doing performance testing. The hbalock is not needed to issue io to the nvme work queue. Signed-off-by: Dick Kennedy

["PATCH-v2" 20/22] Update ABORT processing for NVMET.

2017-04-20 Thread jsmart2021
From: James Smart The driver with nvme had this routine stubbed. Right now XRI_ABORTED_CQE is not handled and the FC NVMET Transport has a new API for the driver. Missing code path, new NVME abort API Update ABORT processing for NVMET There are 3 new FC NVMET Transport

["PATCH-v2" 12/22] Fix driver usage of 128B WQEs when WQ_CREATE is V1.

2017-04-20 Thread jsmart2021
From: James Smart There are two versions of a structure for queue creation and setup that the driver shares with FW. The driver was only treating as version 0. Verify WQ_CREATE with 128B WQEs in V0 and V1. Code review of another bug showed the driver passing 128B WQEs and

["PATCH-v2" 22/22] lpfc revison 11.2.0.12

2017-04-20 Thread jsmart2021
From: James Smart Update lpfc version to reflect this set of changes. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_version.h |

["PATCH-v2" 17/22] Fix max_sgl_segments settings for NVME / NVMET

2017-04-20 Thread jsmart2021
From: James Smart Cannot set NVME segment counts to a large number The existing module parameter lpfc_sg_seg_cnt is used for both SCSI and NVME. Limit the module parameter lpfc_sg_seg_cnt to 128 with the default being 64 for both NVME and NVMET, assuming NVME is enabled

["PATCH-v2" 11/22] Fix driver unload/reload operation.

2017-04-20 Thread jsmart2021
From: James Smart There are couple of different load/unload issues fixed with this patch. One of the issues was reported by Junichi Nomura, a patch was submitted by Johannes Thumsrhirn which did fix one of the problems but the fix in this patch separates the pring free from

["PATCH-v2" 16/22] Fix crash after issuing lip reset

2017-04-20 Thread jsmart2021
From: James Smart When RPI is not available, driver sends WQE with invalid RPI value and rejected by HBA. lpfc :82:00.3: 1:3154 BLS ABORT RSP failed, data: x3/xa0320008 and lpfc :2753 PLOGI failure DID:FA Status:x3/xa0240008 In this case, driver accesses rpi_ids

["PATCH-v2" 03/22] Fix rejected nvme LS Req.

2017-04-20 Thread jsmart2021
From: James Smart In this case, the NVME initiator is sending an LS REQ command on an NDLP that is not MAPPED. The FW rejects it. The lpfc_nvme_ls_req routine checks for a NULL ndlp pointer but does not check the NDLP state. This allows the routine to send an LS IO when

["PATCH-v2" 09/22] Fix extra line print in rqpair debug print.

2017-04-20 Thread jsmart2021
From: James Smart An extra blank line was being added the the rqpair printing. Remove the extra line feed. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn

["PATCH-v2" 15/22] Fix driver load issues when MRQ=8

2017-04-20 Thread jsmart2021
From: James Smart The symptom is that the driver will fail to login to the fabric. The reason is because it is out of iocb resources. There is a one to one relationship between MRQs (receive buffers for NVMET-FC) and iocbs and the default number of IOCBs was not accounting

["PATCH-v2" 19/22] Fix implicit logo and RSCN handling for NVMET

2017-04-20 Thread jsmart2021
From: James Smart NVMET didn't have any RSCN handling at all and would not execute implicit LOGO when receiving a PLOGI from an rport that NVMET had in state UNMAPPED. Clean up the logic in lpfc_nlp_state_cleanup for initiators (FCP and NVME). NVMET should not respond to

["PATCH-v2" 00/22] lpfc updates for 11.2.0.12

2017-04-20 Thread jsmart2021
From: James Smart This patch set provides a number of bug fixes, code cleanups, and error handling, mostly in the nvme area of lpfc. There is one new feature in the series to add Fabric Assigned WWN support. The patches were cut against the linux-block tree,

["PATCH-v2" 06/22] Fix spelling in comments.

2017-04-20 Thread jsmart2021
From: James Smart Comment should have said Repost. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1

["PATCH-v2" 21/22] Fix Express lane queue creation.

2017-04-20 Thread jsmart2021
From: James Smart The older sli4 adapters only supported the 64 byte WQE entry size. The new adapter (fw) support both 64 and 128 byte WQE entry sizies. The Express lane WQ was not being created with the 128 byte WQE sizes when it was supported. Not having the right WQE

["PATCH-v2" 08/22] Remove NULL ptr check before kfree.

2017-04-20 Thread jsmart2021
From: James Smart The check for NULL ptr is not necessary, kfree will check it. Removing NULL ptr check. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn ---

["PATCH-v2" 13/22] Fix nvme initiator handling when not enabled.

2017-04-20 Thread jsmart2021
From: James Smart Fix nvme initiator handline when CONFIG_LPFC_NVME_INITIATOR is not enabled. With update nvme upstream driver sources, loading the driver with nvme enabled resulting in this Oops. BUG: unable to handle kernel NULL pointer dereference at 0018

["PATCH-v2" 04/22] Fix log message in completion path.

2017-04-20 Thread jsmart2021
From: James Smart In the lpfc_nvme_io_cmd_wqe_cmpl routine the driver was printing two pointers and the DID for the rport whenever an IO completed on a now that had transitioned to a non active state. There is no need to print the node pointer address for a node that is

["PATCH-v2" 10/22] Fix PRLI ACC rsp for NVME

2017-04-20 Thread jsmart2021
From: James Smart PRLI ACC from target is FCP oriented. Word 0 was wrong. This was noticed by another nvmet-fc vendor that was testing the lpfc nvme-fc initiator with their target. Verified results with analyzer. PRLI BC B5 56 56 22 61 04 00 00 61 00 00 01 29 00 00

["PATCH-v2" 07/22] Remove unused defines for NVME PostBuf.

2017-04-20 Thread jsmart2021
From: James Smart These defines for the posting of buffers for nvmet target were not used. Removing the unused defines. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn

[PATCH-v1 01/22] Standardize nvme SGL segment count

2017-04-19 Thread jsmart2021
From: James Smart Standardize default SGL segment count for nvme target and initiator The driver needs to make them the same for clarity. Signed-off-by: Dick Kennedy Signed-off-by: James Smart ---

[PATCH-v1 12/22] Fix driver usage of 128B WQEs when WQ_CREATE is V1.

2017-04-19 Thread jsmart2021
From: James Smart There are two versions of a structure for queue creation and setup that the driver shares with FW. The driver was only treating as version 0. Verify WQ_CREATE with 128B WQEs in V0 and V1. Code review of another bug showed the driver passing 128B WQEs and

[PATCH-v1 20/22] Update ABORT processing for NVMET.

2017-04-19 Thread jsmart2021
From: James Smart The driver with nvme had this routine stubbed. Right now XRI_ABORTED_CQE is not handled and the FC NVMET Transport has a new API for the driver. Missing code path, new NVME abort API Update ABORT processing for NVMET There are 3 new FC NVMET Transport

[PATCH-v1 17/22] Fix max_sgl_segments settings for NVME / NVMET

2017-04-19 Thread jsmart2021
From: James Smart Cannot set NVME segment counts to a large number The existing module parameter lpfc_sg_seg_cnt is used for both SCSI and NVME. Limit the module parameter lpfc_sg_seg_cnt to 128 with the default being 64 for both NVME and NVMET, assuming NVME is enabled

[PATCH-v1 15/22] Fix driver load issues when MRQ=8

2017-04-19 Thread jsmart2021
From: James Smart The symptom is that the driver will fail to login to the fabric. The reason is because it is out of iocb resources. There is a one to one relationship between MRQs (receive buffers for NVMET-FC) and iocbs and the default number of IOCBs was not accounting

[PATCH-v1 14/22] Remove hba lock from NVMET issue WQE.

2017-04-19 Thread jsmart2021
From: James Smart Unnecessary lock is taken. ring lock should be sufficient to protect the work queue submission. This was noticed when doing performance testing. The hbalock is not needed to issue io to the nvme work queue. Signed-off-by: Dick Kennedy

[PATCH-v1 08/22] Remove NULL ptr check before kfree.

2017-04-19 Thread jsmart2021
From: James Smart The check for NULL ptr is not necessary, kfree will check it. Removing NULL ptr check. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_debugfs.c | 12

[PATCH-v1 04/22] Fix log message in completion path.

2017-04-19 Thread jsmart2021
From: James Smart In the lpfc_nvme_io_cmd_wqe_cmpl routine the driver was printing two pointers and the DID for the rport whenever an IO completed on a now that had transitioned to a non active state. There is no need to print the node pointer address for a node that is

[PATCH-v1 10/22] Fix PRLI ACC rsp for NVME

2017-04-19 Thread jsmart2021
From: James Smart PRLI ACC from target is FCP oriented. Word 0 was wrong. This was noticed by another nvmet-fc vendor that was testing the lpfc nvme-fc initiator with their target. Verified results with analyzer. PRLI BC B5 56 56 22 61 04 00 00 61 00 00 01 29 00 00

[PATCH-v1 13/22] Fix nvme initiator handling when not enabled.

2017-04-19 Thread jsmart2021
From: James Smart Fix nvme initiator handline when CONFIG_LPFC_NVME_INITIATOR is not enabled. With update nvme upstream driver sources, loading the driver with nvme enabled resulting in this Oops. BUG: unable to handle kernel NULL pointer dereference at 0018

[PATCH-v1 07/22] Remove unused defines for NVME PostBuf.

2017-04-19 Thread jsmart2021
From: James Smart These defines for the posting of buffers for nvmet target were not used. Removing the unused defines. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvme.h | 3 ---

[PATCH-v1 16/22] Fix crash after issuing lip reset

2017-04-19 Thread jsmart2021
From: James Smart When RPI is not available, driver sends WQE with invalid RPI value and rejected by HBA. lpfc :82:00.3: 1:3154 BLS ABORT RSP failed, data: x3/xa0320008 and lpfc :2753 PLOGI failure DID:FA Status:x3/xa0240008 In this case, driver accesses rpi_ids

[PATCH-v1 21/22] Fix Express lane queue creation.

2017-04-19 Thread jsmart2021
From: James Smart The older sli4 adapters only supported the 64 byte WQE entry size. The new adapter (fw) support both 64 and 128 byte WQE entry sizies. The Express lane WQ was not being created with the 128 byte WQE sizes when it was supported. Not having the right WQE

[PATCH-v1 11/22] Fix driver unload/reload operation.

2017-04-19 Thread jsmart2021
From: James Smart There are couple of different load/unload issues fixed with this patch. One of the issues was reported by Junichi Nomura, a patch was submitted by Johannes Thumsrhirn which did fix one of the problems but the fix in this patch separates the pring free from

[PATCH-v1 05/22] Add debug messages for nvme/fcp resource allocation.

2017-04-19 Thread jsmart2021
From: James Smart The xri resources are split into pools for NVME and FCP IO when NVME is enabled. There was not message in the log that identified this allocation. Added debug message to log XRI split. Signed-off-by: Dick Kennedy

[PATCH-v1 09/22] Fix extra line print in rqpair debug print.

2017-04-19 Thread jsmart2021
From: James Smart An extra blank line was being added the the rqpair printing. Remove the extra line feed. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_debugfs.c | 2 -- 1 file

[PATCH-v1 18/22] Add Fabric assigned WWN support.

2017-04-19 Thread jsmart2021
From: James Smart Adding support for Fabric assigned WWPN and WWNN. Firmware sends first FLOGI to fabric with vendor version changes. On link up driver gets updated service parameter with FAWWN assigned port name. Driver sends 2nd FLOGI with updated fawwpn and modifies

[PATCH-v1 19/22] Fix implicit logo and RSCN handling for NVMET

2017-04-19 Thread jsmart2021
From: James Smart NVMET didn't have any RSCN handling at all and would not execute implicit LOGO when receiving a PLOGI from an rport that NVMET had in state UNMAPPED. Clean up the logic in lpfc_nlp_state_cleanup for initiators (FCP and NVME). NVMET should not respond to

[PATCH-v1 00/22] lpfc updates for 11.2.0.12

2017-04-19 Thread jsmart2021
From: James Smart This patch set provides a number of bug fixes, code cleanups, and error handling, mostly in the nvme area of lpfc. There is one new feature in the series to add Fabric Assigned WWN support. The patches were cut against the linux-block tree,

[PATCH-v1 02/22] Fix nvme unregister port timeout.

2017-04-19 Thread jsmart2021
From: James Smart During some link event testing it was observed that the wait_for_completion_timeout in the lpfc_nvme_unregister_port was timing out all the time. The initiator is claiming the nvme_fc_unregister_remoteport upcall is not completing the unregister in the

[PATCH-v1 03/22] Fix rejected nvme LS Req.

2017-04-19 Thread jsmart2021
From: James Smart In this case, the NVME initiator is sending an LS REQ command on an NDLP that is not MAPPED. The FW rejects it. The lpfc_nvme_ls_req routine checks for a NULL ndlp pointer but does not check the NDLP state. This allows the routine to send an LS IO when

[PATCH-v1 22/22] lpfc revison 11.2.0.12

2017-04-19 Thread jsmart2021
From: James Smart Update lpfc version to reflect this set of changes. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH-v1 06/22] Fix spelling in comments.

2017-04-19 Thread jsmart2021
From: James Smart Comment should have said Repost. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

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

[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 v2] lpfc: Finalize Kconfig options for nvme

2017-03-08 Thread jsmart2021
From: James Smart Reviewing the result of what was just added for Kconfig, we made a poor choice. It worked well for full kernel builds, but not so much for how it would be deployed on a distro. Here's the final result: - lpfc will compile in NVME initiator and/or NVME

[PATCH] lpfc: Finalize Kconfig options for nvme

2017-03-07 Thread jsmart2021
From: James Smart Reviewing the result of what was just added for Kconfig, we made a poor choice. It worked well for full kernel builds, but not so much for how it would be deployed on a distro. Here's the final result: - lpfc will compile in NVME initiator and/or NVME

[PATCH v2] lpfc: Fix panic on BFS configuration.

2017-04-26 Thread jsmart2021
From: James Smart To select the appropriate shost template, the driver is issuing a mailbox command to retrieve the wwn. Turns out the sending of the command precedes the reset of the function. On SLI-4 adapters, this is inconsequential as the mailbox command location is

[PATCH] Fix panic on BFS configuration.

2017-04-21 Thread jsmart2021
From: James Smart To select the appropriate shost template, the driver is issuing a mailbox command to retrieve the wwn. Turns out the sending of the command precedes the reset of the function. On SLI-4 adapters, this is inconsequential as the mailbox command location is

[PATCH v3 03/22] Fix rejected nvme LS Req.

2017-04-21 Thread jsmart2021
From: James Smart In this case, the NVME initiator is sending an LS REQ command on an NDLP that is not MAPPED. The FW rejects it. The lpfc_nvme_ls_req routine checks for a NULL ndlp pointer but does not check the NDLP state. This allows the routine to send an LS IO when

[PATCH v3 07/22] Remove unused defines for NVME PostBuf.

2017-04-21 Thread jsmart2021
From: James Smart These defines for the posting of buffers for nvmet target were not used. Removing the unused defines. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn

[PATCH v3 02/22] Fix nvme unregister port timeout.

2017-04-21 Thread jsmart2021
From: James Smart During some link event testing it was observed that the wait_for_completion_timeout in the lpfc_nvme_unregister_port was timing out all the time. The initiator is claiming the nvme_fc_unregister_remoteport upcall is not completing the unregister in the

[PATCH v3 01/22] Standardize nvme SGL segment count

2017-04-21 Thread jsmart2021
From: James Smart Standardize default SGL segment count for nvme target and initiator The driver needs to make them the same for clarity. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes

[PATCH] lpfc: Fix panic on BFS configuration.

2017-04-21 Thread jsmart2021
From: James Smart To select the appropriate shost template, the driver is issuing a mailbox command to retrieve the wwn. Turns out the sending of the command precedes the reset of the function. On SLI-4 adapters, this is inconsequential as the mailbox command location is

[PATCH] lpfc: Fix memory corruption of the lpfc_ncmd->list pointers

2017-04-21 Thread jsmart2021
From: James Smart lpfc was changing the private pointer that is set/maintained by the nvme_fc transport. This caused two issues: a) the transport, on teardown may erroneous attempt to free whatever address was set; and b) lfpc uses any value set in lpfc_nvme_fcp_abort() and

[PATCH v3 19/22] Fix implicit logo and RSCN handling for NVMET

2017-04-21 Thread jsmart2021
From: James Smart NVMET didn't have any RSCN handling at all and would not execute implicit LOGO when receiving a PLOGI from an rport that NVMET had in state UNMAPPED. Clean up the logic in lpfc_nlp_state_cleanup for initiators (FCP and NVME). NVMET should not respond to

[PATCH v3 18/22] Add Fabric assigned WWN support.

2017-04-21 Thread jsmart2021
From: James Smart Adding support for Fabric assigned WWPN and WWNN. Firmware sends first FLOGI to fabric with vendor version changes. On link up driver gets updated service parameter with FAWWN assigned port name. Driver sends 2nd FLOGI with updated fawwpn and modifies

[PATCH v3 16/22] Fix crash after issuing lip reset

2017-04-21 Thread jsmart2021
From: James Smart When RPI is not available, driver sends WQE with invalid RPI value and rejected by HBA. lpfc :82:00.3: 1:3154 BLS ABORT RSP failed, data: x3/xa0320008 and lpfc :2753 PLOGI failure DID:FA Status:x3/xa0240008 In this case, driver accesses rpi_ids

[PATCH v3 14/22] Remove hba lock from NVMET issue WQE.

2017-04-21 Thread jsmart2021
From: James Smart Unnecessary lock is taken. ring lock should be sufficient to protect the work queue submission. This was noticed when doing performance testing. The hbalock is not needed to issue io to the nvme work queue. Signed-off-by: Dick Kennedy

[PATCH v3 20/22] Update ABORT processing for NVMET.

2017-04-21 Thread jsmart2021
From: James Smart The driver with nvme had this routine stubbed. Right now XRI_ABORTED_CQE is not handled and the FC NVMET Transport has a new API for the driver. Missing code path, new NVME abort API Update ABORT processing for NVMET There are 3 new FC NVMET Transport

[PATCH v3 15/22] Fix driver load issues when MRQ=8

2017-04-21 Thread jsmart2021
From: James Smart The symptom is that the driver will fail to login to the fabric. The reason is because it is out of iocb resources. There is a one to one relationship between MRQs (receive buffers for NVMET-FC) and iocbs and the default number of IOCBs was not accounting

[PATCH v3 21/22] Fix Express lane queue creation.

2017-04-21 Thread jsmart2021
From: James Smart The older sli4 adapters only supported the 64 byte WQE entry size. The new adapter (fw) support both 64 and 128 byte WQE entry sizies. The Express lane WQ was not being created with the 128 byte WQE sizes when it was supported. Not having the right WQE

[PATCH v3 11/22] Fix driver unload/reload operation.

2017-04-21 Thread jsmart2021
From: James Smart There are couple of different load/unload issues fixed with this patch. One of the issues was reported by Junichi Nomura, a patch was submitted by Johannes Thumsrhirn which did fix one of the problems but the fix in this patch separates the pring free from

[PATCH v3 22/22] lpfc revison 11.2.0.12

2017-04-21 Thread jsmart2021
From: James Smart Update lpfc version to reflect this set of changes. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_version.h |

[PATCH v3 17/22] Fix max_sgl_segments settings for NVME / NVMET

2017-04-21 Thread jsmart2021
From: James Smart Cannot set NVME segment counts to a large number The existing module parameter lpfc_sg_seg_cnt is used for both SCSI and NVME. Limit the module parameter lpfc_sg_seg_cnt to 128 with the default being 64 for both NVME and NVMET, assuming NVME is enabled

[PATCH v3 13/22] Fix nvme initiator handling when not enabled.

2017-04-21 Thread jsmart2021
From: James Smart Fix nvme initiator handline when CONFIG_LPFC_NVME_INITIATOR is not enabled. With update nvme upstream driver sources, loading the driver with nvme enabled resulting in this Oops. BUG: unable to handle kernel NULL pointer dereference at 0018

[PATCH v3 09/22] Fix extra line print in rqpair debug print.

2017-04-21 Thread jsmart2021
From: James Smart An extra blank line was being added the the rqpair printing. Remove the extra line feed. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn

[PATCH v3 00/22] lpfc updates for 11.2.0.12

2017-04-21 Thread jsmart2021
From: James Smart This patch set provides a number of bug fixes, code cleanups, and error handling, mostly in the nvme area of lpfc. There is one new feature in the series to add Fabric Assigned WWN support. The patches were cut against the linux-block tree,

[PATCH v3 05/22] Add debug messages for nvme/fcp resource allocation.

2017-04-21 Thread jsmart2021
From: James Smart The xri resources are split into pools for NVME and FCP IO when NVME is enabled. There was not message in the log that identified this allocation. Added debug message to log XRI split. Signed-off-by: Dick Kennedy

[PATCH v3 04/22] Fix log message in completion path.

2017-04-21 Thread jsmart2021
From: James Smart In the lpfc_nvme_io_cmd_wqe_cmpl routine the driver was printing two pointers and the DID for the rport whenever an IO completed on a now that had transitioned to a non active state. There is no need to print the node pointer address for a node that is

[PATCH v3 12/22] Fix driver usage of 128B WQEs when WQ_CREATE is V1.

2017-04-21 Thread jsmart2021
From: James Smart There are two versions of a structure for queue creation and setup that the driver shares with FW. The driver was only treating as version 0. Verify WQ_CREATE with 128B WQEs in V0 and V1. Code review of another bug showed the driver passing 128B WQEs and

[PATCH v3 08/22] Remove NULL ptr check before kfree.

2017-04-21 Thread jsmart2021
From: James Smart The check for NULL ptr is not necessary, kfree will check it. Removing NULL ptr check. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn ---

[PATCH v3 10/22] Fix PRLI ACC rsp for NVME

2017-04-21 Thread jsmart2021
From: James Smart PRLI ACC from target is FCP oriented. Word 0 was wrong. This was noticed by another nvmet-fc vendor that was testing the lpfc nvme-fc initiator with their target. Verified results with analyzer. PRLI BC B5 56 56 22 61 04 00 00 61 00 00 01 29 00 00

[PATCH v3 06/22] Fix spelling in comments.

2017-04-21 Thread jsmart2021
From: James Smart Comment should have said Repost. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1

[PATCH v3] lpfc: Fix panic on BFS configuration.

2017-04-27 Thread jsmart2021
From: James Smart To select the appropriate shost template, the driver is issuing a mailbox command to retrieve the wwn. Turns out the sending of the command precedes the reset of the function. On SLI-4 adapters, this is inconsequential as the mailbox command location is

[PATCH] lpfc: fix compile error when CONFIG_NVME_TARGET_FC not enabled

2017-04-27 Thread jsmart2021
From: James Smart fix compile error when CONFIG_NVME_TARGET_FC not enabled return statement needs to be outside of ifdef Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- Patch to be pulled in via block trees