RE: [PATCH 1/1] target:separate tx/rx cmd_puds

2018-04-07 Thread Zhang Zhuoyu


> -Original Message-
> From: David Disseldorp [mailto:dd...@suse.de]
> Sent: Friday, April 6, 2018 8:10 PM
> To: Zhang Zhuoyu 
> Cc: n...@linux-iscsi.org; linux-scsi@vger.kernel.org; target-
> de...@vger.kernel.org; linux-ker...@vger.kernel.org
> Subject: Re: [PATCH 1/1] target:separate tx/rx cmd_puds
> 
> On Thu, 5 Apr 2018 13:12:12 +0200, David Disseldorp wrote:
> 
> > > -CONFIGFS_ATTR_RO(target_stat_tgt_port_, in_cmds);
> > > +CONFIGFS_ATTR_RO(target_stat_tgt_port_, tx_cmds);
> > > +CONFIGFS_ATTR_RO(target_stat_tgt_port_, rx_cmds);
> >
> > I don't think the in_cmds metric should be deleted here. It could be
> > calculated on the fly via tx_cmds + rx_cmds + nodata_cmds.
> 
> @Zhang Zhuoyu: How about something like the following?
> https://git.samba.org/?p=ddiss/linux.git;a=commitdiff;h=73723ccf433424721
> 830797d70cfb88d4596e0fc
> 

Mmm... This patch is much better. 
Looks good to me.

Zhuoyu

> ...this keeps the in_cmds metric, and renames tx/rx_cmds read/write_cmds
> respectively. read/write_cmds is still a bit ambiguous, as it refers to
the
> command data direction rather than SCSI READ/WRITE CDBs, but IMO it's
> clearer, and more consistent with the read/write_mbytes metrics.
> 
> Cheers, David





[PATCH v7] scsi: new zorro_esp.c for Amiga Zorro NCR53C9x boards

2018-04-07 Thread Michael Schmitz
New combined SCSI driver for all ESP based Zorro SCSI boards for
m68k Amiga.

Code largely based on board specific parts of the old drivers (blz1230.c,
blz2060.c, cyberstorm.c, cyberstormII.c, fastlane.c which were removed
after the 2.6 kernel series for lack of maintenance) with contributions
by Tuomas Vainikka (TCQ bug tests and workaround) and Finn Thain (TCQ
bugfix by use of PIO in extended message in transfer).

New Kconfig option and Makefile entries for new Amiga Zorro ESP SCSI
driver included in this patch.

Use DMA transfers wherever possible, with board-specific DMA set-up
functions copied from the old driver code. Three byte reselection messages
do appear to cause DMA timeouts. So wire up a PIO transfer routine for
these instead. esp_reselect_with_tag explicitly sets esp->cmd_block_dma as
target address for the message bytes but PIO requires a virtual address.
Substiute kernel virtual address esp->cmd_block in PIO transfer call if
DMA address is esp->cmd_block_dma and phase is message in.

PIO code taken from mac_esp.c where the reselection timeout issue was
debugged and fixed first, with minor macro and function rename.

Signed-off-by: Michael Schmitz 
Reviewed-by: Finn Thain 

---

Changes since v1:

Fixed issues raised by Finn Thain in initial code review:

- use KBUILD_MODNAME for driver name string.
- use pr_fmt() for pr_* format prefix.
- clean up DMA error reporting: clear error flag before each DMA
  operation, set error flag on PIO error. Don't test phase in dma_err hook.
- change confusing comment about semantics of read flag, add comments
  indicating DMA direction to DMA setup hooks.
- drop spurious braces around switch clauses.
- lift cfreq setting out of ID switch clauses.
- fix indentation.
- fix error codes on probe fail.
- drop check for board ID when unmapping DMA regs in error handling:
  the ioaddr > 0xff test already catches all cases where the DMA
  registers were ioremapped.
- dynamically alloc zorro_private_data.
- fix use of driver_data field (don't mix host and zorro_esp_priv
  pointers). Note: require esp pointer in zorro_esp_priv to find host
  pointer!
- back out phase bits changes to pio_cmd !write branch introduced
  to cope with ESP SELAS command. We don't use that code so keep
  it in sync with Finn's version.
- use esp_ops.dma_length_limit() to limit transfer size. After review
  of old driver code, use 0xff max transfer size throughout.

Fixed issues raised by Geert Uytterhoven:

- dynamically alloc zorro_private_data, store as device drvdata.
- store ctrl_data for CyberStormI in driver private data.
- use dma_sync_single_for_device() instead of cache_push/clear.
- handle case of duplicate board identity - check whether board is
  Zorro III or Zorro II (use ROM resource data for this). Also fix
  up DMA mask for Zorro II boards to 32 bits (these are really CPU
  expansion slot boards).
- remove zorro3 field from driver_data struct (now in private data).
- add braces around ambiguous if - else construct.
- use named structs instead of array for board config data.
- use scsi_option driver data flag for boards with optional ESP.

Other improvements and bugfixes

- fix Zorro device table error (duplicate ID used, also raised
  by Kars de Jong).
- error code fixup in error handling path.
- add separate DMA setup for Blizzard 1230 II board.
- add support for Cyberstorm II board.
- add register structs and DMA setup for Zorro III Fastlane board,
  following logic from old fastlane.c driver. Wire up Fastlane DMA
  and interrupt status routines, map the necessary low 24 bit board
  address space used for DMA target address setting. Clean up DMA
  register space ioremap() branch for Zorro III boards (currently
  Fastlane only) to end confusion about what to do in error recovery.
- use esp_ops.fastlane_esp_dma_invalidate() on Fastlane (and skip
  fastlane_esp_reset_dma() in DMA setup).
- credit Tuomas Vainikka for contributing Blizzard 1230 code (and
  testing).
- clarify comment about unsupported Oktagon SCSI board.
- remove unused const definitions carried over from old driver.

Changes since v2:

- add SPDX-License-Identifier.
- remove unused ratelimit.h.
- drop phys_to_virt() in PIO transfer routine, after ensuring PIO is only
  used for message in transfers to esp->command_block. This obviates any
  need for finding the virtual address corresponding to a DMA handle.
- drop BUG_ON(!(cmd & ESP_CMD_DMA)) assertion in DMA setup. Short of changes
  to the core ESP driver, this can never trigger.
- make ioremap() of DMA address range conditional on zep->zorro3 and use
  that same condition to unmap in error handling and driver exit.
  Omit board ID test as we only support a single Zorro III board, and add
  comment on what to do when adding support for more boards.
- free driver private data in driver exit.
- various whitespace related cleanup.

Changes since v3:

Finn  Thain:
- substitute esp->command_block for 

Re: [PATCH v2] scsi_debug: implement IMMED bit

2018-04-07 Thread Ming Lei
On Fri, Feb 09, 2018 at 09:36:39PM -0500, Douglas Gilbert wrote:
> The Start Stop Unit (SSU) command takes in the order of a second to
> complete on some SAS SSDs and longer on hard disks. Synchronize Cache (SC)
> can also take some time. Both commands have an IMMED bit in their cdbs for
> those apps that don't want to wait. This patch introduces a long delay for
> those commands when the IMMED bit is clear.
> Since SC is a media access command then when the fake_rw option is active,
> its cdb processing is skipped and it returns immediately. The SSU command
> is not altered by the setting of the fake_rw option. These actions are
> not changed by this patch.
> 
> Changes since v1:
>   - clear the cdb mask of SYNCHRONIZE CACHE(16) cdb in byte 1, bit 0
> 
> Changes:
>   - add the SYNCHRONIZE CACHE(16) command
>   - together with the existing START STOP UNIT and SYNCHRONIZE CACHE(10)
> commands process the IMMED bit in their cdbs
>   - if the IMMED bit is set, return immediately
>   - if the IMMED bit is clear, treat the delay parameter as having
> a unit of one second
>   - in the SYNCHRONIZE CACHE processing do a bounds check

Hello Douglas,

I found this patch makes my test on scsi_debug much much slow, and
basically make scsi_debug not usable in sync IO related tests, such
as make partitions(parted), or 'dbench -s'.

For example:

1) scsi_debug:
  modprobe scsi_debug dev_size_mb=1024 max_queue=1

2) parted
- time taken by the following commands is increased from 1.3sec to 22.3 sec

parted -m -s -a none $DISK mkpart primary 0MB 32MB &&
   parted -m -s -a none $DISK mkpart primary 32MB $DEV_SIZE

3) dbench(dbench -t 20 -s 64)
- write throughput is decreased from 38MB to 1.89MB 

Definitely it doesn't simulate an actual scsi device from performance
view.

IMO, this kind of simulation by completing SYNCHRONIZE_CACHE in unit of
second shouldn't be good since the actual completion time depends if
there is data cached in drive, or how much data is cached.

So is it possible to remove the very very slow response by doing that
only for 1/nth times?  For example, do long delay for every 10 or 20
SYNCHRONIZE_CACHE commands.

Or other approaches to avoid this issue?


Thanks,
Ming


Re: [PATCH v6] scsi: new zorro_esp.c for Amiga Zorro NCR53C9x boards

2018-04-07 Thread Michael Schmitz
Hi Finn,

Am 07.04.2018 um 22:19 schrieb Finn Thain:
> On Sat, 7 Apr 2018, Michael Schmitz wrote:
> 
>>>
>>>   CHECK   /home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c
>>> drivers/scsi/zorro_esp.c:274:14: warning: cast removes address space of 
>>> expression
>>> drivers/scsi/zorro_esp.c:712:14: warning: cast removes address space of 
>>> expression
>>>
>>> Why not just call writel() and get rid of the 't' temporary pointer?
>>
>> As far as I can see, that will invoke cpu_to_le32() on the data written.
> 
> Good point.
> 
> Since this is zorro card driver, why not use z_writel()?

Equally good point - that's what it's there for.

Cheers,

Michael




[PATCH 03/14] lpfc: Add per io channel NVME IO statistics

2018-04-07 Thread James Smart
When debugging various issues, per IO channel IO statistics were useful
to understand what was happening. However, many of the stats were on a
port basis rather than an io channel basis.

Move statistics to an io channel basis.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc.h |   6 ---
 drivers/scsi/lpfc/lpfc_attr.c|  40 +--
 drivers/scsi/lpfc/lpfc_debugfs.c |  65 
 drivers/scsi/lpfc/lpfc_init.c|  36 -
 drivers/scsi/lpfc/lpfc_nvme.c| 107 ++-
 drivers/scsi/lpfc/lpfc_nvme.h|  10 
 6 files changed, 173 insertions(+), 91 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index be4abe52f289..2b47c69c1732 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -920,12 +920,6 @@ struct lpfc_hba {
atomic_t fc4ScsiOutputRequests;
atomic_t fc4ScsiControlRequests;
atomic_t fc4ScsiIoCmpls;
-   atomic_t fc4NvmeInputRequests;
-   atomic_t fc4NvmeOutputRequests;
-   atomic_t fc4NvmeControlRequests;
-   atomic_t fc4NvmeIoCmpls;
-   atomic_t fc4NvmeLsRequests;
-   atomic_t fc4NvmeLsCmpls;
 
uint64_t bg_guard_err_cnt;
uint64_t bg_apptag_err_cnt;
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index c89ffad1f43d..3a6b1be18886 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -151,8 +151,11 @@ lpfc_nvme_info_show(struct device *dev, struct 
device_attribute *attr,
struct lpfc_nvme_lport *lport;
struct lpfc_nodelist *ndlp;
struct nvme_fc_remote_port *nrport;
-   uint64_t data1, data2, data3, tot;
+   struct lpfc_nvme_ctrl_stat *cstat;
+   uint64_t data1, data2, data3;
+   uint64_t totin, totout, tot;
char *statep;
+   int i;
int len = 0;
 
if (!(phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME)) {
@@ -364,11 +367,14 @@ lpfc_nvme_info_show(struct device *dev, struct 
device_attribute *attr,
}
spin_unlock_irq(shost->host_lock);
 
+   if (!lport)
+   return len;
+
len += snprintf(buf + len, PAGE_SIZE - len, "\nNVME Statistics\n");
len += snprintf(buf+len, PAGE_SIZE-len,
"LS: Xmt %010x Cmpl %010x Abort %08x\n",
-   atomic_read(>fc4NvmeLsRequests),
-   atomic_read(>fc4NvmeLsCmpls),
+   atomic_read(>fc4NvmeLsRequests),
+   atomic_read(>fc4NvmeLsCmpls),
atomic_read(>xmt_ls_abort));
 
len += snprintf(buf + len, PAGE_SIZE - len,
@@ -377,28 +383,32 @@ lpfc_nvme_info_show(struct device *dev, struct 
device_attribute *attr,
atomic_read(>cmpl_ls_xb),
atomic_read(>cmpl_ls_err));
 
-   tot = atomic_read(>fc4NvmeIoCmpls);
-   data1 = atomic_read(>fc4NvmeInputRequests);
-   data2 = atomic_read(>fc4NvmeOutputRequests);
-   data3 = atomic_read(>fc4NvmeControlRequests);
+   totin = 0;
+   totout = 0;
+   for (i = 0; i < phba->cfg_nvme_io_channel; i++) {
+   cstat = >cstat[i];
+   tot = atomic_read(>fc4NvmeIoCmpls);
+   totin += tot;
+   data1 = atomic_read(>fc4NvmeInputRequests);
+   data2 = atomic_read(>fc4NvmeOutputRequests);
+   data3 = atomic_read(>fc4NvmeControlRequests);
+   totout += (data1 + data2 + data3);
+   }
len += snprintf(buf+len, PAGE_SIZE-len,
-   "FCP: Rd %016llx Wr %016llx IO %016llx\n",
-   data1, data2, data3);
+   "Total FCP Cmpl %016llx Issue %016llx "
+   "OutIO %016llx\n",
+   totin, totout, totout - totin);
 
len += snprintf(buf+len, PAGE_SIZE-len,
-   "noxri %08x nondlp %08x qdepth %08x "
+   "  abort %08x noxri %08x nondlp %08x qdepth %08x "
"wqerr %08x\n",
+   atomic_read(>xmt_fcp_abort),
atomic_read(>xmt_fcp_noxri),
atomic_read(>xmt_fcp_bad_ndlp),
atomic_read(>xmt_fcp_qdepth),
atomic_read(>xmt_fcp_wqerr));
 
len += snprintf(buf + len, PAGE_SIZE - len,
-   "Cmpl %016llx Outstanding %016llx Abort %08x\n",
-   tot, ((data1 + data2 + data3) - tot),
-   atomic_read(>xmt_fcp_abort));
-
-   len += snprintf(buf + len, PAGE_SIZE - len,
"FCP CMPL: xb %08x Err %08x\n",
atomic_read(>cmpl_fcp_xb),
atomic_read(>cmpl_fcp_err));
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index 

[PATCH 00/14] lpfc updates for 12.0.0.2

2018-04-07 Thread James Smart
This patch contains lpfc bug fixes

The patches were cut against the Martin's 4.17/scsi-queue tree


James Smart (14):
  lpfc: Fix multiple PRLI completion error path
  lpfc: Correct target queue depth application changes
  lpfc: Add per io channel NVME IO statistics
  lpfc: Enlarge nvmet asynchronous receive buffer counts
  lpfc: Fix Abort request WQ selection
  lpfc: Fix lingering lpfc_wq resource after driver unload
  lpfc: Fix NULL pointer access in lpfc_nvme_info_show
  lpfc: Fix WQ/CQ creation for older asic's.
  lpfc: Fix driver not recovering NVME rports during target link faults
  lpfc: Fix nvme remoteport registration race conditions
  lpfc: Fix NULL pointer reference when resetting adapter
  lpfc: Fix create_association oops on unloading LPFC driver
  lpfc: Correct missing remoteport registration during link bounces
  lpfc: update driver version to 12.0.0.2

 drivers/scsi/lpfc/lpfc.h   |   9 +--
 drivers/scsi/lpfc/lpfc_attr.c  | 112 ++--
 drivers/scsi/lpfc/lpfc_ct.c|  10 +++
 drivers/scsi/lpfc/lpfc_debugfs.c   |  93 ---
 drivers/scsi/lpfc/lpfc_els.c   |   1 -
 drivers/scsi/lpfc/lpfc_hbadisc.c   |  24 +-
 drivers/scsi/lpfc/lpfc_hw4.h   |  12 +++
 drivers/scsi/lpfc/lpfc_init.c  |  62 +++-
 drivers/scsi/lpfc/lpfc_nportdisc.c |  29 ++--
 drivers/scsi/lpfc/lpfc_nvme.c  | 146 +++--
 drivers/scsi/lpfc/lpfc_nvme.h  |  14 
 drivers/scsi/lpfc/lpfc_nvmet.h |   6 +-
 drivers/scsi/lpfc/lpfc_scsi.c  |  31 +++-
 drivers/scsi/lpfc/lpfc_sli.c   |  16 ++--
 drivers/scsi/lpfc/lpfc_sli4.h  |   1 +
 drivers/scsi/lpfc/lpfc_version.h   |   2 +-
 16 files changed, 398 insertions(+), 170 deletions(-)

-- 
2.13.1



[PATCH 10/14] lpfc: Fix nvme remoteport registration race conditions

2018-04-07 Thread James Smart
On tests adding and removing a remote port, calls to nvme_info would
eventually show fewer target ports discovered than were present in
the san. Additionally, the following error messages were seen:
  6031 RemotePort Registration failed err: -116, DID x471301

There is a race condition that exists between the driver and the nvme
transport on remote port unregister vs the confirmed deletion. It's
possible that the driver may rediscover the remote port and reregister
the remote port before a prior unregister delete callback was made
(as it rebinded to the prior remoteport structure). However, the
driver was coded to expect the callback before seeing the remote
port again thus a new registration. The logic results in the driver
having an invalid remoteport pointer set.

Correct by tracking when waiting for the delete callback. In cases
where the ndlp remoteport pointer is updated, it is only cleared
when the wait has not been superceded by a prior registration.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_nvme.c | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 22962b08c275..a0257478b63c 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -334,8 +334,14 @@ lpfc_nvme_remoteport_delete(struct nvme_fc_remote_port 
*remoteport)
"6146 remoteport delete of remoteport %p\n",
remoteport);
spin_lock_irq(>phba->hbalock);
-   ndlp->nrport = NULL;
-   ndlp->upcall_flags &= ~NLP_WAIT_FOR_UNREG;
+
+   /* The register rebind might have occurred before the delete
+* downcall.  Guard against this race.
+*/
+   if (ndlp->upcall_flags & NLP_WAIT_FOR_UNREG) {
+   ndlp->nrport = NULL;
+   ndlp->upcall_flags &= ~NLP_WAIT_FOR_UNREG;
+   }
spin_unlock_irq(>phba->hbalock);
 
/* Remove original register reference. The host transport
@@ -2691,6 +2697,12 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct 
lpfc_nodelist *ndlp)
 * a resume of the existing rport.  Else this is a
 * new rport.
 */
+   /* Guard against an unregister/reregister
+* race that leaves the WAIT flag set.
+*/
+   spin_lock_irq(>phba->hbalock);
+   ndlp->upcall_flags &= ~NLP_WAIT_FOR_UNREG;
+   spin_unlock_irq(>phba->hbalock);
rport = remote_port->private;
if (oldrport) {
if (oldrport == remote_port->private) {
-- 
2.13.1



[PATCH 14/14] lpfc: update driver version to 12.0.0.2

2018-04-07 Thread James Smart
Update the driver version to 12.0.0.2

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 e8b089abbfb3..0cd474bb0bdd 100644
--- a/drivers/scsi/lpfc/lpfc_version.h
+++ b/drivers/scsi/lpfc/lpfc_version.h
@@ -20,7 +20,7 @@
  * included with this package. *
  ***/
 
-#define LPFC_DRIVER_VERSION "12.0.0.1"
+#define LPFC_DRIVER_VERSION "12.0.0.2"
 #define LPFC_DRIVER_NAME   "lpfc"
 
 /* Used for SLI 2/3 */
-- 
2.13.1



[PATCH 11/14] lpfc: Fix NULL pointer reference when resetting adapter

2018-04-07 Thread James Smart
Points referencing local port structures didn't accommodate cases
where the localport may not be registered yet.

Add NULL pointer checks to logic.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_nvme.c | 36 
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index a0257478b63c..9e0345697e1b 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -364,16 +364,18 @@ lpfc_nvme_cmpl_gen_req(struct lpfc_hba *phba, struct 
lpfc_iocbq *cmdwqe,
struct lpfc_dmabuf *buf_ptr;
struct lpfc_nodelist *ndlp;
 
-   lport = (struct lpfc_nvme_lport *)vport->localport->private;
pnvme_lsreq = (struct nvmefc_ls_req *)cmdwqe->context2;
status = bf_get(lpfc_wcqe_c_status, wcqe) & LPFC_IOCB_STATUS_MASK;
 
-   if (lport) {
-   atomic_inc(>fc4NvmeLsCmpls);
-   if (status) {
-   if (bf_get(lpfc_wcqe_c_xb, wcqe))
-   atomic_inc(>cmpl_ls_xb);
-   atomic_inc(>cmpl_ls_err);
+   if (vport->localport) {
+   lport = (struct lpfc_nvme_lport *)vport->localport->private;
+   if (lport) {
+   atomic_inc(>fc4NvmeLsCmpls);
+   if (status) {
+   if (bf_get(lpfc_wcqe_c_xb, wcqe))
+   atomic_inc(>cmpl_ls_xb);
+   atomic_inc(>cmpl_ls_err);
+   }
}
}
 
@@ -980,15 +982,17 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct 
lpfc_iocbq *pwqeIn,
rport = lpfc_ncmd->nrport;
status = bf_get(lpfc_wcqe_c_status, wcqe);
 
-   lport = (struct lpfc_nvme_lport *)vport->localport->private;
-   if (lport) {
-   idx = lpfc_ncmd->cur_iocbq.hba_wqidx;
-   cstat = >cstat[idx];
-   atomic_inc(>fc4NvmeIoCmpls);
-   if (status) {
-   if (bf_get(lpfc_wcqe_c_xb, wcqe))
-   atomic_inc(>cmpl_fcp_xb);
-   atomic_inc(>cmpl_fcp_err);
+   if (vport->localport) {
+   lport = (struct lpfc_nvme_lport *)vport->localport->private;
+   if (lport) {
+   idx = lpfc_ncmd->cur_iocbq.hba_wqidx;
+   cstat = >cstat[idx];
+   atomic_inc(>fc4NvmeIoCmpls);
+   if (status) {
+   if (bf_get(lpfc_wcqe_c_xb, wcqe))
+   atomic_inc(>cmpl_fcp_xb);
+   atomic_inc(>cmpl_fcp_err);
+   }
}
}
 
-- 
2.13.1



[PATCH 01/14] lpfc: Fix multiple PRLI completion error path

2018-04-07 Thread James Smart
Nodelist entry for SCSI array ends up in UNMAPPED state. This is
due to illegal discovery State machine transition because of two
PRLIs and the first one failing with LS_RJT. Also, the error path
was designed assuming the PRLIs complete in the order they were
sent, FCP first, then NVME. In a failing case, the array thinks
about the first PRLI (FCP), but issues LS_RJT for the 2nd PRLI
immediately.

Fix PRLI completion error path for the ordering expectation.
Ensure the discovery state machine update is not set until all
outstanding PRLIs are complete.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_nportdisc.c | 29 ++---
 1 file changed, 6 insertions(+), 23 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c 
b/drivers/scsi/lpfc/lpfc_nportdisc.c
index 022060636ae1..e790c0bc64fc 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -1936,31 +1936,14 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, 
struct lpfc_nodelist *ndlp,
goto out;
}
 
-   /* When the rport rejected the FCP PRLI as unsupported.
-* This should only happen in Pt2Pt so an NVME PRLI
-* should be outstanding still.
-*/
-   if (npr && ndlp->nlp_flag & NLP_FCP_PRLI_RJT) {
+   /* Adjust the nlp_type accordingly if the PRLI failed */
+   if (npr)
ndlp->nlp_fc4_type &= ~NLP_FC4_FCP;
-   goto out_err;
-   }
-
-   /* The LS Req had some error.  Don't let this be a
-* target.
-*/
-   if ((ndlp->fc4_prli_sent == 1) &&
-   (ndlp->nlp_state == NLP_STE_PRLI_ISSUE) &&
-   (ndlp->nlp_type & (NLP_FCP_TARGET | NLP_FCP_INITIATOR)))
-   /* The FCP PRLI completed successfully but
-* the NVME PRLI failed.  Since they are sent in
-* succession, allow the FCP to complete.
-*/
-   goto out_err;
+   if (nvpr)
+   ndlp->nlp_fc4_type &= ~NLP_FC4_NVME;
 
-   ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE;
-   ndlp->nlp_type |= NLP_FCP_INITIATOR;
-   lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE);
-   return ndlp->nlp_state;
+   /* We can't set the DSM state till BOTH PRLIs complete */
+   goto out_err;
}
 
if (npr && (npr->acceptRspCode == PRLI_REQ_EXECUTED) &&
-- 
2.13.1



[PATCH 05/14] lpfc: Fix Abort request WQ selection

2018-04-07 Thread James Smart
When running loads that generated aborts, io errors where seen.
Turns out the abort requests where not placed on the proper
WQ resulting in the errors. Closer inspection inspection of this
error also showed improper spinlock api use.

Correct the WQ selection policy for the abort requests.
Correct spin_lock/spin_lock_irq/spin_lock_irqsave usage.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_scsi.c | 12 ++--
 drivers/scsi/lpfc/lpfc_sli.c  | 14 +++---
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 8570486013f3..7932bf30c8d7 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -1021,7 +1021,7 @@ lpfc_get_scsi_buf_s4(struct lpfc_hba *phba, struct 
lpfc_nodelist *ndlp)
if (lpfc_test_rrq_active(phba, ndlp,
 lpfc_cmd->cur_iocbq.sli4_lxritag))
continue;
-   list_del(_cmd->list);
+   list_del_init(_cmd->list);
found = 1;
break;
}
@@ -1036,7 +1036,7 @@ lpfc_get_scsi_buf_s4(struct lpfc_hba *phba, struct 
lpfc_nodelist *ndlp)
if (lpfc_test_rrq_active(
phba, ndlp, lpfc_cmd->cur_iocbq.sli4_lxritag))
continue;
-   list_del(_cmd->list);
+   list_del_init(_cmd->list);
found = 1;
break;
}
@@ -4716,7 +4716,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
int ret = SUCCESS, status = 0;
struct lpfc_sli_ring *pring_s4;
int ret_val;
-   unsigned long flags, iflags;
+   unsigned long flags;
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(waitq);
 
status = fc_block_scsi_eh(cmnd);
@@ -4816,16 +4816,16 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl;
abtsiocb->vport = vport;
if (phba->sli_rev == LPFC_SLI_REV4) {
-   pring_s4 = lpfc_sli4_calc_ring(phba, iocb);
+   pring_s4 = lpfc_sli4_calc_ring(phba, abtsiocb);
if (pring_s4 == NULL) {
ret = FAILED;
goto out_unlock;
}
/* Note: both hbalock and ring_lock must be set here */
-   spin_lock_irqsave(_s4->ring_lock, iflags);
+   spin_lock(_s4->ring_lock);
ret_val = __lpfc_sli_issue_iocb(phba, pring_s4->ringno,
abtsiocb, 0);
-   spin_unlock_irqrestore(_s4->ring_lock, iflags);
+   spin_unlock(_s4->ring_lock);
} else {
ret_val = __lpfc_sli_issue_iocb(phba, LPFC_FCP_RING,
abtsiocb, 0);
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index e0a8c8008195..38993efbe37e 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -11300,11 +11300,11 @@ lpfc_sli_abort_taskmgmt(struct lpfc_vport *vport, 
struct lpfc_sli_ring *pring,
unsigned long iflags;
struct lpfc_sli_ring *pring_s4;
 
-   spin_lock_irq(>hbalock);
+   spin_lock_irqsave(>hbalock, iflags);
 
/* all I/Os are in process of being flushed */
if (phba->hba_flag & HBA_FCP_IOQ_FLUSH) {
-   spin_unlock_irq(>hbalock);
+   spin_unlock_irqrestore(>hbalock, iflags);
return 0;
}
sum = 0;
@@ -11366,14 +11366,14 @@ lpfc_sli_abort_taskmgmt(struct lpfc_vport *vport, 
struct lpfc_sli_ring *pring,
iocbq->iocb_flag |= LPFC_DRIVER_ABORTED;
 
if (phba->sli_rev == LPFC_SLI_REV4) {
-   pring_s4 = lpfc_sli4_calc_ring(phba, iocbq);
-   if (pring_s4 == NULL)
+   pring_s4 = lpfc_sli4_calc_ring(phba, abtsiocbq);
+   if (!pring_s4)
continue;
/* Note: both hbalock and ring_lock must be set here */
-   spin_lock_irqsave(_s4->ring_lock, iflags);
+   spin_lock(_s4->ring_lock);
ret_val = __lpfc_sli_issue_iocb(phba, pring_s4->ringno,
abtsiocbq, 0);
-   spin_unlock_irqrestore(_s4->ring_lock, iflags);
+   spin_unlock(_s4->ring_lock);
} else {
ret_val = __lpfc_sli_issue_iocb(phba, pring->ringno,
abtsiocbq, 0);
@@ -11385,7 +11385,7 @@ lpfc_sli_abort_taskmgmt(struct lpfc_vport *vport, 
struct lpfc_sli_ring *pring,
else
sum++;
}

[PATCH 07/14] lpfc: Fix NULL pointer access in lpfc_nvme_info_show

2018-04-07 Thread James Smart
After making remoteport unregister requests, the ndlp nrport pointer
was stale.

Track when waiting for waiting for unregister completion callback and
adjust nldp pointer assignment.  Add a few safety checks for NULL
pointer values.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_attr.c| 16 
 drivers/scsi/lpfc/lpfc_debugfs.c |  8 ++--
 drivers/scsi/lpfc/lpfc_nvme.c| 13 +
 drivers/scsi/lpfc/lpfc_nvme.h|  4 
 4 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 15f921d8ea56..fd3b25317887 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -149,6 +149,7 @@ lpfc_nvme_info_show(struct device *dev, struct 
device_attribute *attr,
struct lpfc_nvmet_tgtport *tgtp;
struct nvme_fc_local_port *localport;
struct lpfc_nvme_lport *lport;
+   struct lpfc_nvme_rport *rport;
struct lpfc_nodelist *ndlp;
struct nvme_fc_remote_port *nrport;
struct lpfc_nvme_ctrl_stat *cstat;
@@ -312,11 +313,14 @@ lpfc_nvme_info_show(struct device *dev, struct 
device_attribute *attr,
localport->port_id, statep);
 
list_for_each_entry(ndlp, >fc_nodes, nlp_listp) {
-   if (!ndlp->nrport)
+   rport = lpfc_ndlp_get_nrport(ndlp);
+   if (!rport)
continue;
 
/* local short-hand pointer. */
-   nrport = ndlp->nrport->remoteport;
+   nrport = rport->remoteport;
+   if (!nrport)
+   continue;
 
/* Port state is only one of two values for now. */
switch (nrport->port_state) {
@@ -3290,6 +3294,9 @@ lpfc_update_rport_devloss_tmo(struct lpfc_vport *vport)
 {
struct Scsi_Host  *shost;
struct lpfc_nodelist  *ndlp;
+#if (IS_ENABLED(CONFIG_NVME_FC))
+   struct lpfc_nvme_rport *rport;
+#endif
 
shost = lpfc_shost_from_vport(vport);
spin_lock_irq(shost->host_lock);
@@ -3299,8 +3306,9 @@ lpfc_update_rport_devloss_tmo(struct lpfc_vport *vport)
if (ndlp->rport)
ndlp->rport->dev_loss_tmo = vport->cfg_devloss_tmo;
 #if (IS_ENABLED(CONFIG_NVME_FC))
-   if (ndlp->nrport)
-   nvme_fc_set_remoteport_devloss(ndlp->nrport->remoteport,
+   rport = lpfc_ndlp_get_nrport(ndlp);
+   if (rport)
+   nvme_fc_set_remoteport_devloss(rport->remoteport,
   vport->cfg_devloss_tmo);
 #endif
}
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index cd3eb6b71398..afe7883c988a 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -552,6 +552,7 @@ lpfc_debugfs_nodelist_data(struct lpfc_vport *vport, char 
*buf, int size)
struct nvme_fc_local_port *localport;
struct lpfc_nvmet_tgtport *tgtp;
struct nvme_fc_remote_port *nrport;
+   struct lpfc_nvme_rport *rport;
 
cnt = (LPFC_NODELIST_SIZE / LPFC_NODELIST_ENTRY_SIZE);
outio = 0;
@@ -695,10 +696,13 @@ lpfc_debugfs_nodelist_data(struct lpfc_vport *vport, char 
*buf, int size)
len += snprintf(buf + len, size - len, "\tRport List:\n");
list_for_each_entry(ndlp, >fc_nodes, nlp_listp) {
/* local short-hand pointer. */
-   if (!ndlp->nrport)
+   rport = lpfc_ndlp_get_nrport(ndlp);
+   if (!rport)
continue;
 
-   nrport = ndlp->nrport->remoteport;
+   nrport = rport->remoteport;
+   if (!nrport)
+   continue;
 
/* Port state is only one of two values for now. */
switch (nrport->port_state) {
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 1414c581c0b6..1cb2c634e9f7 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -335,6 +335,7 @@ lpfc_nvme_remoteport_delete(struct nvme_fc_remote_port 
*remoteport)
remoteport);
spin_lock_irq(>phba->hbalock);
ndlp->nrport = NULL;
+   ndlp->upcall_flags &= ~NLP_WAIT_FOR_UNREG;
spin_unlock_irq(>phba->hbalock);
 
/* Remove original register reference. The host transport
@@ -2646,6 +2647,7 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct 
lpfc_nodelist *ndlp)
struct nvme_fc_local_port *localport;
struct lpfc_nvme_lport *lport;
struct lpfc_nvme_rport *rport;
+   struct lpfc_nvme_rport *oldrport;
struct nvme_fc_remote_port *remote_port;
struct nvme_fc_port_info rpinfo;
struct lpfc_nodelist *prev_ndlp;
@@ -2678,7 +2680,9 @@ lpfc_nvme_register_port(struct 

[PATCH 08/14] lpfc: Fix WQ/CQ creation for older asic's.

2018-04-07 Thread James Smart
The patch to enlarge WQ/CQ creation keys off of an adapter
response that indicates support for the larger values. Older
adapters return an incorrect response and are limited in size.
Thus the adapters fail the WQ creation steps.

Augment the WQ sizing checks with a check on the older adapter
types and limit them to the restricted sizes.

Fixes: c176ffa0841c ("scsi: lpfc: Increase CQ and WQ sizes for SCSI")
Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_hw4.h  | 12 
 drivers/scsi/lpfc/lpfc_init.c | 15 +++
 drivers/scsi/lpfc/lpfc_sli4.h |  1 +
 3 files changed, 28 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 98b80559c215..9df1c8da6f52 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -104,6 +104,17 @@ struct lpfc_sli_intf {
 #define LPFC_SLI_INTF_IF_TYPE_VIRT 1
 };
 
+struct lpfc_sli_asic_rev {
+   u32 word0;
+#define LPFC_SLI_ASIC_VER_A0x0
+#define LPFC_SLI_ASIC_VER_B0x1
+#define LPFC_SLI_ASIC_VER_C0x2
+#define LPFC_SLI_ASIC_VER_D0x3
+#define lpfc_sli_asic_ver_SHIFT4
+#define lpfc_sli_asic_ver_MASK 0x000F
+#define lpfc_sli_asic_ver_WORD word0
+};
+
 #define LPFC_SLI4_MBX_EMBEDtrue
 #define LPFC_SLI4_MBX_NEMBED   false
 
@@ -566,6 +577,7 @@ struct lpfc_register {
 
 /* The following BAR0 register sets are defined for if_type 0 and 2 UCNAs. */
 #define LPFC_SLI_INTF  0x0058
+#define LPFC_SLI_ASIC_VER  0x009C
 
 #define LPFC_CTL_PORT_SEM_OFFSET   0x400
 #define lpfc_port_smphr_perr_SHIFT 31
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 8dac676a46db..060f0e2f6ff5 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -9514,6 +9514,11 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
return error;
}
 
+   if (pci_read_config_dword(pdev, LPFC_SLI_ASIC_VER,
+ >sli4_hba.sli_asic_ver.word0)) {
+   return error;
+   }
+
/* There is no SLI3 failback for SLI4 devices. */
if (bf_get(lpfc_sli_intf_valid, >sli4_hba.sli_intf) !=
LPFC_SLI_INTF_VALID) {
@@ -10545,6 +10550,7 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, 
LPFC_MBOXQ_t *mboxq)
struct lpfc_pc_sli4_params *sli4_params;
uint32_t mbox_tmo;
int length;
+   bool exp_wqcq_pages = true;
struct lpfc_sli4_parameters *mbx_sli4_parameters;
 
/*
@@ -10671,8 +10677,17 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, 
LPFC_MBOXQ_t *mboxq)
phba->nvme_support, phba->nvme_embed_pbde,
phba->cfg_nvme_embed_cmd, phba->cfg_suppress_rsp);
 
+   if ((bf_get(lpfc_sli_intf_if_type, >sli4_hba.sli_intf) ==
+   LPFC_SLI_INTF_IF_TYPE_2) &&
+   (bf_get(lpfc_sli_intf_sli_family, >sli4_hba.sli_intf) ==
+LPFC_SLI_INTF_FAMILY_LNCR_A0) &&
+   (bf_get(lpfc_sli_asic_ver, >sli4_hba.sli_asic_ver) ==
+   LPFC_SLI_ASIC_VER_A))
+   exp_wqcq_pages = false;
+
if ((bf_get(cfg_cqpsize, mbx_sli4_parameters) & LPFC_CQ_16K_PAGE_SZ) &&
(bf_get(cfg_wqpsize, mbx_sli4_parameters) & LPFC_WQ_16K_PAGE_SZ) &&
+   exp_wqcq_pages &&
(sli4_params->wqsize & LPFC_WQ_SZ128_SUPPORT))
phba->enab_exp_wqcq_pages = 1;
else
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
index cf64aca82bd0..179e870a00b4 100644
--- a/drivers/scsi/lpfc/lpfc_sli4.h
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
@@ -592,6 +592,7 @@ struct lpfc_sli4_hba {
uint32_t ue_to_sr;
uint32_t ue_to_rp;
struct lpfc_register sli_intf;
+   struct lpfc_register sli_asic_ver;
struct lpfc_pc_sli4_params pc_sli4_params;
struct lpfc_bbscn_params bbscn_params;
struct lpfc_hba_eq_hdl *hba_eq_hdl; /* HBA per-WQ handle */
-- 
2.13.1



[PATCH 04/14] lpfc: Enlarge nvmet asynchronous receive buffer counts

2018-04-07 Thread James Smart
Under large io load, the current sizing of asynchronous buffer counts
could be exceeded, indicated by a 2885 log message:
  2885 Port Status Event: port status reg 0x8180, port smphr
  reg 0xc000, error 1=0x52004a01, error 2=0x0

Enlarge the async receive queue size.  Allow for a configurable number
of buffers to be posted to each RQ, using the new attribute
lpfc_nvmet_mrq_post.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc.h   |  1 +
 drivers/scsi/lpfc/lpfc_attr.c  | 11 +++
 drivers/scsi/lpfc/lpfc_nvmet.h |  6 --
 drivers/scsi/lpfc/lpfc_sli.c   |  2 +-
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 2b47c69c1732..20b249a649dd 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -782,6 +782,7 @@ struct lpfc_hba {
uint32_t cfg_nvme_oas;
uint32_t cfg_nvme_embed_cmd;
uint32_t cfg_nvme_io_channel;
+   uint32_t cfg_nvmet_mrq_post;
uint32_t cfg_nvmet_mrq;
uint32_t cfg_enable_nvmet;
uint32_t cfg_nvme_enable_fb;
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 3a6b1be18886..15f921d8ea56 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -3424,6 +3424,15 @@ LPFC_ATTR_R(nvmet_mrq,
"Specify number of RQ pairs for processing NVMET cmds");
 
 /*
+ * lpfc_nvmet_mrq_post: Specify number of RQ buffer to initially post
+ * to each NVMET RQ. Range 64 to 2048, default is 512.
+ */
+LPFC_ATTR_R(nvmet_mrq_post,
+   LPFC_NVMET_RQE_DEF_POST, LPFC_NVMET_RQE_MIN_POST,
+   LPFC_NVMET_RQE_DEF_COUNT,
+   "Specify number of RQ buffers to initially post");
+
+/*
  * lpfc_enable_fc4_type: Defines what FC4 types are supported.
  * Supported Values:  1 - register just FCP
  *3 - register both FCP and NVME
@@ -5353,6 +5362,7 @@ struct device_attribute *lpfc_hba_attrs[] = {
_attr_lpfc_suppress_rsp,
_attr_lpfc_nvme_io_channel,
_attr_lpfc_nvmet_mrq,
+   _attr_lpfc_nvmet_mrq_post,
_attr_lpfc_nvme_enable_fb,
_attr_lpfc_nvmet_fb_size,
_attr_lpfc_enable_bg,
@@ -6403,6 +6413,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
 
lpfc_enable_fc4_type_init(phba, lpfc_enable_fc4_type);
lpfc_nvmet_mrq_init(phba, lpfc_nvmet_mrq);
+   lpfc_nvmet_mrq_post_init(phba, lpfc_nvmet_mrq_post);
 
/* Initialize first burst. Target vs Initiator are different. */
lpfc_nvme_enable_fb_init(phba, lpfc_nvme_enable_fb);
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.h b/drivers/scsi/lpfc/lpfc_nvmet.h
index c1bcef3f103c..81f520abfd64 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.h
+++ b/drivers/scsi/lpfc/lpfc_nvmet.h
@@ -22,8 +22,10 @@
  /
 
 #define LPFC_NVMET_DEFAULT_SEGS(64 + 1)/* 256K IOs */
-#define LPFC_NVMET_RQE_DEF_COUNT   512
-#define LPFC_NVMET_SUCCESS_LEN 12
+#define LPFC_NVMET_RQE_MIN_POST128
+#define LPFC_NVMET_RQE_DEF_POST512
+#define LPFC_NVMET_RQE_DEF_COUNT   2048
+#define LPFC_NVMET_SUCCESS_LEN 12
 
 #define LPFC_NVMET_MRQ_OFF 0x
 #define LPFC_NVMET_MRQ_AUTO0
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index cb17e2b2be81..e0a8c8008195 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -7199,7 +7199,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
lpfc_post_rq_buffer(
phba, phba->sli4_hba.nvmet_mrq_hdr[i],
phba->sli4_hba.nvmet_mrq_data[i],
-   LPFC_NVMET_RQE_DEF_COUNT, i);
+   phba->cfg_nvmet_mrq_post, i);
}
}
 
-- 
2.13.1



[PATCH 02/14] lpfc: Correct target queue depth application changes

2018-04-07 Thread James Smart
The max_scsicmpl_time parameter can be used to perform scsi cmd queue
depth mgmt based on io completion time: the queue depth is reduced to
make completion time shorter. However, as soon as an io completes and
the completion time is within limits, the code immediately bumps the
queue depth limit back up to the target queue depth. Thus the procedure
restarts, effectively limiting the usefulness of adjusting queue depth
to help completion time.

This patch makes the following changes:
Removes the code at io completion that resets the queue depth as soon
  as within limits.
As the code removed was where the target queue depth was first applied,
  change target queue depth application so that it occurs when the
  parameter is changed.
Makes target queue depth a standard parameter: both a module parameter
  and a sysfs parameter.
Optimizes the command pending count by using atomics rather than locks.
Updates the debugfs nodelist stats to allow better debugging of pending
  command counts.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc.h |  2 --
 drivers/scsi/lpfc/lpfc_attr.c| 45 ++--
 drivers/scsi/lpfc/lpfc_debugfs.c | 20 --
 drivers/scsi/lpfc/lpfc_scsi.c| 19 +
 4 files changed, 66 insertions(+), 20 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 6c0d351c0d0d..be4abe52f289 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -64,8 +64,6 @@ struct lpfc_sli2_slim;
 #define LPFC_IOCB_LIST_CNT 2250/* list of IOCBs for fast-path usage. */
 #define LPFC_Q_RAMP_UP_INTERVAL 120 /* lun q_depth ramp up interval */
 #define LPFC_VNAME_LEN 100 /* vport symbolic name length */
-#define LPFC_TGTQ_INTERVAL 4   /* Min amount of time between tgt
-  queue depth change in millisecs */
 #define LPFC_TGTQ_RAMPUP_PCENT 5   /* Target queue rampup in percentage */
 #define LPFC_MIN_TGT_QDEPTH10
 #define LPFC_MAX_TGT_QDEPTH0x
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 2ac1d21c553f..c89ffad1f43d 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -3469,8 +3469,49 @@ LPFC_VPORT_ATTR_R(lun_queue_depth, 30, 1, 512,
 # tgt_queue_depth:  This parameter is used to limit the number of outstanding
 # commands per target port. Value range is [10,65535]. Default value is 65535.
 */
-LPFC_VPORT_ATTR_RW(tgt_queue_depth, 65535, 10, 65535,
-  "Max number of FCP commands we can queue to a specific 
target port");
+static uint lpfc_tgt_queue_depth = LPFC_MAX_TGT_QDEPTH;
+module_param(lpfc_tgt_queue_depth, uint, 0444);
+MODULE_PARM_DESC(lpfc_tgt_queue_depth, "Set max Target queue depth");
+lpfc_vport_param_show(tgt_queue_depth);
+lpfc_vport_param_init(tgt_queue_depth, LPFC_MAX_TGT_QDEPTH,
+ LPFC_MIN_TGT_QDEPTH, LPFC_MAX_TGT_QDEPTH);
+
+/**
+ * lpfc_tgt_queue_depth_store: Sets an attribute value.
+ * @phba: pointer the the adapter structure.
+ * @val: integer attribute value.
+ *
+ * Description: Sets the parameter to the new value.
+ *
+ * Returns:
+ * zero on success
+ * -EINVAL if val is invalid
+ */
+static int
+lpfc_tgt_queue_depth_set(struct lpfc_vport *vport, uint val)
+{
+   struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
+   struct lpfc_nodelist *ndlp;
+
+   if (!lpfc_rangecheck(val, LPFC_MIN_TGT_QDEPTH, LPFC_MAX_TGT_QDEPTH))
+   return -EINVAL;
+
+   if (val == vport->cfg_tgt_queue_depth)
+   return 0;
+
+   spin_lock_irq(shost->host_lock);
+   vport->cfg_tgt_queue_depth = val;
+
+   /* Next loop thru nodelist and change cmd_qdepth */
+   list_for_each_entry(ndlp, >fc_nodes, nlp_listp)
+   ndlp->cmd_qdepth = vport->cfg_tgt_queue_depth;
+
+   spin_unlock_irq(shost->host_lock);
+   return 0;
+}
+
+lpfc_vport_param_store(tgt_queue_depth);
+static DEVICE_ATTR_RW(lpfc_tgt_queue_depth);
 
 /*
 # hba_queue_depth:  This parameter is used to limit the number of outstanding
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index fb0dc2aeed91..50c11acf73a8 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -544,7 +544,7 @@ static int
 lpfc_debugfs_nodelist_data(struct lpfc_vport *vport, char *buf, int size)
 {
int len = 0;
-   int cnt;
+   int i, iocnt, outio, cnt;
struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
struct lpfc_hba  *phba = vport->phba;
struct lpfc_nodelist *ndlp;
@@ -554,10 +554,12 @@ lpfc_debugfs_nodelist_data(struct lpfc_vport *vport, char 
*buf, int size)
struct nvme_fc_remote_port *nrport;
 
cnt = (LPFC_NODELIST_SIZE / LPFC_NODELIST_ENTRY_SIZE);
+   outio = 0;
 
len += snprintf(buf+len, size-len, 

[PATCH 06/14] lpfc: Fix lingering lpfc_wq resource after driver unload

2018-04-07 Thread James Smart
After driver unloads lpfc_wq remains active. The destroy_workqueue
calls were not being made in driver unload.  Additionally, SLI3 is
allocating lpfc_wq resources, but never uses it.

Make the destroy_workqueue calls on driver unload.
Modify the SLI3 code path no longer allocate lpfc_wq resources.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_init.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 4add398ec9cf..8dac676a46db 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -6420,8 +6420,11 @@ lpfc_setup_driver_resource_phase2(struct lpfc_hba *phba)
return error;
}
 
-   /* workqueue for deferred irq use */
-   phba->wq = alloc_workqueue("lpfc_wq", WQ_MEM_RECLAIM, 0);
+   /* The lpfc_wq workqueue for deferred irq use, is only used for SLI4 */
+   if (phba->sli_rev == LPFC_SLI_REV4)
+   phba->wq = alloc_workqueue("lpfc_wq", WQ_MEM_RECLAIM, 0);
+   else
+   phba->wq = NULL;
 
return 0;
 }
@@ -6444,7 +6447,8 @@ lpfc_unset_driver_resource_phase2(struct lpfc_hba *phba)
}
 
/* Stop kernel worker thread */
-   kthread_stop(phba->worker_thread);
+   if (phba->worker_thread)
+   kthread_stop(phba->worker_thread);
 }
 
 /**
@@ -11727,6 +11731,7 @@ lpfc_pci_remove_one_s4(struct pci_dev *pdev)
lpfc_nvme_free(phba);
lpfc_free_iocb_list(phba);
 
+   lpfc_unset_driver_resource_phase2(phba);
lpfc_sli4_driver_resource_unset(phba);
 
/* Unmap adapter Control and Doorbell registers */
-- 
2.13.1



[PATCH 09/14] lpfc: Fix driver not recovering NVME rports during target link faults

2018-04-07 Thread James Smart
During target-side port faults, the driver would not recover all
target port logins. This resulted in a loss of nvme device discovery.

The driver is coded to wait for all GID_FT requests to complete
before restarting discovery. A fault is seen where the outstanding
GIT_FT counts are not properly decremented, thus discovery would
never start. Another fault was found in the clearing of the gidft_inp
counter that would be skipped in this condition. And a third fault
found with lpfc_nvme_register_port that would remove a reverence
on the ndlp which then allows a node swap on a port address change
to prematurely remove the reference and release the ndlp.

The following changes are made:
Correct the decrementing of the outstanding GID_FT counters.
In RSCN handling, no longer zero the counter before calling to
  issue another GID_FT.
No longer remove the reference on the dlp when the ndlp->nrport
  value is not yet null.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_ct.c   |  5 +
 drivers/scsi/lpfc/lpfc_els.c  |  1 -
 drivers/scsi/lpfc/lpfc_nvme.c | 12 ++--
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 0617c8ea88c6..1e7889e45160 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -691,6 +691,11 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct 
lpfc_iocbq *cmdiocb,
vport->fc_flag &= ~FC_RSCN_DEFERRED;
spin_unlock_irq(shost->host_lock);
 
+   /* This is a GID_FT completing so the gidft_inp counter was
+* incremented before the GID_FT was issued to the wire.
+*/
+   vport->gidft_inp--;
+
/*
 * Skip processing the NS response
 * Re-issue the NS cmd
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 74895e62aaea..6d84a10fef07 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -6268,7 +6268,6 @@ lpfc_els_handle_rscn(struct lpfc_vport *vport)
 * flush the RSCN.  Otherwise, the outstanding requests
 * need to complete.
 */
-   vport->gidft_inp = 0;
if (lpfc_issue_gidft(vport) > 0)
return 1;
} else {
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 1cb2c634e9f7..22962b08c275 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -2721,8 +2721,16 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct 
lpfc_nodelist *ndlp)
spin_unlock_irq(>phba->hbalock);
rport->ndlp = NULL;
rport->remoteport = NULL;
-   if (prev_ndlp)
-   lpfc_nlp_put(ndlp);
+
+   /* Reference only removed if previous NDLP is no longer
+* active. It might be just a swap and removing the
+* reference would cause a premature cleanup.
+*/
+   if (prev_ndlp && prev_ndlp != ndlp) {
+   if ((!NLP_CHK_NODE_ACT(prev_ndlp)) ||
+   (!prev_ndlp->nrport))
+   lpfc_nlp_put(prev_ndlp);
+   }
}
 
/* Clean bind the rport to the ndlp. */
-- 
2.13.1



[PATCH 13/14] lpfc: Correct missing remoteport registration during link bounces

2018-04-07 Thread James Smart
Remote port disappearance/reappearances would cause a series of RSCN
events to be delivered to the driver. During the resulting GID_FT
handling, the driver clears the fc4 settings on the remote port, which
makes it skip registration. As such, the nvme associations eventually
fail and return io errors to the applications.

Correct by not clearng the nlp_fc4_types for all nodes in lpfc_issue_gidft.
Instead, when the GID_FT response is handled, clear the nlp_fc4_types
of FCP and NVME prior to evaluating the fc4_type returned by the
GID_FT response.  This approach leaves "skipped" nodes with their
nlp_fc4_types intacted.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_ct.c  | 5 +
 drivers/scsi/lpfc/lpfc_hbadisc.c | 4 
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 1e7889e45160..d4a200ae5a6f 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -471,6 +471,11 @@ lpfc_prep_node_fc4type(struct lpfc_vport *vport, uint32_t 
Did, uint8_t fc4_type)
"Parse GID_FTrsp: did:x%x flg:x%x x%x",
Did, ndlp->nlp_flag, vport->fc_flag);
 
+   /* Don't assume the rport is always the previous
+* FC4 type.
+*/
+   ndlp->nlp_fc4_type &= ~(NLP_FC4_FCP | NLP_FC4_NVME);
+
/* By default, the driver expects to support FCP FC4 */
if (fc4_type == FC_TYPE_FCP)
ndlp->nlp_fc4_type |= NLP_FC4_FCP;
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 2c103a12a1d2..59d64fb98337 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -3896,10 +3896,6 @@ int
 lpfc_issue_gidft(struct lpfc_vport *vport)
 {
struct lpfc_hba *phba = vport->phba;
-   struct lpfc_nodelist *ndlp;
-
-   list_for_each_entry(ndlp, >fc_nodes, nlp_listp)
-   ndlp->nlp_fc4_type &= ~(NLP_FC4_FCP | NLP_FC4_NVME);
 
/* Good status, issue CT Request to NameServer */
if ((phba->cfg_enable_fc4_type == LPFC_ENABLE_BOTH) ||
-- 
2.13.1



[PATCH 12/14] lpfc: Fix create_association oops on unloading LPFC driver

2018-04-07 Thread James Smart
Driver unload isn't waiting for all outstanding nvme associations
to terminate before clearing structures. In particular, it did not
set dev_loss_tmo to 0 such that all associations are immediately
terminated. Thus the transport would enter reconnect timeouts and
reattempt reconnect to an nvme controller. The call makes a call
into the driver to create hw queues for the controller which causes
a NULL pointer reference.

Correct by changing the teardown process to change all dev_loss_tmo
timeouts to 0 so that they are immediate. Now the teardown process
initiates, the remote ports unregistered and delete callback made,
and as the assocations are immediate upon remoteport unregister, the
transport will not longer invoke the callbacks for a new controller.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_hbadisc.c | 20 
 1 file changed, 20 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 3e7712cd6c9a..2c103a12a1d2 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -840,8 +840,28 @@ lpfc_cleanup_rpis(struct lpfc_vport *vport, int remove)
 void
 lpfc_port_link_failure(struct lpfc_vport *vport)
 {
+   struct lpfc_nodelist *ndlp, *next_ndlp;
+   struct lpfc_nvme_rport *rport;
+
lpfc_vport_set_state(vport, FC_VPORT_LINKDOWN);
 
+   list_for_each_entry_safe(ndlp, next_ndlp, >fc_nodes, nlp_listp) {
+   if (ndlp->nlp_type & NLP_NVME_TARGET) {
+   rport = lpfc_ndlp_get_nrport(ndlp);
+   if (!rport)
+   continue;
+
+   /*
+* Update dev_loss_tmo when driver is being unloaded.
+* Setting dev_loss_tmo = 0 there won't be any reconnect
+* tries and controller would be deleted in nvme-layer
+**/
+   nvme_fc_set_remoteport_devloss(ndlp->nrport->remoteport,
+  0);
+   lpfc_nvme_unregister_port(vport, ndlp);
+   }
+   }
+
/* Cleanup any outstanding received buffers */
lpfc_cleanup_rcv_buffers(vport);
 
-- 
2.13.1



Re: 4.15.14 crash with iscsi target and dvd

2018-04-07 Thread Wakko Warner
Wakko Warner wrote:
> Bart Van Assche wrote:
> > On Thu, 2018-04-05 at 22:06 -0400, Wakko Warner wrote:
> > > I know now why scsi_print_command isn't doing anything.  cmd->cmnd is 
> > > null.
> > > I added a dev_printk in scsi_print_command where the 2 if statements 
> > > return.
> > > Logs:
> > > [  29.866415] sr 3:0:0:0: cmd->cmnd is NULL
> > 
> > That's something that should never happen. As one can see in
> > scsi_setup_scsi_cmnd() and scsi_setup_fs_cmnd() both functions initialize
> > that pointer. Since I have not yet been able to reproduce myself what you
> > reported, would it be possible for you to bisect this issue? You will need
> > to follow something like the following procedure (see also
> > https://git-scm.com/docs/git-bisect):
> 
> After doing 3 successful compiles with good/bad, I got this error and was
> not able to compile any more kernels:
>   CC  scripts/mod/devicetable-offsets.s
> scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode
>  /* empty file to figure out endianness / word size */
>  
> scripts/mod/devicetable-offsets.c:1:0: error: code model kernel does not 
> support PIC mode
>  #include 
>  
> scripts/Makefile.build:153: recipe for target 
> 'scripts/mod/devicetable-offsets.s' failed
> 
> I don't think it found the bad commit.

I forgot to mention my gcc version.
gcc (Debian 6.2.1-7) 6.2.1 20161215

-- 
 Microsoft has beaten Volkswagen's world record.  Volkswagen only created 22
 million bugs.


Re: 4.15.14 crash with iscsi target and dvd

2018-04-07 Thread Wakko Warner
Bart Van Assche wrote:
> On Thu, 2018-04-05 at 22:06 -0400, Wakko Warner wrote:
> > I know now why scsi_print_command isn't doing anything.  cmd->cmnd is null.
> > I added a dev_printk in scsi_print_command where the 2 if statements return.
> > Logs:
> > [  29.866415] sr 3:0:0:0: cmd->cmnd is NULL
> 
> That's something that should never happen. As one can see in
> scsi_setup_scsi_cmnd() and scsi_setup_fs_cmnd() both functions initialize
> that pointer. Since I have not yet been able to reproduce myself what you
> reported, would it be possible for you to bisect this issue? You will need
> to follow something like the following procedure (see also
> https://git-scm.com/docs/git-bisect):

After doing 3 successful compiles with good/bad, I got this error and was
not able to compile any more kernels:
  CC  scripts/mod/devicetable-offsets.s
scripts/mod/empty.c:1:0: error: code model kernel does not support PIC mode
 /* empty file to figure out endianness / word size */
 
scripts/mod/devicetable-offsets.c:1:0: error: code model kernel does not 
support PIC mode
 #include 
 
scripts/Makefile.build:153: recipe for target 
'scripts/mod/devicetable-offsets.s' failed

I don't think it found the bad commit.

-- 
 Microsoft has beaten Volkswagen's world record.  Volkswagen only created 22
 million bugs.


Re: [PATCH v6] scsi: new zorro_esp.c for Amiga Zorro NCR53C9x boards

2018-04-07 Thread Michael Schmitz
Hi Finn,

Am 07.04.2018 um 12:59 schrieb Finn Thain:
> On Sat, 7 Apr 2018, Michael Schmitz wrote:
> 
>> Changes since v5:
>>
>> Christoph Hellwig:
>>
>> - fix comment style
>> - drop initialization to zero in driver data init
>> - fix alignment in struct declarations
>> - drop braces around asm macros
>> - change board_base type to void __iomem *
>> - drop unneeded void __iomem * cast from ZTWO_VADDR() use
>> - add comment to explain why ZTWO_VADDR() use is safe
>> - move board specific functions to per-board esp_ops
>>
> 
> The sparse warnings have changed to this:
> 
>   CHECK   /home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c
> drivers/scsi/zorro_esp.c:274:14: warning: cast removes address space of 
> expression
> drivers/scsi/zorro_esp.c:712:14: warning: cast removes address space of 
> expression
> 
> Why not just call writel() and get rid of the 't' temporary pointer?

As far as I can see, that will invoke cpu_to_le32() on the data written.
Geert?

Rewriting line this

*((__force unsigned long *)zep->board_base) = 0;

and this

*(__force unsigned long *)((addr & 0x00ff) + zep->board_base) = addr;

does suppress the warning and omits the temp pointer. But is that any
better?

Cheers,

Michael




Re: [PATCH 01/10] staging: fnic2 add initialization

2018-04-07 Thread Greg Kroah-Hartman
On Fri, Apr 06, 2018 at 03:00:11PM -0700, Oliver Smith-Denny wrote:
> On Fri, Apr 06, 2018 at 07:07:52AM +0200, Greg Kroah-Hartman wrote:
> > Why is this a drivers/staging/ driver at all?  What is keeping you from
> > getting this merged into the "proper" place in the kernel?
> > 
> > If you have a staging driver, you have to have a TODO file in the
> > directory listing what is keeping this in the staging section.
> 
> Sorry Greg, we do have a TODO file in the directory, but it was
> part of patch 10/10. I can move that to be part of patch 01/10.

Ah, I missed that, sorry.

> We think that this driver is a drivers/staging driver because
> there are some changes we want to make before submitting
> the driver to the "proper" place. Specifically, we want to
> change how we allocate memory (move from a static allocation
> to a mempool scenario), which will require some other code
> changes.

Why not just take a week and do that?  I can't take any new patches
until 4.17-rc1 is out anyway.

> Also, we want to investigate if we need to change our locking schema.

Again, why not just take the time to do that?

> We think that making this driver part of the drivers/staging community
> will allow interested people to try the driver in its current state
> and offer up ideas as to its continued development.

Have you asked the scsi developers what they think about this?

And why not copy the staging developer mailing list on this patch
series?

> If you think that this driver doesn't belong in the
> drivers/staging community, we are happy to explore getting
> the driver fully ready on our side and getting it into the
> "proper" place.

I'll take anything in staging as long as it has the correct license and
builds, that's not an issue :)  But I do want to get agreement from the
SCSI maintainers that this is ok to have in this part of the kernel as
sometimes it can cause merge issues if there are core api changes.

> > Please read the documentation on how to properly use SPDX tags on kernel
> > files.  This needs to be the first line of the file.
> 
> Thanks Greg, I fixed the SPDX tags and removed all the boilerplate,
> including the LICENSE file. Also, I have updated the MAINTAINERS
> file, which accidentally slipped by my first patch set. If you
> think that drivers/staging is a good temporary home for this
> driver, then I will send another patchset with the changes,
> as well as the changes from your other replies to patch 02/10
> and patch 03/10.

A respin of this would be nice, and again, I can't do anything with it
until 4.17-rc1 is out.

thanks,

greg k-h