On 10/18/2019 12:50 AM, Hannes Reinecke wrote:
Hi James,
trying to figure this annoying lpfc_set_rrq_active() bug
I've found the nodelist pointer handling in the lpfc io buffers
a bit strange; there's a 'ndlp' pointer, but for scsi the nodelist
is primarily accessed via the 'rdata' pointer (alth
ck Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_els.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index da90c7bf2287..2235a45999a8 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers
the field.
Parse the adapter return codes for Write_Object
and write an appropriate message to the system console.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_hw4.h | 1 +
drivers/scsi/lpfc/lpfc_init.c | 69 ++
Update lpfc version to 12.6.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 d8839d95f7fe..ed1b10b0161e
-by: James Smart
---
drivers/scsi/lpfc/lpfc_logmsg.h | 17 +
1 file changed, 17 insertions(+)
diff --git a/drivers/scsi/lpfc/lpfc_logmsg.h b/drivers/scsi/lpfc/lpfc_logmsg.h
index ea10f03437f5..148d02a27b58 100644
--- a/drivers/scsi/lpfc/lpfc_logmsg.h
+++ b/drivers/scsi/lpfc
escing value is then applied to the EQs that
had interrupted on the cpu.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_hw4.h | 1 -
drivers/scsi/lpfc/lpfc_init.c | 51 ++-
drivers/scsi/lpfc/lpfc_sli.c | 3 ++
-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_ct.c | 22 +++---
drivers/scsi/lpfc/lpfc_els.c | 10 --
drivers/scsi/lpfc/lpfc_hbadisc.c | 39 +++
3 files changed, 62 insertions(+), 9 deletions(-)
diff
Slightly rework some error check code paths for better streamlining.
Added compiler unlikely hints to allow slightly better
optimization of the fast-path.
Removed a few pointer checks that were obviously already valid.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi
ed by the adapter to generate the IU.
Remove the allocations and the associated buffer pool.
Rather than leaving NULLs in buffer pointer locations, set command
and sgl to indicate skipped SGLE indexes.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc.h
that it can be enabled dynamically via an
attribute. Additionally, the size of the buffer can be configured
dynamically.
- Add locks around states that now may be changing.
- Tie the feature into debugfs so that the logs can be read at
any time.
Signed-off-by: Dick Kennedy
Signed-off-by:
Add decode support for adapter Async Events which report
FA-WWN configuration errors.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
Note:
Requires the prior patch:
lpfc: Add log macros to allow print by serverity or verbocity setting
---
drivers/scsi/lpfc/lpfc_hw4.h | 1
cpu.
Fix the unlock order by fully releasing the hbalocks as well.
CC: Zhangguanghui
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
Original patch sent by Zhangguanghui
Modified slightly as merged and tested at Emulex.
---
drivers/scsi/lpfc/lpfc_scsi.c | 5 +++--
1 file changed, 3
: James Smart
---
drivers/scsi/lpfc/lpfc_sli.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 379c37451645..3a6520187ee5 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
ing")
Cc: # v5.1+
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_scsi.c | 11 +++
drivers/scsi/lpfc/lpfc_sli.c | 5 -
drivers/scsi/lpfc/lpfc_sli.h | 3 +--
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_scs
topology should
be fixed and the topology types to be configured.
- adds a pt attribute to report the persistent topology if present.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc.h | 1 +
drivers/scsi/lpfc/lpfc_attr.c | 38 +-
drivers
when private loop and letting the
state machine play out.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_nportdisc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c
b/drivers/scsi/lpfc/lpfc_nportdisc.c
o use hardware queue count rather than
interrupt vector count.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_attr.c | 6 +++---
drivers/scsi/lpfc/lpfc_init.c | 6 ++
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_att
Update lpfc to revision 12.6.0.0
This patch contains a set fixes, optimizations, and a handful of
new additions.
The patches were cut against Martin's 5.5/scsi-queue tree
James Smart (16):
lpfc: fix lpfc_nvmet_mrq to be bound by hdw queue count
lpfc: Fix reporting of read-only fw
On 10/17/2019 7:01 PM, Martin K. Petersen wrote:
Hannes,
The BUILD_NVME define never got defined anywhere, causing NVMe
commands to be treated as SCSI commands when freeing the buffers.
This was causing a stuck discovery and a horrible crash in
lpfc_set_rrq_active() later on.
Applied to 5.4/sc
;scsi: lpfc: Merge per-protocol WQ/CQ pairs into single per-cpu
pair")
Signed-off-by: Hannes Reinecke
---
drivers/scsi/lpfc/lpfc_init.c | 2 --
drivers/scsi/lpfc/lpfc_scsi.c | 2 --
2 files changed, 4 deletions(-)
Yep. Thanks.
Reviewed-by: James Smart
-- james
On 10/10/2019 1:59 AM, Zhangguanghui wrote:
Hi everyone
Please refer to the latest patch.
There is a race deadlock in the function lpfc_abort_handler
potential deadlocks arising from lock ordering problems.
It’s the correct order
spin_unlock(&lpfc_cmd->buf_lock)
spin_unlock_irqrestore(&phba
Should it be static?
Reported-by: Hulk Robot mailto:hul...@huawei.com>>
Signed-off-by: zhengbin mailto:zhengbi...@huawei.com>>
---
drivers/scsi/lpfc/lpfc_nportdisc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Dick Kennedy
Reviewed-by: James Smart
Thanks!
-- james
While reviewing the CT behavior, issues with spinlock_irq were
seen. The driver should be using spinlock_irqsave/irqrestore in
the els flush routine.
Changed to spinlock_irqsave/irqrestore.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_els.c | 16
Coverity flagged several scenarios where checking of null
pointer values wasn't consistent.
Fix the code to that be consistent on checking.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_els.c | 5 +
drivers/scsi/lpfc/lpfc_nvmet.c
back to STE_NPR_NODE when GID_FT
completes, thereby restarting the discovery process for the node.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_hbadisc.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc
rt dynamic unbounded SGL lists on G7
hardware.")
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_sli.c | 38 ++
1 file changed, 22 insertions(+), 16 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/
t
the abort completions aren't ignored.
- Updated the fdmi path to recognize a CT request that fails
due to the port being unusable. This stops FDMI retries. FDMI
will be restarted on next link up.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_ct.c | 6
Local variable fcp_txcmplq_cnt is initialized to 0 and then displayed
in lpfc driver message 0387.
Presumed residual (or unused) code from previous commit.
Removed fcp_txcmplq_cnt.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_sli.c | 4 +---
1 file
the code such that there is a single routine
being used for nvme or nvmet ABORT requests, and IA is an
argument.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_crtn.h | 1 +
drivers/scsi/lpfc/lpfc_hw4.h | 1 +
drivers/scsi/lpfc/lpfc_nvme.c | 73
wait long command timeouts.
Fix by having the early flush routine also process the related CQ
and rearm the CQ.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_sli.c | 42 --
1 file changed, 36 insertions(+), 6 deletions
Update lpfc version to 12.4.0.1
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 b8aae31ffda3..d8839d95f7fe
y: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_sli.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 6d89dd3dd532..09e275e3bcd8 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++
g the device list that identifies FCoE devices.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_attr.c | 17 ++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 79a1924
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_hw4.h | 1 +
drivers/scsi/lpfc/lpfc_init.c | 17 +++--
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index f70fb7629c82..6095e3cfddd3 100644
--- a/drivers
Update lpfc to revision 12.4.0.1
This patch set contains fixes as well as a few cleanups.
The patches were cut against Martin's 5.4/scsi-queue tree
James Smart (20):
lpfc: Fix pt2pt discovery on SLI3 HBAs
lpfc: Fix premature re-enabling of interrupts in lpfc_sli_host_down
lpfc: Fix
Use of spin_lock_irq may re-enable interrupts prematurely.
Convert to spin_lock. Note: code is under the phba->hba_lock which
has been locked with irqsave.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_sli.c | 4 ++--
1 file changed, 2 insertions(+)
Coverity flagged missing status check on register read that
flags a poisoned data return value.
Add checking of register read status.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_attr.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff
off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_scsi.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index fe1097666de4..c2773c07657d 100644
--- a/drivers/scsi/lpfc/lpfc_scs
Error state marking is always done prior to release back to the
internal rpi free list, which the driver wasn't doing in cases
prior.
Also enhanced some of the logging to help in the next case
of problem troubleshooting.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smar
e the mailbox command completed. Thus the
PRLI response used the old n_port_id.
Defer the PRLI response until CONFIG_LINK completes.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_nportdisc.c | 141 ++---
1 file changed, 115 inser
d by the FC port - 1 resource for the
original command and 1 resource for the abort request.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc.h | 1 -
drivers/scsi/lpfc/lpfc_attr.c | 5 -
drivers/scsi/lpfc/lpfc_init.c | 9 +++--
drivers/scsi/l
the
parallel path.
Fix by making the calls that clear mbox state/port pointer
while under lock. Also slightly cleaned up the error path.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_sli.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff
avoids
the indentation issues.
Fixes: 9b1640686470 ("scsi: lpfc: Fix use-after-free mailbox cmd completion")
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_hbadisc.c | 88 +++-
drivers/scsi/lpfc/lpfc_sli.c | 2 +
ned-off-by: James Smart
---
Indicated commit that is fixed is only in 5.4/scsi-queue
---
drivers/scsi/lpfc/lpfc_sli.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index bb5705267c39..75bb75800642 100644
---
value that when used eventually faulted
the system
Convert offending code to use local variable.
Fixes: c00f62e6c546 ("scsi: lpfc: Merge per-protocol WQ/CQ pairs into single
per-cpu pair")
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
Tested-by: Abdul Haleem
---
Offending
On 8/27/2019 6:31 AM, Hannes Reinecke wrote:
On 8/20/19 5:06 AM, Martin K. Petersen wrote:
James,
Update lpfc to revision 12.4.0.0
Applied to 5.4/scsi-queue, thanks!
This update is crashing on my server:
[ 33.178690] general protection fault: [#1] SMP PTI
[ 33.226638] CPU: 0 PI
Capturing and downloading dif command data and dif data was done a
dozen years ago and no longer being used. Also creates a potential
security hole.
Remove the debugfs buffer for dif debugging.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
CC: KyleMahlkuch
CC: Hannes Reinecke
Raise the config max for lpfc_fcp_mq_threshold variable to 256.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
CC: Hannes Reinecke
---
Martin, this fix applies 5.3/scsi-fixes patch:
scsi: lpfc: Mitigate high memory pre-allocation by SCSI-MQ
---
drivers/scsi/lpfc/lpfc_attr.c | 2
as no need to compare sizes nor to allocate size based on a
define.
Change allocation to use actual structure length
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
CC: Dan Carpenter
---
drivers/scsi/lpfc/lpfc_init.c | 11 +--
drivers/scsi/lpfc/lpfc_sli4.h | 3 ---
2 files
On 7/16/2019 7:48 AM, KyleMahlkuch wrote:
Power and x86 have different page sizes so rather than allocate the
buffer based on number of pages we should allocate space by using
max_sectors. There is also code in lpfc_scsi.c to be sure we don't
write past the end of this buffer.
Signed-off-by: K
On 8/26/2019 6:40 AM, Dan Carpenter wrote:
Hello James Smart,
The patch d79c9e9d4b3d: "scsi: lpfc: Support dynamic unbounded SGL
lists on G7 hardware." from Aug 14, 2019, leads to the following
static checker warning:
drivers/scsi/lpfc/lpfc_init.c:4107 lpfc_new_io_buf()
On 8/26/2019 12:18 AM, Hannes Reinecke wrote:
On 8/16/19 4:36 AM, James Smart wrote:
When SCSI-MQ is enabled, the SCSI-MQ layers will do pre-allocation of
MQ resources based on shost values set by the driver. In newer cases
of the driver, which attempts to set nr_hw_queues to the cpu count,
the
for SCSI-MQ, performance
levels remained near maximum with the within-driver affiinitization.
A module parameter was created to allow the value set for the
nr_hw_queues to be tunable.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
Reviewed-by: Ming Lei
---
v3: add Ming's reviewe
s.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc.h | 3 +-
drivers/scsi/lpfc/lpfc_crtn.h| 2 +-
drivers/scsi/lpfc/lpfc_debugfs.c | 92 ++--
drivers/scsi/lpfc/lpfc_debugfs.h | 61 +++-
drivers/scsi/lpfc/lpfc_init.
-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_attr.c | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 7ac6508b7ed8..63e631f116e4 100644
--- a/drivers/scsi
The driver is currently reporting a non-zero nvme sg_seg_cnt value
of 256 when nvme is disabled. It should be zero.
Fix by ensuring the value is cleared.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_init.c | 1 +
1 file changed, 1 insertion(+)
diff --git
call to
lpfc_bsg_request() will return success.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_bsg.c | 22 +++---
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index
In order to see real addresses, convert %p with %px for kernel addresses
and replace %p with %pf for functions.
While converting, standardize on "x%px" throughout (not %px or 0x%px).
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_bsg.c | 2 +
to re-login if the
nport_id is still present.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_ct.c| 16 +++-
drivers/scsi/lpfc/lpfc_nportdisc.c | 6 +-
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_c
To aid better hardware detection when there are issues, report the
first and second level hardware revisions from the READ_REV command.
Add the elements to the existing hardware id string.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_attr.c | 3 ++-
1 file
apter command-based
routine to let the adapter manage the ABTS.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_nvmet.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
When forcing the use of MSI (vs MSI-X) the driver is crashing in
pci_irq_get_affinity.
The driver was not using the new pci_alloc_irq_vectors interface
in the MSI path.
Fix by using pci_alloc_irq_vectors() with PCI_RQ_MSI in the MSI path.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
g the outstanding GFT_ID if the related remote port is
logged out.
Ensure a PRLI transmit attempt only occurs if the remote port is
logging in. This avoids the incorrect attempt while logged out.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_ct.c
modinfo for lpfc_nvme_enable_fb is incorrect. FirstBurst on lpfc
target is not fully supported.
Update the attribute description
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_attr.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git
onger applicable.
Fix by always clearing the percpu counters for each time period and
always run the eq_delay calculations if an eq has a non-zero
coalescing value.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_init.c | 32 +---
1
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_hbadisc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 44e779e4c885..95db23adc96d 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
off the upper nibble.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_ct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index c52d5edf4d44..1717f3403a97 100644
--- a/drivers/scsi
The adapter reset path (lpfc_sli_hba_down) is taking/releasing a
lock with irq. But, the path is already under the hbalock which
raised irq so it's unnecessary.
Convert to simple lock/unlock.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_sli.c | 4 ++
ensure that enable_mds_diags is a RW parameter.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_attr.c | 2 +-
drivers/scsi/lpfc/lpfc_els.c | 11 ++-
drivers/scsi/lpfc/lpfc_hw4.h | 6 ++
drivers/scsi/lpfc/lpfc_sli.c | 30
While performing code review, several relatively simple optimizations
can be done in the fast path.
Add these optimizations (unlikely designators).
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_nvme.c | 8
1 file changed, 4 insertions(+), 4
the RPI to
be reused before it was actually available.
Fix by clearing RPI bitmask only after UNREG_RPI mailbox completion.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_disc.h| 1 +
drivers/scsi/lpfc/lpfc_hbadisc.c | 8 ++--
drivers/scsi/lpfc
Running on Coverity produced the following errors:
- coding style (indentation)
- memset size mismatch errors
note: comment cases where it is purposely a mismatch
Fix the errors
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_els.c | 10
ath is will unconditionally re-enable interrupts
in cases where irq state should be preserved. The re-enablement
allowed the other paths to execute which then causes the
deadlock.
Fix by converting the lock/unlock to irqsave/irqrestore.
Signed-off-by: Dick Kennedy
Signed-off-by: James Sm
ll generate the completions
for the scsi and nvme outstanding io. The abort ios, if waiting, will
be caught and flushed as well.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_crtn.h | 1 +
drivers/scsi/lpfc/lpfc_init.c | 4
drivers/scsi/lpfc/l
the lldd set routine.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_attr.c | 21 +
1 file changed, 21 insertions(+)
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 33c8bae49821..90181afe0e28 100644
--- a
parameters set by the driver should have avoided this.
The dm1 multipath maintainer has been notified of the issue.
Fix by changing the return code for the dma mapping routines to indicate
cases that are not retryable and return DID_ERROR on those cases.
Signed-off-by: Dick Kennedy
Signed-off-by: James
.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_vport.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c
index 343bc71d4615..b76646357980 100644
--- a/drivers/scsi/lpfc
nnedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_nvme.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index e8924e90c4eb..103708503592 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/dr
processing.
Enhance logging to recognize condition better.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_nportdisc.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c
b/drivers/scsi/lpfc
Update lpfc version to 12.4.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 f7e93aaf1e00..b8aae31ffda3
CPUs may be handling the put routines.
This can put a strain on the lpfc_put_cmd_rsp_buf_per_cpu routine because
all the resources are being put on a limited subset of CPUs.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc.h | 5 +
drivers/scsi/lpfc/lpfc_hw
T_IRQ flag is set.
Also contains a few small cleanup fixes and a little better logging.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_init.c | 144 ++
1 file changed, 89 insertions(+), 55 deletions(-)
diff --git a/drivers
Update lpfc to revision 12.4.0.0
This patch set contains a laundry list of fixes for lpfc. Most are small.
There are a couple of cleanup patches and several functional additions
at the tail of the patch set.
The patches were cut against Martin's 5.4/scsi-queue tree
James Smart (42):
k the logic to validate and prevent any reference to the null ptr.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_attr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
retransmission.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc.h | 1 +
drivers/scsi/lpfc/lpfc_disc.h | 2 ++
drivers/scsi/lpfc/lpfc_els.c | 4
drivers/scsi/lpfc/lpfc_hw4.h | 8
drivers/scsi/lpfc/lpfc_init.c | 8
ned-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_init.c | 7 +++
drivers/scsi/lpfc/lpfc_scsi.c | 16 +---
drivers/scsi/lpfc/lpfc_sli.c | 6 --
3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 84
ct by changing the location of where the NVME sgl information
is being applied, which will avoid any SLI-3-based adapter.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_attr.c | 10 --
drivers/scsi/lpfc/lpfc_init.c | 9 +
2 files changed, 9 inser
to a more
reasonable value.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_init.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 1ac98becb5ba..02231370428a 100644
--- a/drivers/scsi
: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_ct.c | 7 ---
drivers/scsi/lpfc/lpfc_hbadisc.c | 41 +++-
drivers/scsi/lpfc/lpfc_sli.c | 34 +++--
3 files changed, 56 insertions(+), 26 deletions
efore the driver sees the link transition.
Fix by having the link down handler in the driver run through
any outstanding ELS's and change the completion handler of the
ELS so that it will be no-op'd and released.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/
NPR_2B_DISC and UNUSED and transition the
node back to NPR state to allow the re-login to take place.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_ct.c | 25 +
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/drivers
ck is held.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_nvme.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 946642cee3df..9746808cf94f 100644
--- a/drivers
If a timer routine uses workqueues, it could fire before the
workqueue is allocated.
Fix by allocating the workqueue before the timer routines are setup
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_init.c | 11 +--
1 file changed, 5 insertions
ntation of lpfc_nvme_rescan_port. remoteport pointer
will always be NULL if a NVMe initiator only. But, grabbing of
remoteport pointer should be done under lock to coincide with
the registering of the remote port with the fc transport.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
dr
to do is
rather intrusive so this course of action was deferred.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_hw.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index 5b439a6
failed to reinit.
Fix by having the ELS completion handler identify the
driver-generated completion status and release the abort context.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_sli.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers
On 8/5/2019 6:09 PM, Ming Lei wrote:
I am wondering why you use 2 * num_possible_nodes() as the limit instead of
num_possible_nodes(), could you explain it a bit?
The number comes from most systems being dual socket systems, thus a
numa node count of 2. Some of these dual socket systems can b
queues incomplete and crashes the system.
Fix by recognizing the null mask and assigning the vector to the first
cpu in the system.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
---
drivers/scsi/lpfc/lpfc_init.c | 23 +--
1 file changed, 21 insertions(+), 2 deletions
for SCSI-MQ, performance
levels remained near maximum with the within-driver affiinitization.
A module parameter was created to allow the value set for the
nr_hw_queues to be tunable.
Signed-off-by: Dick Kennedy
Signed-off-by: James Smart
CC: Ming Lei
---
v2:
revised to set nr_hw_queues to mini
On 7/30/2019 7:31 PM, Ming Lei wrote:
Hi James,
Could the default hw queue count be set as numa node number? This way
should work
fine most of times.
Thanks,
Ming Lei
Well... I could. But I have 2 reservations:
- I assume most systems will be 2 sockets thus 2 numa nodes - there's
something
1 - 100 of 1847 matches
Mail list logo