[PATCH 05/11] Break up IO ctx list into a separate get and put list

2017-06-15 Thread James Smart
Since unsol rcv ISR and command cmpl ISR both access/lock this list, a separate get/put lists will reduce contention. Replaced struct list_head lpfc_nvmet_ctx_list; with struct list_head lpfc_nvmet_ctx_get_list; struct list_head lpfc_nvmet_ctx_put_list; and all correpsonding locks and counters.

[PATCH 03/11] Vport creation is failing with "Link Down" error

2017-06-15 Thread James Smart
Vport creation fails for SLI-3 adapters. Mailbox submission fails because mailbox interrupt is disabled. Mailbox interrupt is disabled during port reset. Do reset only for physical port. Signed-off-by: Dick Kennedy Signed-off-by: James Smart

[PATCH 06/11] Fix SLI3 drivers attempting NVME ELS commands.

2017-06-15 Thread James Smart
In a server with an 8G adapter and a 32G adapter, running NVME and FCP, the server would crash with the following stack. RIP: 0010: ... lpfc_nvme_register_port+0x38/0x420 [lpfc] lpfc_nlp_state_cleanup+0x154/0x4f0 [lpfc] lpfc_nlp_set_state+0x9d/0x1a0 [lpfc] lpfc_cmpl_prli_prli_issue+0x35f/0x440

[PATCH 01/11] Fix system panic when express lane enabled.

2017-06-15 Thread James Smart
There is a null pointer dereference that can happen in the FOF interrupt handler. The driver was not setting up cq->assoc_qp_for sli4_hba->oas_cq. Initialize cq->assoc_qp before accessing it. Signed-off-by: Dick Kennedy Signed-off-by: James Smart

[PATCH 11/11] lpfc: update to revision to 11.4.0.1

2017-06-15 Thread James Smart
Set lpfc driver revision to 11.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

[PATCH 04/11] Reduce time spent in IRQ for received NVME commands

2017-06-15 Thread James Smart
Removed unnecessary bzero of context area. Due to size of sg list, added a substantial delay and played havoc on cpu caches. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvmet.c | 2 -- 1 file changed, 2

[PATCH 02/11] Fix nvme_info sysfs output to be consistent

2017-06-15 Thread James Smart
First line of nvme_info output is not consistent There is an Extra colon in the format. First line of output will contain one of the following strings: NVME Initiator Enabled NVME Target Enabled NVME Disabled Signed-off-by: Dick Kennedy Signed-off-by: James Smart

[PATCH 10/11] Driver responds LS_RJT to Beacon Off ELS - Linux

2017-06-15 Thread James Smart
Beacon OFF from switch is rejected by driver. Driver fails Beacon OFF if frequency is set to 0. As per fc-ls spec, status, capability, frequency and duration fields are only applicable for Beacon ON. Remove frequency and type checks. Reject Beacon ON if duration is non zero. Signed-off-by: Dick

[PATCH 08/11] Fix crash doing IO with resets

2017-06-15 Thread James Smart
During every reset, IOCBs are allocated. So, at one point, number of allocated IOCBs reaches maximum limit and lpfc_sli_next_iotag fails. Allocate IOCBs only during initialization. Reuse them after every reset instead of allocating new set of IOCBs. Signed-off-by: Dick Kennedy

[PATCH 09/11] Fix crash in lpfc_sli_ringtxcmpl_put when nvmet gets an abort request.

2017-06-15 Thread James Smart
When running nvme detach-ns /dev/nvme0n1 -n 1 command, the nvmet lpfc driver crashes with this stack dump: kernel BUG at /root/NVME/lpfc_8.4/lpfc_sli.c:1393! invalid opcode: [#1] SMP Workqueue: nvmet-fc-cpu0 nvmet_fc_do_work_on_cpu [nvmet_fc] lpfc_sli4_issue_wqe+0x357/0x440 [lpfc]

[PATCH 07/11] Fix crash after firmware flash when IO is running.

2017-06-15 Thread James Smart
OS crashes after the completion of firmware download. Failure in posting SCSI SGL buffers because number of SGL buffers is less than total count. Some of the pending IOs are not completed by driver. SGL buffers for these IOs are not added back to the list. Pending IOs are not completed because

[PATCH 00/11] lpfc updates for 11.4.0.1

2017-06-15 Thread James Smart
This patch set provides a number of bug fixes. The patches were cut against the Martin's 4.13/scsi-queue tree. There are no outside dependencies. The patches should merge via Martin's tree. James Smart (11): Fix system panic when express lane enabled. Fix nvme_info sysfs output to be

Re: [PATCH] tcmu: Fix module removal due to stuck unmap_thread thread again

2017-06-15 Thread Mike Christie
On 06/15/2017 02:05 AM, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > Because the unmap code just after the schdule() returned may take > a long time and if the kthread_stop() is fired just when in this > routine, the module removal maybe stuck too. > >

Re: [PATCH v2 00/17] lpfc updates for 11.4.0.0

2017-06-15 Thread James Smart
On 6/12/2017 8:04 PM, Martin K. Petersen wrote: I have queued the whole series for 4.13. If there are smaller, trivial patches without dependencies you would like to see in 4.12 I can shuffle them over. 10, 11, and 12 appear to fix panics and are thus candidates for rc6. Whereas "Add nvme

[PATCH 4/4] g_NCR5380: Cleanup comments and whitespace

2017-06-15 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/scsi/g_NCR5380.c | 61 ++-- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 784913193ea5..e9a942d86865 100644

[PATCH 3/4] g_NCR5380: Limit sg_tablesize to avoid PDMA read overruns on DTC436

2017-06-15 Thread Finn Thain
Back-to-back DMA receive transfers can lose a byte due to a 5380 flaw. This makes scatter-receive difficult or impossible on affected hardware, so limit the scatter/gather tablesize to 1. Signed-off-by: Finn Thain --- drivers/scsi/g_NCR5380.c | 1 + 1 file changed, 1

[PATCH 1/4] g_NCR5380: Fix PDMA transfer size

2017-06-15 Thread Finn Thain
From: Ondrej Zary generic_NCR5380_dma_xfer_len() incorrectly uses cmd->transfersize which causes rescan-scsi-bus and CD-ROM access to hang the system. Use cmd->SCp.this_residual instead, like other NCR5380 drivers. Signed-off-by: Ondrej Zary

[PATCH 0/4] g_NCR5380: PDMA fixes and cleanup

2017-06-15 Thread Finn Thain
Ondrej, would you please test this patch series? One of your patches has been modified slightly and the two I wrote are untested. Finn Thain (2): g_NCR5380: Limit sg_tablesize to avoid PDMA read overruns on DTC436 g_NCR5380: Cleanup comments and whitespace Ondrej Zary (2): g_NCR5380: Fix

[PATCH 2/4] g_NCR5380: End PDMA transfer correctly on target disconnection

2017-06-15 Thread Finn Thain
From: Ondrej Zary When an IRQ arrives during PDMA transfer, pread() and pwrite() return without waiting for the 53C80 registers to be ready and this ends up messing up the chip state. This was observed with SONY CDU-55S which is slow enough to disconnect during

[PATCH] scsi_proto.h: ATA_32 added for ata pass-thru(32).

2017-06-15 Thread Minwoo Im
SAT-4(SCSI/ATA Translation Standard) supports a ATA PASS-THROUGH(32) SCSI command. It uses 7Fh as a operation code which means variable-length CDB. It would be great if kernel supports an ata pass-thru(32) command. Prior to development of ata pass-through in libata level, the definition of it

Re: [PATCH v2 1/2] libsas: Don't process sas events in static works

2017-06-15 Thread wangyijing
在 2017/6/15 16:00, John Garry 写道: > On 15/06/2017 08:37, wangyijing wrote: >> >> >> 在 2017/6/14 21:08, John Garry 写道: >>> On 14/06/2017 10:04, wangyijing wrote: >> static void notify_ha_event(struct sas_ha_struct *sas_ha, enum ha_event >> event) { +struct

Re: [PATCH v2 1/2] libsas: Don't process sas events in static works

2017-06-15 Thread John Garry
On 15/06/2017 08:37, wangyijing wrote: 在 2017/6/14 21:08, John Garry 写道: On 14/06/2017 10:04, wangyijing wrote: static void notify_ha_event(struct sas_ha_struct *sas_ha, enum ha_event event) { +struct sas_ha_event *ev; + BUG_ON(event >= HA_NUM_EVENTS); -

Re: [PATCH v2 1/2] libsas: Don't process sas events in static works

2017-06-15 Thread wangyijing
在 2017/6/14 21:08, John Garry 写道: > On 14/06/2017 10:04, wangyijing wrote: static void notify_ha_event(struct sas_ha_struct *sas_ha, enum ha_event event) >> { >> +struct sas_ha_event *ev; >> + >> BUG_ON(event >= HA_NUM_EVENTS); >> >> -

[PATCH 2/2] qedi: Remove WARN_ON from clear task context.

2017-06-15 Thread Manish Rangankar
Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 09a2946..879d3b7 100644 --- a/drivers/scsi/qedi/qedi_main.c

[PATCH 0/2] qedi: Remove unwanted warnings.

2017-06-15 Thread Manish Rangankar
Martin, Please consider below patches for next 'scsi-fixes' submission. Thanks, Manish Manish Rangankar (2): qedi: Remove WARN_ON for untracked cleanup. qedi: Remove WARN_ON from clear task context. drivers/scsi/qedi/qedi_fw.c | 1 - drivers/scsi/qedi/qedi_main.c | 4 +--- 2 files

[PATCH 1/2] qedi: Remove WARN_ON for untracked cleanup.

2017-06-15 Thread Manish Rangankar
Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_fw.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index 8bc7ee1..507512c 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++

[PATCH] tcmu: Fix module removal due to stuck unmap_thread thread again

2017-06-15 Thread lixiubo
From: Xiubo Li Because the unmap code just after the schdule() returned may take a long time and if the kthread_stop() is fired just when in this routine, the module removal maybe stuck too. Signed-off-by: Xiubo Li ---