Re: [PATCH v1] scsi: lpfc: Add auto select on IRQ_POLL

2021-01-26 Thread James Smart
pfc driver supports the Emulex LightPulse Family of Fibre Channel PCI host adapters. Reviewed-by: James Smart -- james

Re: [PATCH] scsi: lpfc: style: Simplify bool comparison

2021-01-12 Thread James Smart
(-) Reviewed-by:  James Smart -- james smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH v2] nvmet-fc: associations list protected by rcu, instead of spinlock_irq where possible.

2021-01-11 Thread James Smart
+++- 1 file changed, 38 insertions(+), 43 deletions(-) Reviewed-by: James Smart -- james smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH] nvmet-fc: associations list replaced with hlist rcu,

2021-01-11 Thread James Smart
On 12/24/2020 3:05 AM, leonid.rav...@dell.com wrote: From: Leonid Ravich to remove locking from nvmet_fc_find_target_queue which called per IO. Signed-off-by: Leonid Ravich --- drivers/nvme/target/fc.c | 54 1 file changed, 32 insertions(+),

Re: [PATCH][next] scsi: lpfc: Fix memory leak on lcb_context

2020-11-19 Thread James Smart
goto rjt; + goto rjt_free; } return 0; + +rjt_free: + kfree(lcb_context); rjt: memset(&stat, 0, sizeof(stat)); stat.un.b.lsRjtRsnCode = rjt_err; Looks good. Reviewed-by: James Smart -- james smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH][next] scsi: lpfc: remove dead code on second !ndlp check

2020-11-19 Thread James Smart
* we respond */ Looks good. Reviewed-by: James Smart -- james smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH][next] scsi: lpfc: fix pointer defereference before it is null checked issue

2020-11-19 Thread James Smart
= lpfc_cmd->rdata; + ndlp = rdata->pnode; + if (bf_get(lpfc_wcqe_c_xb, wcqe)) { /* TOREMOVE - currently this flag is checked during * the release of lpfc_iocbq. Remove once we move Looks good. Reviewed-by: James Smart -- james smime

Re: [PATCH -next] scsi: lpfc: Mark lpfc_nvmet_prep_abort_wqe with static keyword

2020-11-19 Thread James Smart
unction is called with hbalock held. **/ -void +static void lpfc_nvmet_prep_abort_wqe(struct lpfc_iocbq *pwqeq, u16 xritag, u8 opt) { union lpfc_wqe128 *wqe = &pwqeq->wqe; Zou, Thank You .  I just submitted the same patch.   Either one Martin wants to take.. :) -- james R

Re: [PATCH] scsi: lpfc: Add the missed misc_deregister() for lpfc_init()

2020-08-04 Thread James Smart
Looks fine. Reviewed-by: James Smart Thanks -- james

Re: [PATCH -next] scsi: lpfc: Add dependency on CPU_FREQ

2020-07-22 Thread James Smart
scsi/lpfc/lpfc_sli.c:7329:26: error: implicit declaration of function 'get_cpu_idle_time' Add the missing dependency. Fixes: 317aeb83c92b ("scsi: lpfc: Add blk_io_poll support for latency improvment") Cc: Dick Kennedy Cc: James Smart Signed-off-by: Guenter Roeck -

Re: linux-next: Tree for Jul 7 (scsi/lpfc/lpfc_init.c)

2020-07-07 Thread James Smart
On 7/7/2020 10:09 AM, Randy Dunlap wrote: On 7/7/20 1:08 AM, Stephen Rothwell wrote: Hi all, Changes since 20200706: on i386: when CONFIG_ACPI is not set/enabled: ../drivers/scsi/lpfc/lpfc_init.c:1265:15: error: implicit declaration of function 'get_cpu_idle_time'; did you mean 'get_cpu_d

Re: [PATCH][next] scsi: lpfc: fix inconsistent indenting

2020-07-07 Thread James Smart
= container_of(iop, struct lpfc_queue, iop); - __lpfc_sli4_hba_process_cq(cq, LPFC_IRQ_POLL); + __lpfc_sli4_hba_process_cq(cq, LPFC_IRQ_POLL); return 1; } Reviewed-by: James Smart -- james

Re: [PATCH][next] scsi: lpfc: fix less than zero comparison on unsigned int computation

2020-07-06 Thread James Smart
On 7/6/2020 6:08 AM, Colin King wrote: From: Colin Ian King The expressions start_idx - dbg_cnt is evaluated using unsigned int arthithmetic (since these variables are unsigned ints) and hence can never be less than zero, so the less than comparison is never true. Re-write the expression to c

Re: [PATCH] scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()

2020-06-23 Thread James Smart
878,8 @@ lpfc_sli4_hba_unset(struct lpfc_hba *phba) lpfc_sli4_xri_exchange_busy_wait(phba); /* per-phba callback de-registration for hotplug event */ - lpfc_cpuhp_remove(phba); + if (phba->pport) + lpfc_cpuhp_remove(phba); /* Disable PCI subsystem interrupt */ lpfc_sli4_disable_intr(phba); Reviewed-by: James Smart -- james

Re: [PATCH 1/1] nvme-fcloop: verify wwnn and wwpn format

2020-06-04 Thread James Smart
oop.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) Reviewed-by: James Smart Looks good. Sorry for the delay. -- james

Re: [PATCH] nvme-fc: Only call nvme_cleanup_cmd() for normal operations

2020-06-02 Thread James Smart
gt;remoteport.port_state == FC_OBJSTATE_ONLINE && Reviewed-by:  James Smart  -- james

Re: [PATCH] scsi: lpfc: Fix lpfc_nodelist leak when processing unsolicited event

2020-05-26 Thread James Smart
in DEV_LOSS. This sounds reasonable. At least the lpfc_nlp_init() and lpfc_nlp_get() case needs this. And I suppose this is also ok for the lfpc_enable_node(). Reviewed-by: Daniel Wagner Thanks, Daniel Looked at it here and it looks good. Reviewed-by: James Smart -- james

Re: [PATCH] scsi: lpfc: Honor module parameter lpfc_use_adisc

2019-10-21 Thread James Smart
[Sat Dec 22 23:08:20 2018] lpfc :82:00.0: 2:(0):2755 ADISC failure DID:05DF00 Status:x9/x7 Fixes: 92d7f7b0cde3 ("[SCSI] lpfc: NPIV: add NPIV support on top of SLI-3") Cc: James Smart Cc: Alex Iannicelli Signed-off-by: Daniel Wagner --- Hi, Unfortunatly, I don't really

Re: [PATCH] scsi: lpfc: Check queue pointer before use

2019-10-18 Thread James Smart
dware queues if fewer irq vectors") Cc: James Smart Signed-off-by: Daniel Wagner --- Hi, Not entirely sure if this correct. I tried to understand the logic of the mentioned patch but failed to grasps all the details. Anyway, we observe a crash in lpfc_sli4_process_missed_mbox_completions() while

Re: [GIT PULL] SCSI fixes for 5.3-rc7

2019-09-06 Thread James Smart
On 9/6/2019 4:18 PM, Linus Torvalds wrote: On Fri, Sep 6, 2019 at 1:39 PM James Bottomley wrote: diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 8d8c495b5b60..d65558619ab0 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -5715,7

Re: [PATCH 1/1] scsi: lpfc: Convert existing %pf users to %ps

2019-09-04 Thread James Smart
/scsi/lpfc/lpfc_hbadisc.c | 4 ++-- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed by: James Smart -- james

Re: [PATCH v2 3/3] nvme: fire discovery log page change events to userspace

2019-08-30 Thread James Smart
On 8/30/2019 2:07 PM, Sagi Grimberg wrote: Yes we do, userspace should use it to order events.  Does udev not handle that properly today? The problem is not ordering of events, its really about the fact that the chardev can be removed and reallocated for a different controller (could be a com

Re: [PATCH v2 3/3] nvme: fire discovery log page change events to userspace

2019-08-30 Thread James Smart
On 8/30/2019 11:08 AM, Sagi Grimberg wrote: Yes we do, userspace should use it to order events.  Does udev not handle that properly today? The problem is not ordering of events, its really about the fact that the chardev can be removed and reallocated for a different controller (could be a co

Re: [linux-next][BUG][driver/scsi/lpfc][10541f] Kernel panics when booting next kernel on my Power 9 box

2019-08-28 Thread James Smart
On 8/27/2019 10:02 PM, Abdul Haleem wrote: Greetings, linux-next kernel 5.3.0-rc1 failed to boot with kernel Oops on Power 9 box I see a recent changes to lpfc code was from commit 10541f03 scsi: lpfc: Update lpfc version to 12.4.0.0 Recent boot logs: [..snip..] see https://www.spinics.net

Re: [PATCH v2] nvme: allow 64-bit results in passthru commands

2019-08-19 Thread James Smart
On 8/19/2019 7:49 AM, Keith Busch wrote: On Mon, Aug 19, 2019 at 12:06:23AM -0700, Marta Rybczynska wrote: - On 16 Aug, 2019, at 15:16, Christoph Hellwig h...@lst.de wrote: Sorry for not replying to the earlier version, and thanks for doing this work. I wonder if instead of using our ow

Re: [PATCH] scsi: lpfc: remove redundant code

2019-08-16 Thread James Smart
On 8/7/2019 6:35 PM, Fuqian Huang wrote: Remove the redundant initialization code. Signed-off-by: Fuqian Huang --- Looks good! Reviewed-by: James Smart -- james

Re: [PATCH] scsi: lpfc: fix "NULL check before some freeing functions is not needed"

2019-08-16 Thread James Smart
/lpfc/lpfc_mem.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) Thanks Reviewed-by: James Smart -- james

Re: [PATCH] scsi: lpfc: use spin_lock_irqsave instead of spin_lock_irq in IRQ context

2019-08-16 Thread James Smart
->host_lock, flags); ndlp = __lpfc_findnode_rpi(vport, rpi); - spin_unlock_irq(shost->host_lock); + spin_unlock_irqrestore(shost->host_lock, flags); return ndlp; } Thank you. Reviewed-by: James Smart -- james

Re: [PATCH -next] scsi: lpfc: Remove unnecessary null check before kfree

2019-07-15 Thread James Smart
On 7/11/2019 7:10 AM, YueHaibing wrote: A null check before a kfree is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/scsi/lpfc/lpfc_bsg.c | 4 +--- Reviewed-by: James Smart -- james

Re: [PATCH 2/4] lpfc: reduce stack size with CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE

2019-06-28 Thread James Smart
debugfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: James Smart -- james

Re: [PATCH] scsi: lpfc: Fix backport of faf5a744f4f8 ("scsi: lpfc: avoid uninitialized variable warning")

2019-06-06 Thread James Smart
et; - /* localport is allocated from the stack, but the registration * call allocates heap memory as well as the private area. */ Reviewed-by: James Smart

Re: [PATCH] scsi: lpfc: Avoid unused function warnings

2019-06-06 Thread James Smart
27417a7 ("scsi: lpfc: Make some symbols static") Signed-off-by: Nathan Chancellor --- drivers/scsi/lpfc/lpfc_nvmet.c | 2 ++ 1 file changed, 2 insertions(+) Looks fine. Reviewed-by:  James Smart 

Re: [PATCH -next] scsi: lpfc: Make some symbols static

2019-06-04 Thread James Smart
c_sli.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) Looks good - thank You Reviewed-by: James Smart 

Re: [PATCH -next] scsi: lpfc: Remove set but not used variables 'qp'

2019-06-04 Thread James Smart
ed since commit e70596a60f88 ("scsi: lpfc: Fix poor use of hardware queues if fewer irq vectors") Signed-off-by: YueHaibing Looks good - thank You Reviewed-by: James Smart 

Re: [PATCH] scsi: lpfc: Use *_pool_zalloc rather than *_pool_alloc

2019-05-29 Thread James Smart
On 5/29/2019 1:21 PM, Thomas Meyer wrote: Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Signed-off-by: Thomas Meyer --- looks good Reviewed-by: James Smart -- james

Re: [PATCH 5/8] scsi: lpfc: change snprintf to scnprintf for possible overflow

2019-03-20 Thread James Smart
On 3/20/2019 10:39 AM, Greg KH wrote: On Tue, Jan 15, 2019 at 02:41:17PM -0800, James Smart wrote: On 1/14/2019 5:15 PM, Kees Cook wrote: On Sat, Jan 12, 2019 at 7:29 AM Willy Tarreau wrote: From: Silvio Cesare Change snprintf to scnprintf. There are generally two cases where using snprintf

Re: [PATCH 5/8] scsi: lpfc: change snprintf to scnprintf for possible overflow

2019-03-20 Thread James Smart
On 3/20/2019 10:39 AM, Greg KH wrote: On Tue, Jan 15, 2019 at 02:41:17PM -0800, James Smart wrote: On 1/14/2019 5:15 PM, Kees Cook wrote: On Sat, Jan 12, 2019 at 7:29 AM Willy Tarreau wrote: From: Silvio Cesare Change snprintf to scnprintf. There are generally two cases where using snprintf

Re: general protection fault in skb_put

2019-03-11 Thread James Smart
On 3/11/2019 9:40 AM, Dmitry Vyukov wrote: On Mon, Mar 11, 2019 at 5:20 PM 'James Smart' via syzkaller-bugs wrote: On 3/11/2019 6:20 AM, syzbot wrote: syzbot has bisected this bug to: commit 97faec531460c949d7120672b8c77e2f41f8d6d7 Author: James Smart Date: Thu Sep 13 23:17:38

Re: general protection fault in skb_put

2019-03-11 Thread James Smart
On 3/11/2019 6:20 AM, syzbot wrote: syzbot has bisected this bug to: commit 97faec531460c949d7120672b8c77e2f41f8d6d7 Author: James Smart Date:   Thu Sep 13 23:17:38 2018 +     nvme_fc: add 'nvme_discovery' sysfs attribute to fc transport device bisection l

Re: [PATCH] nvmet-fc: use zero-sized array and struct_size() in kzalloc()

2019-03-08 Thread James Smart
c_fcp_iod *)&queue[1]; queue->qid = qid; queue->sqsize = sqsize; queue->assoc = assoc; Reviewed-by:  James Smart I guess this is a better style. -- james

Re: [LKP] [workqueue] 4d43d395fe: WARNING:at_kernel/workqueue.c:#__flush_work

2019-03-04 Thread James Smart
On 3/4/2019 10:21 AM, Sagi Grimberg wrote: Forwarding to NMVE people: kernel test robot found that flush_work(&ctrl->async_event_work) is called from nvmet_ctrl_free() without INIT_WORK(&ctrl->async_event_work, nvmet_async_event_work) after ctrl was allocated (probably initialized with 0). Wil

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: linux-next: manual merge of the scsi-mkp tree with Linus' tree

2019-02-07 Thread James Smart
s anything else you'd like me to do. -- james Signed-off-by: James Smart

Re: [PATCH 5/8] scsi: lpfc: change snprintf to scnprintf for possible overflow

2019-01-15 Thread James Smart
to the buffer, so the size variable will never exceed SIZE. Signed-off-by: Silvio Cesare Cc: James Smart Cc: Dick Kennedy Cc: Dan Carpenter Cc: Kees Cook Cc: Will Deacon Cc: Greg KH Signed-off-by: Willy Tarreau I think this needs Cc: stable. Reviewed-by: Kees Cook -Kees Reviewed-by:  James

Re: [PATCH 0/4] Rework NVMe abort handling

2018-07-19 Thread James Smart
On 7/19/2018 7:54 AM, Johannes Thumshirn wrote: On Thu, Jul 19, 2018 at 04:50:05PM +0200, Christoph Hellwig wrote: The upper layer is only going to retry after tearing down the transport connection. And a tear down of the connection MUST clear all pending commands on the way. If it doesn't we

Re: [PATCH 0/4] Rework NVMe abort handling

2018-07-19 Thread James Smart
On 7/19/2018 7:10 AM, Johannes Thumshirn wrote: On Thu, Jul 19, 2018 at 03:42:03PM +0200, Christoph Hellwig wrote: Without even looking at the code yet: why? The nvme abort isn't very useful, and due to the lack of ordering between different queues almost harmful on fabrics. What problem do

Re: [PATCH v5 1/2] nvme: cache struct nvme_ctrl reference to struct nvme_request

2018-06-27 Thread James Smart
/core.c b/drivers/nvme/host/core.c index e541fe268bcf..99dd62c1076c 100644 good for the fc side... Reviewed-by:  James Smart 

Re: [PATCH 5/5] nvmet: fcloop: use irqsave spinlocks

2018-06-12 Thread James Smart
] start_secondary+0x18f/0x1b0 Signed-off-by: Johannes Thumshirn Cc: James Smart --- drivers/nvme/target/fcloop.c | 52 1 file changed, 29 insertions(+), 23 deletions(-) Looks ok. I assume it is as the bio_done call can be in an interrupt handler. Reviewed-by:   James Smart 

Re: [PATCH 4/5] nvmet: use atomic allocations when allocating fc requests

2018-06-12 Thread James Smart
(!rport->targetport) return -ECONNREFUSED; - tfcp_req = kzalloc(sizeof(*tfcp_req), GFP_KERNEL); + tfcp_req = kzalloc(sizeof(*tfcp_req), GFP_ATOMIC); if (!tfcp_req) return -ENOMEM; Reviewed-by:   James Smart 

Re: [PATCH 4/5] nvmet: use atomic allocations when allocating fc requests

2018-06-12 Thread James Smart
On 5/31/2018 2:31 AM, Sagi Grimberg wrote: Question, why isn't tfcp_req embedded in fcpreq? don't they have the same lifetime? no they don't.  To properly simulate cable-pulls, etc - the host side and controller side effectively have their own "exchange" structure. tfcp_req corresponds t

Re: [PATCH] nvme: fc: provide a descriptive error

2018-04-19 Thread James Smart
n("%s: %s - %s combination not found\n", + __func__, opts->traddr, opts->host_traddr); return ERR_PTR(-ENOENT); } Signed-off-by:  James Smart 

Re: [PATCH 4/4] nvmet-fc: Use new SGL alloc/free helper for requests

2018-03-29 Thread James Smart
On 3/29/2018 10:02 AM, Logan Gunthorpe wrote: Per the bug in the previous patch, I don't think that was ever a valid assumption. It doesn't have anything to do with the sgl_alloc change either. The dma_map interface is allowed to merge SGLs and that's why it can return fewer nents than it was pas

Re: [PATCH 4/4] nvmet-fc: Use new SGL alloc/free helper for requests

2018-03-29 Thread James Smart
the SGLs for the request. To do this, we drop the appearantly redundant data_sg and data_sg_cnt members as they are identical to the existing req.sg and req.sg_cnt. Signed-off-by: Logan Gunthorpe Cc: James Smart Cc: Christoph Hellwig Cc: Sagi Grimberg ---

Re: [PATCH 3/4] nvmet-fc: Don't use the count returned by the dma_map_sg call

2018-03-29 Thread James Smart
On 3/29/2018 9:30 AM, Logan Gunthorpe wrote: Can you elaborate? The 'data_sg_cnt' member was in 'struct nvmet_fc_fcp_iod' which is declared in fc.c so it doesn't seem sane for lower driver to access it... In fact the next patch in the series removes it completely. Logan actually, I do think it

Re: [PATCH 3/4] nvmet-fc: Don't use the count returned by the dma_map_sg call

2018-03-29 Thread James Smart
ould be created with fewer than the total number of entries. As odd as it sounds, and as far as I can tell, the number of SG entries mapped does not appear to be used anywhere in the fc driver and therefore there's no current need to store it. Signed-off-by: Logan Gunthorpe Cc: James Smart

Re: [PATCH][next] scsi: lpfc: make several unions static, fix non-ANSI prototype

2018-03-13 Thread James Smart
of function 'lpfc_nvmet_cmd_template' Signed-off-by: Colin Ian King --- drivers/scsi/lpfc/lpfc_nvme.c | 8 drivers/scsi/lpfc/lpfc_nvmet.c | 8 2 files changed, 8 insertions(+), 8 deletions(-) Signed-off-by:   James Smart

Re: [PATCH] scsi: lpfc: use memcpy_toio instead of writeq

2018-02-24 Thread James Smart
About to post a patch to fix. Rather than fidgeting with the copy routine, I want to go back to what we originally proposed - writeq() on 64bit, writel() on 32-bit. -- james On 2/23/2018 1:02 PM, Arnd Bergmann wrote: On Fri, Feb 23, 2018 at 4:36 PM, Arnd Bergmann wrote: @@ -138,12 +137,10

Re: [PATCH] nvme-pci: quiesce IO queues prior to disabling device HMB accesses

2018-02-16 Thread James Smart
On 2/12/2018 10:40 AM, Sagi Grimberg wrote: Thanks, I picked this up for 4.17 (unless someone thinks this is 4.16-rc material?) ___ Linux-nvme mailing list linux-n...@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme Note: I

Re: [PATCH V5 0/2] nvme-pci: fix the timeout case when reset is ongoing

2018-01-18 Thread James Smart
Jianchao, This looks very coherent to me. Thank You. -- james On 1/18/2018 2:10 AM, Jianchao Wang wrote: Hello Please consider the following scenario. nvme_reset_ctrl -> set state to RESETTING -> queue reset_work (scheduling) nvme_reset_work -> nvme_dev_disable -> quiesce

Re: [PATCH V5 1/2] nvme-pci: introduce RECONNECTING state to mark initializing procedure

2018-01-18 Thread James Smart
uests... RECONNECTING - establish new queues/connections and some other initializing things. Introduce RECONNECTING to nvme-pci transport to do the same mark. Then we get a coherent state definition among nvme pci/rdma/fc transports. Suggested-by: James Smart Signed-off-by: Jianchao

Re: [PATCH V4 1/2] nvme: add NVME_CTRL_RESET_PREPARE state

2018-01-17 Thread James Smart
Thanks jianchoa. This helped. On 1/17/2018 7:13 PM, jianchao.wang wrote: Actually, this patchset is to fix a issue in nvme_timeout. Please consider the following scenario. nvme_reset_ctrl -> set state to RESETTING -> queue reset_work (scheduling) nvm

Re: [PATCH V4 1/2] nvme: add NVME_CTRL_RESET_PREPARE state

2018-01-17 Thread James Smart
I'm having a hard time following why this patch is being requested. Help me catch on. On 1/16/2018 8:54 PM, Jianchao Wang wrote: Currently, the ctrl->state will be changed to NVME_CTRL_RESETTING before queue the reset work. This is not so strict. There could be a big gap before the reset_wo

Re: [Suspected-Phishing]Re: [PATCH V3 1/2] nvme: split resetting state into reset_prepate and resetting

2018-01-17 Thread James Smart
On 1/17/2018 2:37 AM, Sagi Grimberg wrote: After Sagi's nvme-rdma: fix concurrent reset and reconnect, the rdma ctrl state is changed to RECONNECTING state after some clearing and shutdown work, then some initializing procedure,  no matter reset work path or error recovery path. The fc reset

Re: [PATCH v2] nvme-fc: don't require user to enter host_traddr

2017-12-01 Thread James Smart
On 12/1/2017 12:34 AM, Johannes Thumshirn wrote: James Smart writes: On 11/30/2017 7:12 AM, Johannes Thumshirn wrote: One major usability difference between NVMf RDMA and FC is resolving the default host transport address in RDMA. This is perfectly doable in FC as well, as we already have

Re: [PATCH v2] nvme-fc: don't require user to enter host_traddr

2017-11-30 Thread James Smart
ck the first lport that has a connection to our desired rport per default or optionally use the user supplied lport if we have one. Signed-off-by: Johannes Thumshirn Cc: James Smart This is unnecessary and can create weird configurations. It assumes connections are manually created. The weirdn

Re: [PATCH] scsi: lpfc: fix kzalloc-simple.cocci warnings

2017-11-03 Thread James Smart
fs_nvmeio_trc) * - phba->nvmeio_trc_size)); phba->nvmeio_trc_on = 1; phba->nvmeio_trc_output_idx = 0; phba->nvmeio_trc = NULL; looks good. Signed-off-by:  James Smart

Re: [PATCH 3/6] scsi: lpfc: Cocci spatch "pool_zalloc-simple"

2017-09-22 Thread James Smart
On 9/20/2017 11:15 PM, Thomas Meyer wrote: Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci" Signed-off-by: Thomas Meyer --- Looks good. Thanks. Signed-off-by: James Smart

Re: [PATCH] scsi: lpfc: remove redundant null check on eqe

2017-09-14 Thread James Smart
ng Yep. thank you Signed-off-by: James Smart

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

2017-08-24 Thread James Smart
, then I'll submit that as a proper patch with your Ack. Signed-off-by: Arnd Bergmann --- a/drivers/scsi/lpfc/lpfc_debugfs.h I'm ok with either solution. I prefer less change but this is a trivial thing. Signed-off-by: James Smart -- james

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

2017-08-23 Thread James Smart
ween the two so assumes eq may not a have a value. I believe, simply initializing with a NULL will solve the issue. Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_debugfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_debugfs.h b/drivers/s

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

2017-08-23 Thread James Smart
), 1 deletion(-) looks good. Thanks Signed-off-by: James Smart -- james

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

2017-08-23 Thread James Smart
issue was detected by Coverity and it was tested by compilation only. Notice that this code has been there since 2011. drivers/scsi/lpfc/lpfc_bsg.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) looks good. Thanks Signed-off-by: James Smart -- james

Re: nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-14 Thread James Smart
On 8/14/2017 9:38 AM, Christoph Hellwig wrote: On Mon, Aug 14, 2017 at 10:19:24AM -0400, Dave Jones wrote: > + > +/* Cleanup defer'ed IOs in queue */ > +list_for_each_entry(deferfcp, &queue->avail_defer_list, req_list) { > +list_del(&deferfcp->req_list);

Re: [PATCH 1/2] scsi: lpfc: spin_lock_irq() is not nestable

2017-06-30 Thread James Smart
st") Signed-off-by: Dan Carpenter looks good. Signed-off-By: James Smart

Re: [PATCH] scsi: lpfc: fix spelling mistake "entrys" -> "entries"

2017-05-29 Thread James Smart
it's good :) Signed-off-by: James Smart -- james On 5/26/2017 3:11 AM, Colin King wrote: From: Colin Ian King Trivial fix to spelling mistake in debugfs message Signed-off-by: Colin Ian King

Re: [PATCH] scsi: lpfc: make a couple of functions static

2017-05-29 Thread James Smart
Patch is fine. Signed-off-by: James Smart -- james On 5/18/2017 2:35 AM, Colin King wrote: From: Colin Ian King functions lpfc_nvmet_cleanup_io_context and lpfc_nvmet_setup_io_context can be made static as they do not need to be in global scope. Cleans up sparse warnings: "wa

Re: [PATCH] scsi: lpfc: prevent potential null pointer dereference

2017-05-29 Thread James Smart
Looks good Signed-off-by: James Smart -- james On 5/23/2017 8:09 AM, Gustavo A. R. Silva wrote: Null check at line 966: if (ndlp) {, implies that ndlp might be NULL. Functions lpfc_nlp_set_state() and lpfc_issue_els_prli() dereference pointer ndlp. Include these function calls inside the

Re: [PATCH] lpfc: nvmet_fc: fix format string

2017-05-29 Thread James Smart
Patch is fine. Signed-off-by: James Smart -- james On 5/19/2017 1:04 AM, Arnd Bergmann wrote: The lpfc_nvmeio_data() tracing helper always takes a format string and three additional arguments. The latest caller has a format string with only two integer arguments, causing this harmless

[PATCH] lpfc: fix build issue if NVME_FC_TARGET is not defined

2017-05-16 Thread James Smart
fix build issue if NVME_FC_TARGET is not defined. noop the code. The code will never be invoked if target mode is not enabled. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvmet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/lpfc

Re: [PATCH] scsi: lpfc: fix linking against modular NVMe support

2017-03-21 Thread James Smart
Note: the patch I referenced (http://www.spinics.net/lists/linux-scsi/msg106102.html) replaced the one I think you referenced below (http://www.spinics.net/lists/linux-scsi/msg106024.html) -- james On 3/21/2017 7:23 PM, James Smart wrote: Arnd, All of the build issues, including building

Re: [PATCH] scsi: lpfc: fix linking against modular NVMe support

2017-03-21 Thread James Smart
Arnd, All of the build issues, including building as modules, should have been resolved by the following patch: http://www.spinics.net/lists/linux-scsi/msg106102.html Am I missing something ? -- james On 3/21/2017 6:09 AM, Arnd Bergmann wrote: When LPFC is built-in but NVMe is a loadable m

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

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

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

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

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

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

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

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

Re: [PATCH] scsi: lpfc: replace init_timer by setup_timer

2017-03-03 Thread James Smart
looks good -- james Signed-off-by: James Smart On 3/3/2017 4:45 AM, Jiri Slaby wrote: From: Tomas Jasek This patch shortens every init_timer in lpfc module followed by function and data assignment using setup_timer. This is purely cleanup patch, it does not add new functionality nor

Re: [PATCH] scsi: lpfc: use proper format string for dma_addr_t

2017-02-28 Thread James Smart
Arnd, Thank you. Looks good. -- james Signed-off-by: James Smart On 2/27/2017 12:37 PM, Arnd Bergmann wrote: dma_addr_t may be either u32 or u64, depending on the kernel configuration, and we get a warning for the 32-bit case: drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_nvme_l

Re: [PATCH] scsi: lpfc: use div_u64 for 64-bit division

2017-02-28 Thread James Smart
Arnd, Thank you. Looks good. -- james Signed-off-by: James Smart On 2/27/2017 12:31 PM, Arnd Bergmann wrote: The new debugfs output causes a link error on 32-bit architectures: ERROR: "__aeabi_uldivmod" [drivers/scsi/lpfc/lpfc.ko] undefined! This code is not performance criti

Re: [PATCH] lpfc: avoid double free of resource identifiers

2017-01-11 Thread James Smart
looks good. Thanks Signed-off-by: James Smart -- james On 1/11/2017 2:06 AM, Johannes Thumshirn wrote: From: Roberto Sassu Set variables initialized in lpfc_sli4_alloc_resource_identifiers() to NULL if an error occurred. Otherwise, lpfc_sli4_driver_resource_unset() attempts to free the

Re: [PATCH] nvme-fabrics: remove some logically dead code performing redundant ret checks

2016-12-19 Thread James Smart
Looks good. -- james Signed-off-by: James Smart On 12/9/2016 6:59 AM, Colin King wrote: From: Colin Ian King The check to see if ret is non-zero and return this rather than count is redundant in two occassions. It is redundant because prior to this check, the return code ret is already

Re: [patch] nvme-fabrics: correct some printk information

2016-12-19 Thread James Smart
Dan, Mind if I solve this a different way ? I really don't know why knowing the ptr value is even meaningful -- james On 12/10/2016 1:06 AM, Dan Carpenter wrote: We really don't care where "ctrl" is on the stack since we're just returning soon what we want is the actual ctrl pointer itself

Re: [PATCH] nvme-fabrics: simplify error handling of nvme_fc_create_hw_io_queues

2016-12-15 Thread James Smart
Looks fine -- james Signed-off-by: James Smart On 12/15/2016 5:20 AM, Johannes Thumshirn wrote: Simplify the error handling of nvme_fc_create_hw_io_queues(), this saves us one variable and one level of indentation. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/fc.c | 15

Re: [PATCH] lpfc: use %zd format string for size_t

2016-10-17 Thread James Smart
Thanks Signed-off-by: James Smart -- james On 10/17/2016 5:35 AM, Arnd Bergmann wrote: A recent bugfix introduced a harmless warning in the lpfc driver: drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_write_firmware': drivers/scsi/lpfc/lpfc_logmsg.h:56:45: error: format &#x

[PATCH v4] add u64 number parser

2016-09-25 Thread James Smart
add u64 number parser Reverted back to version 2 of the patch. This adds the interface using existing logic. Comments from the prior reviewers to move to kasprintf were rejected by Linus. Signed-off-by: James Smart --- include/linux/parser.h | 1 + lib/parser.c | 47

[PATCH v3] add u64 number parser

2016-09-24 Thread James Smart
add u64 number parser Prior patch revised to use kasprintf. Modified match_number to use kasprintf as well Signed-off-by: James Smart --- include/linux/parser.h | 1 + lib/parser.c | 51 ++ 2 files changed, 48 insertions(+), 4

Re: [PATCH] lpfc: Fix possible NULL pointer dereference

2016-07-28 Thread James Smart
This patch is good. Thanks -- james Signed-off-by: James Smart On 6/15/2016 6:00 AM, Johannes Thumshirn wrote: Check for the existance of pciob->vport before accessing it. Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_sli.c | 13 - 1 file changed

Re: [PATCH] add u64 number parser

2016-07-23 Thread James Smart
On 7/22/2016 6:32 PM, Bart Van Assche wrote: On 07/22/16 17:23, James Smart wrote: +buf = kmalloc(len + 1, GFP_KERNEL); +if (!buf) +return -ENOMEM; +memcpy(buf, s->from, len); +buf[len] = '\0'; Hello James, Have you considered to combine the above

[PATCH] add u64 number parser

2016-07-22 Thread James Smart
add u64 number parser Will be used by the nvme-fabrics FC transport in parsing options Signed-off-by: James Smart --- include/linux/parser.h | 1 + lib/parser.c | 47 +++ 2 files changed, 48 insertions(+) diff --git a/include/linux

Re: [PATCH 1/2] scsi: lpfc: avoid harmless comparison warning

2016-07-15 Thread James Smart
Patch is good. Thanks -- james Signed-off-by: James Smart On 6/15/2016 1:42 PM, Arnd Bergmann wrote: When building with -Wextra, we get a lot of warnings for the lpfc driver concerning expressions that are always true, starting with: drivers/scsi/lpfc/lpfc_attr.c: In function

Re: [RFC PATCH] lpfc: Add lockdep assertions

2015-12-16 Thread James Smart
Johannes, Thank you for the time and effort on the patch. At this time, as it doesn't functionally change anything, I did not include the patch. I will consider it if we see additional issues it can help resolve. -- james s On 11/20/2015 4:37 AM, Johannes Thumshirn wrote: Several functions

  1   2   >