Re: [PATCH 25/27] block: remove the discard_zeroes_data flag

2017-05-10 Thread Nicholas A. Bellinger
On Wed, 2017-05-10 at 16:06 +0200, h...@lst.de wrote: > On Mon, May 08, 2017 at 11:46:14PM -0700, Nicholas A. Bellinger wrote: > > That said, simply propagating up q->limits.max_write_zeroes_sectors as > > dev_attrib->unmap_zeroes_data following existing code still looks like > > the right thing

[PATCH] scsi: zero per-cmd driver data for each MQ I/O

2017-05-10 Thread Long Li
From: Long Li Lower layer driver may not initialize private data before use. Zero them out to prevent use of stale data. Signed-off-by: Long Li --- drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Douglas Gilbert
On 2017-05-10 03:53 AM, Johannes Thumshirn wrote: If the list search in sg_get_rq_mark() fails to find a valid request, we return a bogus element. This then can later lead to a GPF in sg_remove_scat(). So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the list search

[PATCH v2] ibmvscsis: Fix the incorrect req_lim_delta

2017-05-10 Thread Bryant G. Ly
The current code is not correctly calculating the req_lim_delta. We want to make sure vscsi->credit is always incremented when we do not send a response for the scsi op. Thus for the case where there is a successfully aborted task we need to make sure the vscsi->credit is incremented. v2 - Moves

[PATCH 15/15] lpfc: update version to 11.2.0.14

2017-05-10 Thread James Smart
Change driver version to 11.2.0.14 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 13/15] lpfc: Fix NVMEI's handling of NVMET's PRLI response attributes

2017-05-10 Thread James Smart
Code review of NVMEI's FC_PORT_ROLE_NVME_DISCOVERY looked wrong. Discussions with storage architecture team clarified NVMEI's audit of the PRLI response port roles. Following up discussion with code review showed a few minor corrections were required - especially in anticipation of NVME auto

[PATCH 07/15] lpfc: Separate NVMET data buffer pool fir ELS/CT.

2017-05-10 Thread James Smart
Using 2048 byte buffer and onle 128 bytes is needed. Create nee LFPC_NVMET_DATA_BUF_SIZE define to use for NVMET RQ/MRQs. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h | 1 +

[PATCH 09/15] lpfc: Added recovery logic for running out of NVMET IO context resources

2017-05-10 Thread James Smart
Previous logic would just drop the IO Added logic to queue the IO to wait for an IO context resource from an IO thats already in progress. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h | 1 +

[PATCH 10/15] lpfc: Fix NVME I+T not registering NVME as a supported FC4 type

2017-05-10 Thread James Smart
When the driver send the RPA command, it does not send supported FC4 Type NVME to the management server. Encode NVME (type x28) in the AttribEntry in the RPA command. Signed-off-by: Dick Kennedy Signed-off-by: James Smart ---

[PATCH 08/15] lpfc: Separate NVMET RQ buffer posting from IO resources SGL/iocbq/context

2017-05-10 Thread James Smart
Currently IO resources are mapped 1 to 1 with RQ buffers posted Added logic to separate RQE buffers from IO op resources (sgl/iocbq/context). During initialization, the driver will determine how many SGLs it will allocate for NVMET (based on what the firmware reports) and associate a NVMET IOCBq

[PATCH 14/15] lpfc: Add MDS Diagnostic support.

2017-05-10 Thread James Smart
Added code to support Cisco MDS loopback diagnostic. The diagnostics run various loopbacks including one which loops-back frame through the driver. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h |

[PATCH 11/15] lpfc: Fix debugfs root inode "lpfc" not getting deleted on driver unload.

2017-05-10 Thread James Smart
When unloading and reloading the driver, the driver fails to recreate the lpfc root inode in the debugfs tree. The driver is incorrectly removing the lpfc root inode in lpfc_debugfs_terminate in the first driver instance that unloads and then sets the lpfc_debugfs_root global parameter to NULL.

[PATCH 12/15] lpfc: Cleanup entry_repost settings on SLI4 queues

2017-05-10 Thread James Smart
Too many work items being processed in IRQ context take a lot of CPU time and cause problems. With a recent change, we get out of the ISR after hitting entry_repost work items on a queue. However, the actual values for entry repost are still high. EQ is 128 and CQ is 128, this could translate

[PATCH 05/15] lpfc: Fix NVMEI driver not decrementing counter causing bad rport state.

2017-05-10 Thread James Smart
During driver boot, a latency in the NVMET driver side causes the incoming NVMEI PRLI to get rejected by the NVMET driver. When this happens, the NVMEI driver runs out of PRLI retries. Bouncing the link does not fix the situation. If the NVMEI driver decides, on PRLI completion failures, to

[PATCH 06/15] lpfc: Fix NMI watchdog assertions when running nvmet IOPS tests

2017-05-10 Thread James Smart
After running IOPS test for 30 second we get kernel:NMI watchdog: Watchdog detected hard LOCKUP on cpu 0 The driver is speend too much time in it's ISR. In ISR EQ and CQ processing routines, if we hit the entry_repost numbers of EQE/CQEs just break out of the routine as opposed to hitting the

[PATCH 03/15] lpfc: Adding additional stats counters for nvme.

2017-05-10 Thread James Smart
More debug messages added for nvme statistics. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_attr.c| 24 - drivers/scsi/lpfc/lpfc_debugfs.c | 27 +--

[PATCH 04/15] lpfc: Fix nvmet RQ resource needs for large block writes.

2017-05-10 Thread James Smart
Large block writes to the nvme target were failing because the default number of RQs posted was insufficient. Expand the NVMET RQs to 2048 RQEs and ensure a minimun of 2048 RQEs are posted, no matter how many MRQs are configured. Signed-off-by: Dick Kennedy

[PATCH 00/15] lpfc updates for 11.2.0.14

2017-05-10 Thread James Smart
This patch set provides a number of bug fixes, code cleanups, and error handling, mostly in the nvme area of lpfc. There is one new feature in the series to add MDS diagnostics support The patches were cut against the Martin's 4.12/scsi-fixes tree. There are no outside dependencies. The patches

[PATCH 01/15] lpfc: Fix used-RPI accounting problem.

2017-05-10 Thread James Smart
With 255 vports created a link trasition can casue a crash. When going through discovery after a link bounce the driver is using rpis before the cmd FCOE_POST_HDR_TEMPLATES completes. By doing that the next rpi bumps the rpi range out of the boundary. The fix it to increment the next_rpi only

[PATCH 02/15] lpfc: Fix system crash when port is reset.

2017-05-10 Thread James Smart
The driver panic when using the els_wq during port reset. Check for NULL els_wq before dereferencing. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h | 8 ++-- drivers/scsi/lpfc/lpfc_hbadisc.c

[PATCH v1] ibmvscsis: Fix the incorrect req_lim_delta

2017-05-10 Thread Bryant G. Ly
The current code is not correctly calculating the req_lim_delta. We want to make sure vscsi->credit is always incremented when we do not send a response for the scsi op. Thus for the case where there is a successfully aborted task we need to make sure the vscsi->credit is incremented.

RE: [PATCH V2 15/19] aacraid: Make sure ioctl returns on controller reset

2017-05-10 Thread Dave Carroll
> -Original Message- > From: Raghava Aditya Renukunta > [mailto:raghavaaditya.renuku...@microsemi.com] > Sent: Wednesday, May 10, 2017 10:40 AM > To: j...@linux.vnet.ibm.com; martin.peter...@oracle.com; linux- > s...@vger.kernel.org > Cc: Dave Carroll ; Gana

RE: [PATCH V2 02/19] aacraid: Fix DMAR issues with iommu=pt

2017-05-10 Thread Dave Carroll
> -Original Message- > From: Raghava Aditya Renukunta > [mailto:raghavaaditya.renuku...@microsemi.com] > Sent: Wednesday, May 10, 2017 10:40 AM > To: j...@linux.vnet.ibm.com; martin.peter...@oracle.com; linux- > s...@vger.kernel.org > Cc: Dave Carroll ; Gana

RE: [PATCH V2 01/19] aacraid: Remove __GFP_DMA for raw srb memory

2017-05-10 Thread Dave Carroll
> -Original Message- > From: Raghava Aditya Renukunta > [mailto:raghavaaditya.renuku...@microsemi.com] > Sent: Wednesday, May 10, 2017 10:40 AM > To: j...@linux.vnet.ibm.com; martin.peter...@oracle.com; linux- > s...@vger.kernel.org > Cc: Dave Carroll ; Gana

Re: [PATCH 25/27] block: remove the discard_zeroes_data flag

2017-05-10 Thread h...@lst.de
On Mon, May 08, 2017 at 11:46:14PM -0700, Nicholas A. Bellinger wrote: > That said, simply propagating up q->limits.max_write_zeroes_sectors as > dev_attrib->unmap_zeroes_data following existing code still looks like > the right thing to do. It is not. Martin has decoupled write same/zeroes

Re: [PATCH] scsi: sanity check for timeout in sg_io()

2017-05-10 Thread James Bottomley
On Wed, 2017-05-10 at 15:24 +0200, Hannes Reinecke wrote: > sg_io() is using msecs_to_jiffies() to convert a passed in timeout > value (in milliseconds) to a jiffies value. However, if the value > is too large msecs_to_jiffies() will return MAX_JIFFY_OFFSET, which > will be truncated to -2 and

[PATCH] scsi: sanity check for timeout in sg_io()

2017-05-10 Thread Hannes Reinecke
sg_io() is using msecs_to_jiffies() to convert a passed in timeout value (in milliseconds) to a jiffies value. However, if the value is too large msecs_to_jiffies() will return MAX_JIFFY_OFFSET, which will be truncated to -2 and cause the timeout to be set to 1.3 _years_. Which is probably too

Re: [PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Hannes Reinecke
On 05/10/2017 09:53 AM, Johannes Thumshirn wrote: > If the list search in sg_get_rq_mark() fails to find a valid request, we > return a bogus element. This then can later lead to a GPF in sg_remove_scat(). > > So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the > list

[PATCH v2] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Johannes Thumshirn
If the list search in sg_get_rq_mark() fails to find a valid request, we return a bogus element. This then can later lead to a GPF in sg_remove_scat(). So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the list search doesn't find a valid request. Signed-off-by: Johannes

Re: [PATCH] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Hannes Reinecke
On 05/10/2017 09:41 AM, Johannes Thumshirn wrote: > If the list search in sg_get_rq_mark() fails to find a valid request, we > return a bogus element. This then can later lead to a GPF in sg_remove_scat(). > > So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the > list

[PATCH] scsi: sg: don't return bogus Sg_requests

2017-05-10 Thread Johannes Thumshirn
If the list search in sg_get_rq_mark() fails to find a valid request, we return a bogus element. This then can later lead to a GPF in sg_remove_scat(). So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the list search doesn't find a valid request. Signed-off-by: Johannes

[PATCH V2 17/19] aacraid : Add reset debugging statements

2017-05-10 Thread Raghava Aditya Renukunta
Added info and error messages in controller reset function to log information about the status of the IOP/SOFT reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None

[PATCH V2 11/19] aacraid: Add periodic checks to see IOP reset status

2017-05-10 Thread Raghava Aditya Renukunta
Added function that waits with a timeout for the ctrl to be up and running after triggering an IOP reset. Also removed 30 sec sleep as it is not needed. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll ---

[PATCH V2 09/19] aacraid: Using single reset mask for IOP reset

2017-05-10 Thread Raghava Aditya Renukunta
The driver can now trigger IOP reset with a single reset mask. Removed code that retrieves a reset_mask from the firmware. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None

[PATCH V2 18/19] aacraid: Remove reference to Series-9

2017-05-10 Thread Raghava Aditya Renukunta
Remove reference to Series-9 HBA and created arc ctrl check function. Signed-off-by: Prasad B Munirathnam Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2:

[PATCH V2 12/19] aacraid: Rework SOFT reset code

2017-05-10 Thread Raghava Aditya Renukunta
Now the driver issues a soft reset and waits for the controller to be up and running by periodically checking on the status of the controller health registers. Also prevents ARC adapters from issuing soft reset if IOP resets failed. Signed-off-by: Raghava Aditya Renukunta

[PATCH V2 16/19] aacraid: Enable ctrl reset for both hba and arc

2017-05-10 Thread Raghava Aditya Renukunta
Make sure that IOP and SOFT reset are enabled for both for both arc and hba1000 controllers. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/linit.c | 77

[PATCH V2 15/19] aacraid: Make sure ioctl returns on controller reset

2017-05-10 Thread Raghava Aditya Renukunta
Made sure that ioctl commands return in case of a controller reset. Signed-off-by: Raghava Aditya Renukunta --- Changes in V2: Removed incorrect up Cleared wait flag once event is received not before drivers/scsi/aacraid/commsup.c | 25

[PATCH V2 07/19] aacraid: Log count info of scsi cmds before reset

2017-05-10 Thread Raghava Aditya Renukunta
Log the location of the scsi cmds before triggering a reset. This information is useful for debugging. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/linit.c |

[PATCH V2 13/19] aacraid: Rework aac_src_restart

2017-05-10 Thread Raghava Aditya Renukunta
Removed switch case and replaced with if mask checks. Moved KERNEL_PANIC check to when bled is less than 0. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None

[PATCH V2 10/19] aacraid: Rework IOP reset

2017-05-10 Thread Raghava Aditya Renukunta
Reworked IOP reset to remove unneeded variable and created a helper function to notify fw of an imminent IOP reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None

[PATCH V2 14/19] aacraid: Use correct function to get ctrl health

2017-05-10 Thread Raghava Aditya Renukunta
The command thread checks the ctrl health periodically before sending updates to the controller. The function that it uses is aac_check_health which does more than get the health status. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll

[PATCH V2 19/19] aacraid: Update driver version to 50834

2017-05-10 Thread Raghava Aditya Renukunta
Update the driver version to 50834 Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/aacraid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH V2 08/19] aacraid: Print ctrl status before eh reset

2017-05-10 Thread Raghava Aditya Renukunta
Log the status of the controller before issuing a reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/linit.c | 9 + 1 file changed, 9 insertions(+)

[PATCH V2 02/19] aacraid: Fix DMAR issues with iommu=pt

2017-05-10 Thread Raghava Aditya Renukunta
The driver changed the DMA consistent map after consistent memory was allocated, this invalidated the IOMMU identity mapping. The fix was to make sure that we set the DMA consistent mask setting once depending on the controller card. Signed-off-by: Raghava Aditya Renukunta

[PATCH V2 04/19] aacraid: Set correct Queue Depth for HBA1000 RAW disks

2017-05-10 Thread Raghava Aditya Renukunta
The default queue depth for non NATIVE RAW disks is calculated from the number of fibs and number of disks or a max of 256. This causes poor disk IO performance. The fix is to set default qd based on the type of disks (SATA -32 and SAS -64) Signed-off-by: Raghava Aditya Renukunta

[PATCH V2 05/19] aacraid: Remove reset support from check_health

2017-05-10 Thread Raghava Aditya Renukunta
Check health does not need to reset the ctrl but just return the controller health status. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/commsup.c | 15

[PATCH V2 03/19] aacraid: Added 32 and 64 queue depth for arc natives

2017-05-10 Thread Raghava Aditya Renukunta
The qd for ARC Native disks is calculated by dividing the max IO 1024 by the number of disks or 256 which ever is lower. This causes poor disk IO performance. The fix is set the qd based on the type of disk (SAS - 64 and SATA - 32). Signed-off-by: Raghava Aditya Renukunta

[PATCH V2 06/19] aacraid: Change wait time for fib completion

2017-05-10 Thread Raghava Aditya Renukunta
Change the completion wait time for the fibs in the reset and abort callback from 2 minutes to 15 seconds. 2 minutes is too long for waiting for completion. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll

[PATCH V2 00/19] aacraid: Patchset with reset rework and misc fixes

2017-05-10 Thread Raghava Aditya Renukunta
This patchset primarily focuses on tweaking and hardening the controller reset support for both ARC and HBA1000 devices. Now the driver can only reset the controller thru eh reset. Included a srb memory fix and pci dma allocation fix. Changes in V2: - Corrected heading and description for srb

[PATCH V2 01/19] aacraid: Remove __GFP_DMA for raw srb memory

2017-05-10 Thread Raghava Aditya Renukunta
The raw srb commands do not requires memory that in the ZONE_DMA memory space. For 32bit srb commands use GFP_DMA32 to limit the memory to 32bit memory range (4GB). Signed-off-by: Raghava Aditya Renukunta --- Changes in V2: Corrected flag name to GFP_DMA32