[PATCH v4 13/26] lpfc: Allow override of hardware queue selection policies

2019-01-28 Thread James Smart
the interrupting event, schedule the cq processing on the cpu associated with the hardware queue's cq. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- v2: Adapt for 5.0 api changes: Remove all use of shost_use_scsi_mq(). Remove references to d

[PATCH v4 22/26] lpfc: Fix default driver parameter collision for allowing NPIV support

2019-01-28 Thread James Smart
I can continue to allow NPIV support. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc.h | 3 ++- drivers/scsi/lpfc/lpfc_attr.c | 4 ++-- drivers/scsi/lpfc/lpfc_ct.c| 16 drivers/scsi

[PATCH v4 08/26] lpfc: Adapt cpucheck debugfs logic to Hardware Queues

2019-01-28 Thread James Smart
-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc.h | 5 -- drivers/scsi/lpfc/lpfc_debugfs.c | 131 +-- drivers/scsi/lpfc/lpfc_nvme.c| 37 +-- drivers/scsi/lpfc/lpfc_nvmet.c | 58 - drivers/scsi

[PATCH v4 10/26] lpfc: Convert ring number to hardware queue for nvme wqe posting.

2019-01-28 Thread James Smart
routine that properly adapts. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_crtn.h | 4 ++-- drivers/scsi/lpfc/lpfc_init.c | 3 ++- drivers/scsi/lpfc/lpfc_nvme.c | 11 ++- drivers/scsi/lpfc/lpfc_nvme.h | 3 ++- drivers

[PATCH v4 11/26] lpfc: Synchronize hardware queues with SCSI MQ interface

2019-01-28 Thread James Smart
get_scsi-buf_xxx routines. = Remove lpfc_sli4_scmd_to_wqidx_distr() routine. No longer needed. - Includes fix for SLI-3 that does not have multi queue parallelization. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- v2: Adapt for 5.0 api changes: SCSI

[PATCH v4 03/26] lpfc: Implement common IO buffers between NVME and SCSI

2019-01-28 Thread James Smart
I's are no longer split, the lpfc_xri_split module parameter is removed. Adapters based on SLI3 will continue to use the older scsi_buf_list_get/put routines. All SLI4 adapters utilize the new IO buffer scheme Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by:

[PATCH v4 15/26] lpfc: Support non-uniform allocation of MSIX vectors to hardware queues

2019-01-28 Thread James Smart
relationships with the per-cpu hardware queues so they can function independently. MSIX vectors will be equitably split been cpu sockets/cores and then the per-cpu hardware queues will be mapped to the vectors most efficient for them. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by

[PATCH v4 09/26] lpfc: Move SCSI and NVME Stats to hardware queue structures

2019-01-28 Thread James Smart
syfs and debugfs stat routines to collate the per hardware queue values and report at an adapter level. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- v2: access_ok() arg list reduce to match kernel api change --- drivers/scsi/lpfc/lpfc.h | 9

[PATCH v4 07/26] lpfc: cleanup: Remove unused FCP_XRI_ABORT_EVENT slowpath event

2019-01-28 Thread James Smart
Both NVME and SCSI aborts are now processed off the CQ workqueue and do not generate events for the slowpath any more. Remove the unused event code. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc.h | 1 - drivers/scsi

[PATCH v4 21/26] lpfc: Rework locking on SCSI io completion

2019-01-28 Thread James Smart
new cmd lock. Ensure all flag changing and nulling of context pointers taken under lock. When adding lock to task management abort, realized it was missing other synchronization locks. Added that synchronization to match normal paths. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- v4

[PATCH v4 05/26] lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu

2019-01-28 Thread James Smart
vectors Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc.h | 4 +- drivers/scsi/lpfc/lpfc_attr.c| 84 ++- drivers/scsi/lpfc/lpfc_debugfs.c | 152 ++-- drivers/scsi/lpfc/lpfc_debugfs.h | 65 +++--- drivers

[PATCH v4 06/26] lpfc: Partition XRI buffer list across Hardware Queues

2019-01-28 Thread James Smart
dware queue statistics Added new empty_io_bufs counter to track if a cpu runs out of XRIs. Replace common_ variables/names with io_ to make meanings clearer. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc.h | 8 +- drivers

[PATCH v4 16/26] lpfc: cleanup: convert eq_delay to usdelay

2019-01-28 Thread James Smart
max applies to a single cpu and the value will be replicated to all cpus. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_attr.c | 8 ++- drivers/scsi/lpfc/lpfc_init.c | 9 ++- drivers/scsi/lpfc/lpfc_sli.c |

[PATCH v4 24/26] lpfc: Fix nvmet issues when link bounce under IO load

2019-01-28 Thread James Smart
val. Commonized lock handling around the abort processing routines. Prevent context release while still in ABTS list. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_nvmet.c | 50 +++--- 1 file changed,

[PATCH v4 19/26] lpfc: Resize cpu maps structures based on possible cpus

2019-01-28 Thread James Smart
The work done to date utilized the number of present cpus when sizing per-cpu structures. Structures should have been sized based on the max possible cpu count. Convert the driver over to possible cpu count for sizing allocation. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed

[PATCH v4 26/26] lpfc: Update lpfc version to 12.2.0.0

2019-01-28 Thread James Smart
Update lpfc version to 12.2.0.0 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h

[PATCH v4 04/26] lpfc: Remove extra vector and SLI4 queue for Expresslane

2019-01-28 Thread James Smart
-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_crtn.h| 5 - drivers/scsi/lpfc/lpfc_debugfs.c | 36 +-- drivers/scsi/lpfc/lpfc_init.c| 225 ++- drivers/scsi/lpfc/lpfc_scsi.c| 9 +- drivers/scsi/lpfc/lpfc_sli.c

[PATCH v4 12/26] lpfc: Adapt partitioned XRI lists to efficient sharing

2019-01-28 Thread James Smart
and their behaviors. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- v2: access_ok() arg list reduce to match kernel api change --- drivers/scsi/lpfc/lpfc.h | 26 +- drivers/scsi/lpfc/lpfc_attr.c| 9 + drivers/scsi/lpfc/lpfc_crtn.h| 16

[PATCH v4 23/26] lpfc: Correct upcalling nvmet_fc transport during io done downcall

2019-01-28 Thread James Smart
. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_nvmet.c | 247 ++--- drivers/scsi/lpfc/lpfc_nvmet.h | 1 + 3 files changed, 137 insertions(+), 112

[PATCH v4 20/26] lpfc: Enable SCSI and NVME fc4s by default

2019-01-28 Thread James Smart
Now that performance mods don't split resources by protocol and enable both protocols by default, there's no reason not to enable concurrent SCSI and NVME fc4 support. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_

[PATCH v4 17/26] lpfc: Rework EQ/CQ processing to address interrupt coalescing

2019-01-28 Thread James Smart
will only rearm as the processing thread exits. The immediately interrupt is also beneficial to idle or lower-processing CQ's as they get serviced immediately without being penalized by sharing an EQ with a more loaded CQ. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-

[PATCH v4 18/26] lpfc: Utilize new IRQ API when allocating MSI-X vectors

2019-01-28 Thread James Smart
pci_irq_vector() usage. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_init.c | 162 -- 1 file changed, 13 insertions(+), 149 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers

Re: [PATCH] scsi: lpfc: fix calls to dma_set_mask_and_coherent()

2019-02-11 Thread James Smart
v->dev, DMA_BIT_MASK(32)) != 0) + return error; /* * The BARs and register set definitions and offset locations are Thanks Ewan. Signed-off-by:  James Smart  -- james

Re: v5.0-rc6 lpfc lockdep warning

2019-02-11 Thread James Smart
On 2/10/2019 4:04 PM, Bart Van Assche wrote: Hi James, Has the lpfc driver been tested recently with lockdep enabled? This is what appeared in the kernel log on my test setup when I tried to use the lpfc driver: WARNING: CPU: 0 PID: 22263 at drivers/scsi/lpfc/lpfc_sli.c:9882 __lpfc_sli_issu

Re: [PATCH] scsi: lpfc: fix a handful of indentation issues

2019-02-13 Thread James Smart
| 2 +- drivers/scsi/lpfc/lpfc_mbox.c| 4 ++-- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) Looks good to me. Signed-off-by:  James Smart   -- james

Re: [PATCH -next] scsi: lpfc: Remove set but not used variable 'phys_id'

2019-02-14 Thread James Smart
variable] It never used since introduction in commit 6a828b0f6192 ("scsi: lpfc: Support non-uniform allocation of MSIX vectors to hardware queues") Signed-off-by: YueHaibing --- drivers/scsi/lpfc/lpfc_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Looks fi

Re: [PATCH -next] scsi: lpfc: Remove set but not used variable 'phys_id'

2019-02-14 Thread James Smart
On 2/14/2019 11:39 AM, James Bottomley wrote: On Thu, 2019-02-14 at 10:52 -0800, James Smart wrote: On 2/13/2019 5:51 PM, YueHaibing wrote: Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_cpu_affinity_check': drivers/s

Re: linux-next-20190301 lpfc lockdep complaint

2019-03-04 Thread James Smart
On 3/3/2019 1:35 PM, Bart Van Assche wrote: Hi James, With the next-20190301 kernel tree I ran into the lockdep complaint shown below during shutdown. Can you have a look? Thanks, Bart. = WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order

[PATCH] lpfc: Correct __lpfc_sli_issue_iocb_s4 lockdep check

2019-03-04 Thread James Smart
s4 subroutine to lockdep check the ring_lock. Reported-by: Bart Van Assche 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 a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c

[PATCH] lpfc: resolve static checker warning in lpfc_sli4_hba_unset

2019-03-04 Thread James Smart
cdb42becdd40: "scsi: lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu" Reported-by: Dan Carpenter Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH 02/30] lpfc: Resolve irq-unsafe lockdep heirarchy warning in lpfc_io_free

2019-03-12 Thread James Smart
ee. Fixes: 5e5b511d8bfa ("scsi: lpfc: Partition XRI buffer list across Hardware Queues") Reported-by: Bart Van Assche Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_in

[PATCH 17/30] lpfc: Fix FDMI manufacturer attribute value

2019-03-12 Thread James Smart
The FDMI manufacturer value being reported on Linux is inconsistent with other OS's. Set the value to "Emulex Corporation" for consistency. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_ct.c | 5 - 1 file changed, 4 insertions(+), 1 de

[PATCH 22/30] lpfc: Fix handling of trunk links state reporting

2019-03-12 Thread James Smart
by not clearing the trunk link states if we've already transitioned to a down state. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_hbadisc.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c

[PATCH 20/30] lpfc: Correct boot bios information to FDMI registration

2019-03-12 Thread James Smart
The driver is currently reporting the firmware revision not the actual boot bios version in FDMI data. Modify the driver to obtain the boot bios version from the adapter and use that data in the FMDI data sent to the switch. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers

[PATCH 23/30] lpfc: Fix link speed reporting for 4-link trunk

2019-03-12 Thread James Smart
driver is using uint16_t and is encountering an overflow of the 16bits when calculating link speed. Fix by using a u32 type Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli4.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 18/30] lpfc: Fix fc4type information for FDMI

2019-03-12 Thread James Smart
The driver is reporting support for NVME even when not configured for NVME operation. Fix (and make more readable) when NVME protocol support is indicated. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_ct.c | 17 ++--- 1 file changed, 10

[PATCH 19/30] lpfc: Fix HDMI2 registration string for symbolic name

2019-03-12 Thread James Smart
The switch is rejecting FDMI2 registration for symbolic name. There is a "\n" in the name string, which the switch dislikes thus rejects the registration. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_ct.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 21/30] lpfc: Fix protocol support on G6 and G7 adapters

2019-03-12 Thread James Smart
Invalid test is allowing Loop to be a supported topology on G6 and G7 adapters. The chips do not support loop as their link speeds prohibit loop per standard. correct the conditional so that loop is not reported. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc

[PATCH 16/30] lpfc: Fix io lost on host resets

2019-03-12 Thread James Smart
to be reinit and the resources lost. Flush the fcp rings before destroying the multixripools. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc

[PATCH 05/30] lpfc: Fix location of SCSI ktime counters

2019-03-12 Thread James Smart
E and SCSI") Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli.h | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h index 7a1a761efdd6..1153a6c91bde 100644 --- a/dr

[PATCH 04/30] lpfc: Fix SLI3 commands being issued on SLI4 devices.

2019-03-12 Thread James Smart
During debug, it was seen that the driver is issuing commands specific to SLI3 on SLI4 devices. Although the adapter correctly rejected the command, this should not be done. Revise the code to stop sending these commands on a SLI4 adapter. Signed-off-by: Dick Kennedy Signed-off-by: James Smart

[PATCH 01/30] lpfc: Resolve inconsistent check of hdwq in lpfc_scsi_cmd_iocb_cmpl

2019-03-12 Thread James Smart
removing the unnecessary check for a NULL hdwq table. Fixes 6a828b0f6192: "scsi: lpfc: Support non-uniform allocation of MSIX vectors to hardware queues" Reported-by: Dan Carpenter Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_scsi.c | 2 +- 1 file cha

[PATCH 11/30] lpfc: Coordinate adapter error handling with offline handling

2019-03-12 Thread James Smart
thread is resetting the adapter, and if so, will then wait for the error thread to finish. Only after it has finished, will it set its flag and offline the adapter. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_attr.c | 19 +++ drivers/scsi/lpfc

[PATCH 00/30] lpfc updates for 12.2.0.1

2019-03-12 Thread James Smart
queue tree James Smart (30): lpfc: Resolve inconsistent check of hdwq in lpfc_scsi_cmd_iocb_cmpl lpfc: Resolve irq-unsafe lockdep heirarchy warning in lpfc_io_free lpfc: Fix use-after-free mailbox cmd completion lpfc: Fix SLI3 commands being issued on SLI4 devices. lpfc: Fix location of

[PATCH 15/30] lpfc: Fix mailbox hang on adapter init

2019-03-12 Thread James Smart
initialized, which avoids the race condition with the async event. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index

[PATCH 06/30] lpfc: Fix nvmet async receive buffer replenishment

2019-03-12 Thread James Smart
n the receive buffer was queued waiting for an io context so a replacement is not needed in the new code additions. Thus, exempt this the context reuse case from the buffer reposting. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvmet.c

[PATCH 08/30] lpfc: Fix nvmet handling of first burst cmd

2019-03-12 Thread James Smart
reference. For hbq buffer free, convert to using lpfc_rq_buf_free(). 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 a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index

[PATCH 12/30] lpfc: Convert bootstrap mbx polling from msleep to udelay

2019-03-12 Thread James Smart
sy waiting, significantly reduce the wait time so that we can exit the pool loop as soon as possible. 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 a/drivers/scsi/lpfc/lpfc_sli.c b/drivers

[PATCH 14/30] lpfc: Fix driver crash in target reset handler

2019-03-12 Thread James Smart
for NULL in the reset handler and return failure if NULL. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_scsi.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index f787

[PATCH 13/30] lpfc: Correct localport timeout duration error

2019-03-12 Thread James Smart
Current code incorrectly specifies a completion wait timeout duration in 5 jiffies, when it should have been 5 seconds. Fix the adjust for units for the completion timeout call. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvmet.c | 6 +- drivers/scsi

[PATCH 03/30] lpfc: Fix use-after-free mailbox cmd completion

2019-03-12 Thread James Smart
noop'd by setting the ndlp context NULL'd. Due to the unload, no further action was necessary. Also, while reviewing this path, the generic nulling of the context after handling should be slightly moved. Reported by: Bart Van Assche Signed-off-by: Dick Kennedy Signed-off-by: J

[PATCH 07/30] lpfc: Fix lpfc_nvmet_mrq attribute handling when 0

2019-03-12 Thread James Smart
ff-by: James Smart --- drivers/scsi/lpfc/lpfc_attr.c | 3 ++- drivers/scsi/lpfc/lpfc_init.c | 8 drivers/scsi/lpfc/lpfc_nvmet.h | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index ce3e541434dc..5d6c874

[PATCH 09/30] lpfc: Fix deadlock due to nested hbalock call

2019-03-12 Thread James Smart
the board reset routine. Fix by no longer taking the hbalock in the board reset routine. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers

[PATCH 10/30] lpfc: Stop adapter if pci errors detected

2019-03-12 Thread James Smart
r the pci error is detected. Pay attention to pci_config_space_read status and return failure if an error is seen. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 7 ++- drivers/scsi/lpfc/lpfc_sli.c | 11 +-- 2 files changed, 15 insertions(

[PATCH 27/30] lpfc: Fix duplicate log message numbers

2019-03-12 Thread James Smart
Driver had duplicated log message numbers making debug difficult. Make all messages unique. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_ct.c | 4 ++-- drivers/scsi/lpfc/lpfc_debugfs.c | 4 ++-- drivers/scsi/lpfc/lpfc_init.c| 2 +- 3 files changed

[PATCH 29/30] lpfc: Update Copyright in driver version

2019-03-12 Thread James Smart
Revise driver copyright message to show 2019. Update couple of files modified by 12.2.0.1 patch set. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_bsg.c | 2 +- drivers/scsi/lpfc/lpfc_bsg.h | 2 +- drivers/scsi/lpfc/lpfc_version.h | 2 +- 3 files

[PATCH 25/30] lpfc: Reduce memory footprint for lpfc_queue

2019-03-12 Thread James Smart
dress based on it's index rather than using the pointer table. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_debugfs.c | 4 +-- drivers/scsi/lpfc/lpfc_debugfs.h | 2 +- drivers/scsi/lpfc/lpfc_sli.c | 55 +--- dr

[PATCH 28/30] lpfc: Enhance 6072 log string

2019-03-12 Thread James Smart
Update the 6072 log message string to print the whole 32bits of the extended status. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvme.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc

[PATCH 24/30] lpfc: Add loopback testing to trunking mode

2019-03-12 Thread James Smart
When in trunking mode, the adapter can be placed into diagnostic mode and each link in the trunk tested via loopback. Add support to the driver to perform per-link loopback testing when in trunking mode. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_bsg.c

[PATCH 30/30] lpfc: Update lpfc version to 12.2.0.1

2019-03-12 Thread James Smart
Update lpfc version to 12.2.0.0 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 a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h index 660d45226ac8..f7d9ef428417

[PATCH 26/30] lpfc: Specify node affinity for queue memory allocation

2019-03-12 Thread James Smart
Change the sli4 queue creation code to use numa node based memory allocation based on the cpu the queues will be related to. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 72 ++- drivers/scsi/lpfc/lpfc_sli.c

ideas for fix to scsi_ioctl_reset

2019-03-13 Thread James Smart
I've got an oops for the following stack: ... lpfc_send_taskmgmt+0x28a [lpfc] lpfc_bus_reset_handler+0x16a [lpfc] scsi_try_bus_reset+0x3a scsi_ioctl_reset+0x143 scsi_ioctl+0x18e [sg] The issue is that lpfc eventually calls blk_mq_unique_tag() as everything is scsi-mq enabled. blk_mq_

Re: [PATCH] scsi: lpfc: Fix error codes in lpfc_sli4_pci_mem_setup()

2019-03-13 Thread James Smart
d everything to direct returns for consistency. Fixes: 56de8357049c ("scsi: lpfc: fix calls to dma_set_mask_and_coherent()") Signed-off-by: Dan Carpenter --- drivers/scsi/lpfc/lpfc_init.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) Reviewed-by:  James Smart  Thanks -- james

Re: ideas for fix to scsi_ioctl_reset

2019-03-13 Thread James Smart
On 3/13/2019 2:44 PM, Bart Van Assche wrote: On Wed, 2019-03-13 at 13:19 -0700, James Smart wrote: I've got an oops for the following stack: ... lpfc_send_taskmgmt+0x28a [lpfc] lpfc_bus_reset_handler+0x16a [lpfc] scsi_try_bus_reset+0x3a scsi_ioctl_reset+0x143 scsi_

Re: [PATCH 25/30] lpfc: Reduce memory footprint for lpfc_queue

2019-03-19 Thread James Smart
> On Mar 19, 2019, at 6:02 PM, James Bottomley > wrote: > > On Tue, 2019-03-12 at 16:30 -0700, James Smart wrote: >> Currently the driver maintains a sideband structure which has a >> pointer for each queue element. However, at 8bytes a pointer, and up >> to 4k

[PATCH] lpfc: Fixup eq_clr_intr references

2019-03-20 Thread James Smart
Declaring interrupt clear routines as inline is bogus as they are used as an indirect pointer. Remove the inline references Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_sli.c | 4 ++-- drivers/scsi/lpfc/lpfc_sli4.h | 4 ++-- 2 files changed, 4 insertions

Re: [PATCH 25/30] lpfc: Reduce memory footprint for lpfc_queue

2019-03-20 Thread James Smart
On 3/20/2019 8:21 AM, Martin K. Petersen wrote: James, So there are a couple of other instances you can fix at your leisure: they're not causing immediate linux-next problems because the body of they're only apparently used within one file so the body is available, but if the use expands we'll

[PATCH] scsi: lpfc: change snprintf to scnprintf for possible overflow

2019-03-21 Thread James Smart
: Silvio Cesare Signed-off-by: James Smart Cc: Dick Kennedy Cc: Dan Carpenter Cc: Kees Cook Cc: Will Deacon Cc: Greg KH Signed-off-by: Willy Tarreau --- Original posted 1/12/19 Revised the patch to sync with latest sources. --- drivers/scsi/lpfc/lpfc_attr.c| 196 drivers

[PATCH] lpfc: Fix missing wakeups on abort threads

2019-04-03 Thread James Smart
waitq element which must be set if the abort thread is waiting. This is reverting the change in the indicated patch. Fixes: c2017260eea2d ("scsi: lpfc: Rework locking on SCSI io completion") Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_scsi.c | 6 +++-

Re: [PATCH] lpfc: Fix missing wakeups on abort threads

2019-04-03 Thread James Smart
Please ignore: There's not much point to the check of the flag. I'll repost. -- james

[PATCH v2] lpfc: Fix missing wakeups on abort threads

2019-04-03 Thread James Smart
waitq element which must be set if the abort thread is waiting. This is reverting the change in the indicated patch. Fixes: c2017260eea2d ("scsi: lpfc: Rework locking on SCSI io completion") Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_scsi.c | 7 +++--

Re: [PATCH 0/7] lpfc patches for kernel v5.2

2019-04-03 Thread James Smart
(-) Series looks good.  Thanks Bart. -- james Reviewed-by:   James Smart 

Re: [PATCH] lpfc: Fix a recently introduced compiler warning

2019-04-05 Thread James Smart
ait(struct lpfc_vport *vport, ^~ Fixes: 3999df75bccb ("scsi: lpfc: Declare local functions static") Cc: James Smart Signed-off-by: Bart Van Assche Reviewed-by:  James Smart   -- james

[PATCH 1/4] scsi fc: add FPIN ELS definition

2019-04-05 Thread James Smart
T11 has introduced a new Fabric Notifications mechanism whereby the fabric can notify a port of events occurring in the fabric. The notifications are given by the FPIN ELS. Add the FPIN ELS definitions to the kernel. Signed-off-by: James Smart --- include/uapi/scsi/fc/fc_els.h | 33

[PATCH 4/4] lpfc: add support for posting FC events on FPIN reception

2019-04-05 Thread James Smart
This patch adds support to recognize FPIN ELS's that are received. When one is received, the fc transport will be called to handle the the FPIN. Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 8 drivers/scsi/lpfc/lpfc_hw.h | 4 2 files changed, 12 inser

[PATCH 3/4] scsi_transport_fc: Add FPIN fc event codes

2019-04-05 Thread James Smart
Add a new event type - an FPIN event. Add a new routine, fc_host_fpin_rcv(), that lldd's call when an FPIN is received. The routine processes the fpin payload. For now, the routine only logs an FPIN event. Signed-off-by: Muneendra Signed-off-by: James Smart --- drivers

[PATCH 0/4] scsi fc FPIN event support

2019-04-05 Thread James Smart
and set attributes on different fc ports. The last patch updates the lpfc driver to post a received FPIN. These patches were cut from the 5.2/scsi-queue branch. James Smart (4): scsi fc: add FPIN ELS definition scsi_transport_fc: refactor event posting routines scsi_transport_fc: Add FPIN

[PATCH 2/4] scsi_transport_fc: refactor event posting routines

2019-04-05 Thread James Smart
an be called by llds. Modify the existing two event routines to use the helper. Signed-off-by: James Smart --- drivers/scsi/scsi_transport_fc.c | 100 --- include/scsi/scsi_transport_fc.h | 11 +++-- 2 files changed, 49 insertions(+), 62 deletions(-) diff --

Re: [PATCH] nvme,scsi: display FC-NVMe port roles

2019-04-10 Thread James Smart
#define FC_PORT_ROLE_IP_PORT 0x04 #define FC_PORT_ROLE_FCP_DUMMY_INITIATOR 0x08 +#define FC_PORT_ROLE_NVME_INITIATOR 0x10 +#define FC_PORT_ROLE_NVME_TARGET 0x20 +#define FC_PORT_ROLE_NVME_DISCOVERY0x40 /* The following are for compatibility */ #define FC_RPORT_ROLE_UNKNOWN FC_PORT_ROLE_UNKNOWN all-in-all, Looks ok. Reviewed-by:    James Smart  -- james

[PATCH] scsi: scsi_transport_fc: fix typos on 64/128 GBit define names

2017-12-21 Thread James Smart
The define names specified 64Bit/128Bit, not 64GBIT/128GBIT. Correct the names. Signed-off-by: James Smart --- drivers/scsi/scsi_transport_fc.c | 4 ++-- include/scsi/scsi_transport_fc.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/scsi_transport_fc.c b

Re: [PATCH v4 3/5] nvmet/fc: Use sgl_alloc() and sgl_free()

2018-01-05 Thread James Smart
On 1/5/2018 8:26 AM, Bart Van Assche wrote: Use the sgl_alloc() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Cc: Keith Busch Cc: Christoph Hellwig Cc: James Smart Cc: Sagi

[PATCH 01/19] lpfc: Fix frequency of Release WQE CQEs

2018-01-24 Thread James Smart
depth isn't evenly divisible by N, with enough time, it can be set on every element, creating a lot of overhead and risking CQ full conditions. Correct by clearing the bit when not setting it on an Nth element. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/

[PATCH 04/19] lpfc: correct debug counters for abort

2018-01-24 Thread James Smart
Existing code was using the wrong field for the completion status when comparing whether to increment abort statistics Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvmet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi

[PATCH 00/19] lpfc updates for 11.4.0.7

2018-01-24 Thread James Smart
This patch set provides a number of fixes for the driver. The patches were cut against the Martin's 4.16/scsi-queue tree. There are no outside dependencies and are expected to be pulled via Martins tree. James Smart (19): lpfc: Fix frequency of Release WQE CQEs lpfc: Increase CQ a

[PATCH 02/19] lpfc: Increase CQ and WQ sizes for SCSI

2018-01-24 Thread James Smart
Increased CQ and WQ sizes for SCSI FCP, matching those used for NVMe development. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_hw4.h | 3 +++ drivers/scsi/lpfc/lpfc_init.c | 30 ++ drivers

[PATCH 08/19] lpfc: Fix RQ empty firmware trap

2018-01-24 Thread James Smart
04a01 ..." message. Correct by replenishing the buffer whenenver the deferred logic kicks in. Update corresponding debug messages and statistics as well. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_attr.c | 6 ++ drivers/scsi/lpfc/lpfc_mem.c | 8 ++-

[PATCH 09/19] lpfc: Allow set of maximum outstanding SCSI cmd limit for a target parameter

2018-01-24 Thread James Smart
Make the attribute writeable. Remove the ramp up to logic as its unnecessary, simply set depth. Add debug message if depth changed, possibly reducing limit, yet our outstanding count has yet to catch up with it. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc

[PATCH 12/19] lpfc: Indicate CONF support in NVMe PRLI

2018-01-24 Thread James Smart
Revise the NVME PRLI to indicate CONF support. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 3 ++- drivers/scsi/lpfc/lpfc_hw4.h | 6 +++--- drivers/scsi/lpfc/lpfc_nportdisc.c | 3 --- 3 files changed, 5 insertions(+), 7 deletions

[PATCH 11/19] lpfc: Fix issue_lip if link is disabled

2018-01-24 Thread James Smart
The driver ignored checks on whether the link should be kept administratively down after a link bounce. Correct the checks. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_attr.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/lpfc

[PATCH 13/19] lpfc: Fix SCSI io host reset causing kernel crash

2018-01-24 Thread James Smart
f-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 4 drivers/scsi/lpfc/lpfc_sli.c | 13 - 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 851d4e889042..7fc2db968379 10

[PATCH 14/19] lpfc: Validate adapter support for SRIU option

2018-01-24 Thread James Smart
When using the special option to suppress the response iu, ensure the adapter fully supports the feature by checking feature flags from the adapter. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_hw4.h | 3 +++ drivers/scsi/lpfc/lpfc_init.c | 13

[PATCH 03/19] lpfc: move placement of target destroy on driver detach

2018-01-24 Thread James Smart
Ensure nvme localports/targetports are torn down before dismantling the adapter sli interface on driver detachment. This aids leaving interfaces live while nvme may be making callbacks to abort it. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 14

[PATCH 19/19] lpfc: Update modified files for 2018 Copyright

2018-01-24 Thread James Smart
Updated Copyright in files updated 11.4.0.7 Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h | 2 +- drivers/scsi/lpfc/lpfc_attr.c | 2 +- drivers/scsi/lpfc/lpfc_crtn.h | 2 +- drivers/scsi/lpfc/lpfc_els.c | 2 +- drivers/scsi/lpfc

[PATCH 18/19] lpfc: update driver version to 11.4.0.7

2018-01-24 Thread James Smart
Update the driver version to 11.4.0.7 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 a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h index c232bf0e8998

[PATCH 15/19] lpfc: Fix header inclusion in lpfc_nvmet

2018-01-24 Thread James Smart
The driver was inappropriately pulling in the nvme host's nvme.h header. What it really needed was the standard header. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 05/19] lpfc: Add WQ Full Logic for NVME Target

2018-01-24 Thread James Smart
maintaining a sideband queue within the driver that is added to when the WQ full condition is hit, and drained from as soon as new WQ space opens up. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_crtn.h | 1 + drivers/scsi/lpfc/lpfc_nvmet.c | 116

[PATCH 06/19] lpfc: Fix PRLI handling when topology type changes

2018-01-24 Thread James Smart
register the VPI, which is what is associated with the S_ID. Fix by leaving the VP bit set (it was set earlier) and as the VFI is being re-registered, set the UPDT bit. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_mbox.c | 4 +--- 1 file changed, 1 insertion

[PATCH 16/19] lpfc: Treat SCSI Write operation Underruns as an error

2018-01-24 Thread James Smart
the SCSI error handling to treat write underruns as an error as well. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_scsi.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c

[PATCH 10/19] lpfc: Fix soft lockup in lpfc worker thread during LIP testing

2018-01-24 Thread James Smart
. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_hbadisc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index b159a5c4e388..9265906d956e 100644 --- a/drivers/scsi/lpfc

[PATCH 07/19] lpfc: Fix IO failure during hba reset testing with nvme io.

2018-01-24 Thread James Smart
complete teardown. Remove the NULL'ing of the private pointer in the nvmefc request. The driver simply overwrites this value on each IO start. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvme.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/driv

<    4   5   6   7   8   9   10   11   12   13   >