Re: [PATCH] scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy

2017-11-20 Thread Stuart Hayes
Pavel, It turns out that the error handler on our systems was not getting woken up for a different reason... I submitted a patch earlier today that fixes the issue I were seeing (I CCed you on the patch). Before I got my hands on the failing system and was able to root cause it, I was pretty

Re: [PATCH 0/13] scsi: arcmsr: add some driver options and support new adapter ARC-1884

2017-11-20 Thread Ching Huang
On Mon, 2017-11-20 at 22:03 -0500, Martin K. Petersen wrote: > Ching, > > > The following patches apply to Martin's 4.15/scsi-queue. > > Applied to 4.16/scsi-queue. Thank you! > Hi Martin, Thank you for response. These patches can apply to 4.16/scsi-queue is very good. It will be very

Re: [PATCH 0/3] Some fixes to aacraid

2017-11-20 Thread Martin K. Petersen
Guilherme, > This series presents 3 small fixes for aacraid driver. The most > important is the crash prevention, IMHO. Applied to 4.15/scsi-fixes. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: aacraid: remove unused variable managed_request_id

2017-11-20 Thread Martin K. Petersen
Colin, > Variable managed_request_id is being assigned but it is never read, > hence it is redundant and can be removed. Cleans up clang warning: Applied to 4.16/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] bfa: remove unused pointer 'port'

2017-11-20 Thread Martin K. Petersen
Colin, > The pointer 'port' is being assigned but it is never read, hence it is > redundant and can be removed. Cleans up clang warning: > > drivers/scsi/bfa/bfad_attr.c:505:2: warning: Value stored to 'port' > is never read Applied to 4.16/scsi-queue. Thanks, Colin! -- Martin K. Petersen

Re: [PATCH] scsi: st.c: fix kernel-doc mismatch

2017-11-20 Thread Martin K. Petersen
Randy, > Fix kernel-doc function name and comments in st.c::read_ns_show(): > change us to ns to match the function name. Applied to 4.16/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: fix another I2O typo

2017-11-20 Thread Martin K. Petersen
Randy, > Correct another typo I20 to I2O. Applied to 4.16/scsi-queue, thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: csiostor: remove unneeded DRIVER_LICENSE #define

2017-11-20 Thread Martin K. Petersen
Greg, > There is no need to #define the license of the driver, just put it in > the MODULE_LICENSE() line directly as a text string. > > This allows tools that check that the module license matches the source > code license to work properly, as there is no need to unwind the > unneeded

Re: [PATCH 3/3] scsi: 3w-9xxx: rework lock timeouts

2017-11-20 Thread Martin K. Petersen
Arnd, > The TW_IOCTL_GET_LOCK ioctl uses do_gettimeofday() to check whether a > lock has expired. This can misbehave due to a concurrent > settimeofday() call, as it is based on 'real' time, and it will > overflow in y2038 on 32-bit architectures, producing unexpected > results when used across

Re: [PATCH 2/3] scsi: 3ware: use 64-bit times for FW time sync

2017-11-20 Thread Martin K. Petersen
Arnd, > The calculation of the number of seconds since Sunday 00:00:00 > overflows in 2106, meaning that we instead will return the seconds > since Wednesday 06:28:16 afterwards. > > Using 64-bit time stamps avoids this slight inconsistency, and the > deprecated do_gettimeofday(), replacing it

Re: [PATCH 1/3] scsi: 3ware: fix 32-bit time calculations

2017-11-20 Thread Martin K. Petersen
Arnd, > twl_aen_queue_event/twa_aen_queue_event, we use do_gettimeofday() > to read the lower 32 bits of the current time in seconds, to pass > them to the TW_IOCTL_GET_NEXT_EVENT ioctl or the 3ware_aen_read > sysfs file. > > This will overflow on all architectures in year 2106, there is > not

Re: [PATCH 0/7] scsi: bfa: do_gettimeofday removal

2017-11-20 Thread Martin K. Petersen
Arnd, > The bfa driver is one of the main users of do_gettimeofday(), a > function that I'm trying to remove as part of the y2038 cleanup. > > The timestamps are all uses in slightly different ways, so this has > turned into a rather longish series for doing something that should be > simple. >

Re: [PATCH 0/13] scsi: arcmsr: add some driver options and support new adapter ARC-1884

2017-11-20 Thread Martin K. Petersen
Ching, > The following patches apply to Martin's 4.15/scsi-queue. Applied to 4.16/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH V8 6/7] sd_zbc: Initialize device request queue zoned data

2017-11-20 Thread Martin K. Petersen
Damien, > Initialize the seq_zones_bitmap, seq_zones_wlock and nr_zones fields > of the disk request queue on disk revalidate. As the seq_zones_bitmap > and seq_zones_wlock allocations are identical, introduce the helper > sd_zbc_alloc_zone_bitmap(). Using this helper, reallocate the bitmaps >

Re: [PATCH] scsi: ppa: mark expected switch fall-throughs

2017-11-20 Thread Martin K. Petersen
Gustavo A., > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. Applied to 4.16/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] fnic: use 64-bit timestamps

2017-11-20 Thread Martin K. Petersen
> struct timespec is deprecated since it overflows in 2038 on 32-bit > architectures, so we should use timespec64 consistently. > > I'm slightly adapting the format strings here, to make sure we print > the nanoseconds with the correct number of leading zeroes. Satish: Please review/test. Thank

Re: [PATCH] scsi: hpsa: remove an unecessary NULL check

2017-11-20 Thread Martin K. Petersen
> device->scsi3addr[] is an array, not a pointer, so it can't be NULL. > I've removed the check. Microsemi folks, please review. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: bnx2i: bnx2i_hwi: use swap macro in bnx2i_send_iscsi_nopout

2017-11-20 Thread Martin K. Petersen
Gustavo A., > Make use of the swap macro and remove unnecessary variable tmp. > This makes the code easier to read and maintain. Applied to 4.16/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

[PATCH] scsi: st.c: fix kernel-doc mismatch

2017-11-20 Thread Randy Dunlap
From: Randy Dunlap Fix kernel-doc function name and comments in st.c::read_ns_show(): change us to ns to match the function name. Signed-off-by: Randy Dunlap --- drivers/scsi/st.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---

[PATCH] target-core: don't use "const char*" for a buffer that is written to

2017-11-20 Thread Rasmus Villemoes
From: Rasmus Villemoes iscsi_parse_pr_out_transport_id launders the const away via a call to strstr(), and then modifies the buffer (writing a nul byte) through the return value. It's cleaner to be honest and simply declare the parameter as "char*", fixing up the call

[PATCH v3 00/17] lpfc updates for 11.4.0.5

2017-11-20 Thread James Smart
This patch set provides a number of bug fixes and additions to the driver. The patches were cut against the Martin's 4.15/scsi-queue tree. There are no outside dependencies and are expected to be pulled via Martins tree. v2: Rework patch 1 per review Add signed-by's on other patches v3:

[PATCH v3 01/17] lpfc: FLOGI failures are reported when connected to a private loop.

2017-11-20 Thread James Smart
When the HBA is connected to a private loop, the driver reports FLOGI loop-open failure as functional error. This is an expected condition. Mark loop-open failure as a warning instead of error. Signed-off-by: Dick Kennedy Signed-off-by: James Smart

[PATCH v3 04/17] lpfc: Fix crash after bad bar setup on driver attachment

2017-11-20 Thread James Smart
In test cases where an instance of the driver is detached and reattached, the driver will crash on reattachment. There is a compound if statement that will skip over the bar setup if the pci_resource_start call is not successful. The driver erroneously returns success to its bar setup in this

[PATCH v3 09/17] lpfc: Adjust default value of lpfc_nvmet_mrq

2017-11-20 Thread James Smart
The current default for async hw receive queues is 1, which presents issues under heavy load as number of queues influence the available async receive buffer limits. Raise the default to the either the current hw limit (16) or the number of hw qs configured (io channel value). Revise the

[PATCH v3 08/17] lpfc: Fix display for debugfs queInfo

2017-11-20 Thread James Smart
Display for lpfc/fnX/iDiag/queInfo isn't formatted perfectly. Corrected the format strings for the queue info debug messages. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke ---

[PATCH v3 16/17] lpfc: small sg cnt cleanup

2017-11-20 Thread James Smart
The logic for sg_seg_cnt is a bit convoluted. This patch tries to clean up a couple of areas, especially around the +2 and +1 logic. This patch: - cleans up the lpfc_sg_seg_cnt attribute to specify a real minimum rather than making the minimum be whatever the default is. - Remove the hardcoding

[PATCH v3 12/17] lpfc: correct port registrations with nvme_fc

2017-11-20 Thread James Smart
The driver currently registers any remote port that has NVME support. It should only be registering target ports. Register only target ports. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke

[PATCH v3 10/17] lpfc: Fix ndlp ref count for pt2pt mode issue RSCN

2017-11-20 Thread James Smart
pt2pt ndlp ref count prematurely goes to 0. There was reference removed that should only be removed if connected to a switch, not if in point-to-point mode. Add a mode check before the reference remove. Signed-off-by: Dick Kennedy Signed-off-by: James Smart

[PATCH v3 14/17] lpfc: Fix crash during driver unload with running nvme traffic

2017-11-20 Thread James Smart
When the driver is unloading, the nvme transport could be in the process of submitting new requests, will send abort requests to terminate associations, or may make LS-related requests. The driver's abort and request entry points currently is ignorant of the unloading state and is starting the

[PATCH v3 11/17] lpfc: Linux LPFC driver does not process all RSCNs

2017-11-20 Thread James Smart
During RSCN storms, the driver does not rediscover some targets. The driver marks some RSCN as to be handled after the ones it's working on. The driver missed processing some deferred RSCN. Move where the driver checks for deferred RSCNs and initiate deferred RSCN handling if the flag was set.

[PATCH v3 06/17] lpfc: Raise maximum NVME sg list size for 256 elements

2017-11-20 Thread James Smart
Raise the maximum NVME sg list size allowed to 256 elements. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 05/17] lpfc: Fix NVME LS abort_xri

2017-11-20 Thread James Smart
performing an LS abort results in the following message being seen: 0603 Invalid CQ subtype 6: 0300 2202 0016 d005 and the associated exchange is not properly freed. The code did not recognize the exchange type that was aborted, thus it was not properly handled. Correct by

[PATCH v3 03/17] lpfc: Handle XRI_ABORTED_CQE in soft IRQ

2017-11-20 Thread James Smart
XRI_ABORTED_CQE completions were not being handled in the fast path. They were being queued and deferred to the lpfc worker thread for processing. This is an artifact of the driver design prior to moving queue processing out of the isr and into a workq element. Now that queue processing is already

[PATCH v3 17/17] lpfc: update driver version to 11.4.0.5

2017-11-20 Thread James Smart
Update the driver version to 11.4.0.5 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 13/17] lpfc: Correct driver deregistrations with host nvme transport

2017-11-20 Thread James Smart
The driver's interaction with the host nvme transport has been incorrect for a while. The driver did not wait for the unregister callbacks (waited only 5 jiffies). Thus the driver may remove objects that may be referenced by subsequent abort commands from the transport, and the actual unregister

[PATCH v3 15/17] lpfc: Fix driver handling of nvme resources during unload

2017-11-20 Thread James Smart
During driver unload, the driver may crash due to NULL pointers. The NULL pointers were due to the driver not protecting itself sufficiently during some of the teardown paths. Additionally, the driver was not waiting for and cleanup up nvme io resources. As such, the driver wasn't making the

[PATCH v3 02/17] lpfc: Expand WQE capability of every NVME hardware queue

2017-11-20 Thread James Smart
Hardware queues are a fast staging area to push commands into the adapter. The adapter should drain them extremely quickly. However, under heavy io load, the host cpu is pushing commands faster than the drain rate of the adapter causing the driver to resource busy commands. Enlarge the hardware

[PATCH v3 07/17] lpfc: Driver fails to detect direct attach storage array

2017-11-20 Thread James Smart
The driver does not respond to PLOGI from the direct attach target. The driver uses incorrect S_ID in CONFIG_LINK, after FLOGI completion Correct by issuing CONFIG_LINK with the correct S_ID after receiving the PLOGI from the target Signed-off-by: Dick Kennedy

Re: [PATCH v15 5/5] PCI: Remove PCI pool macro functions

2017-11-20 Thread Bjorn Helgaas
On Mon, Nov 20, 2017 at 08:32:47PM +0100, Romain Perier wrote: > From: Romain Perier > > Now that all the drivers use dma pool API, we can remove the macro > functions for PCI pool. > > Signed-off-by: Romain Perier > Reviewed-by: Peter

[PATCH v15 2/5] net: e100: Replace PCI pool old API

2017-11-20 Thread Romain Perier
From: Romain Perier The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin

[PATCH v15 4/5] scsi: mpt3sas: Replace PCI pool old API

2017-11-20 Thread Romain Perier
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier --- drivers/scsi/mpt3sas/mpt3sas_base.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[PATCH v15 3/5] hinic: Replace PCI pool old API

2017-11-20 Thread Romain Perier
From: Romain Perier The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 10

[PATCH v15 0/5] Replace PCI pool by DMA pool API

2017-11-20 Thread Romain Perier
by the dma pool API and remove the defines. Changes in v15: - Rebased series onto next-20171120 - Added patch 04/05 for mpt3sas scsi driver Changes in v14: - Rebased series onto next-20171018 - Rebased patch 03/05 on latest driver Changes in v13: - Rebased series onto next-20170906 - Added a new

[PATCH v15 5/5] PCI: Remove PCI pool macro functions

2017-11-20 Thread Romain Perier
From: Romain Perier Now that all the drivers use dma pool API, we can remove the macro functions for PCI pool. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- include/linux/pci.h | 9

[PATCH v15 1/5] block: DAC960: Replace PCI pool old API

2017-11-20 Thread Romain Perier
From: Romain Perier The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin

[PATCH] scsi_error: ensure EH wakes up on error to prevent host getting stuck

2017-11-20 Thread Stuart Hayes
When a command is added to the host's error handler command queue, there is a chance that the error handler will not be woken up. This can happen when one CPU is running scsi_eh_scmd_add() at the same time as another CPU is running scsi_device_unbusy() for a different command on the same host.

[PATCH] scsi: smartpqi: put controller in SIS mode at shutdown

2017-11-20 Thread Vincent Minet
Since commit 162d7753fce9 ("scsi: smartpqi: ensure controller is in SIS mode at init"), the driver is able to work even if the controller is in PQI mode at startup. This made it possible to keep using the controller across a kexec. But kernels built before that patch still expect the controller

[PATCH] scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg

2017-11-20 Thread Gustavo A. R. Silva
_vreg_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _vreg_ has been null checked. This issue was detected with the help of Coccinelle. Fixes: aa4976130934 ("ufs: Add regulator enable

Re: [PATCH v2 17/17] lpfc: update driver version to 11.4.0.5

2017-11-20 Thread Hannes Reinecke
On 11/10/2017 02:08 AM, James Smart wrote: > Update the driver version to 11.4.0.5 > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart > --- > drivers/scsi/lpfc/lpfc_version.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v2 15/17] lpfc: Fix driver handling of nvme resources during unload

2017-11-20 Thread Hannes Reinecke
On 11/10/2017 02:08 AM, James Smart wrote: > During driver unload, the driver may crash due to NULL pointers. > The NULL pointers were due to the driver not protecting itself > sufficiently during some of the teardown paths. > Additionally, the driver was not waiting for and cleanup up nvme > io

Re: [PATCH v2 16/17] lpfc: small sg cnt cleanup

2017-11-20 Thread Hannes Reinecke
On 11/10/2017 02:08 AM, James Smart wrote: > The logic for sg_seg_cnt is a bit convoluted. This patch tries to > clean up a couple of areas, especially around the +2 and +1 logic. > > This patch: > - cleans up the lpfc_sg_seg_cnt attribute to specify a real minimum > rather than making the

Re: [PATCH v2 14/17] lpfc: Fix crash during driver unload with running nvme traffic

2017-11-20 Thread Hannes Reinecke
On 11/10/2017 02:08 AM, James Smart wrote: > When the driver is unloading, the nvme transport could be in the > process of submitting new requests, will send abort requests to > terminate associations, or may make LS-related requests. > The driver's abort and request entry points currently is

Re: [PATCH v2 13/17] lpfc: Correct driver deregistrations with host nvme transport

2017-11-20 Thread Hannes Reinecke
On 11/10/2017 02:08 AM, James Smart wrote: > The driver's interaction with the host nvme transport has been > incorrect for a while. The driver did not wait for the unregister > callbacks (waited only 5 jiffies). Thus the driver may remove > objects that may be referenced by subsequent abort

Re: [PATCH v2 12/17] lpfc: correct port registrations with nvme_fc

2017-11-20 Thread Hannes Reinecke
On 11/10/2017 02:08 AM, James Smart wrote: > The driver currently registers any remote port that has NVME support. > It should only be registering target ports. > > Register only target ports. > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart

Re: [PATCH v2 11/17] lpfc: Linux LPFC driver does not process all RSCNs

2017-11-20 Thread Hannes Reinecke
On 11/10/2017 02:08 AM, James Smart wrote: > During RSCN storms, the driver does not rediscover some targets. > The driver marks some RSCN as to be handled after the ones it's > working on. The driver missed processing some deferred RSCN. > > Move where the driver checks for deferred RSCNs and

Re: [PATCH v2 10/17] lpfc: Fix ndlp ref count for pt2pt mode issue RSCN

2017-11-20 Thread Hannes Reinecke
On 11/10/2017 02:08 AM, James Smart wrote: > pt2pt ndlp ref count prematurely goes to 0. There was reference > removed that should only be removed if connected to a switch, > not if in point-to-point mode. > > Add a mode check before the reference remove. > > Signed-off-by: Dick Kennedy

Re: [PATCH v2 01/17] lpfc: FLOGI failures are reported when connected to a private loop.

2017-11-20 Thread Hannes Reinecke
On 11/10/2017 02:08 AM, James Smart wrote: > When the HBA is connected to a private loop, the driver > reports FLOGI loop-open failure as functional error. This is > an expected condition. > > Mark loop-open failure as a warning instead of error. > > Signed-off-by: Dick Kennedy

Re: [PATCH 10/17] lpfc: Fix ndlp ref count for pt2pt mode issue RSCN

2017-11-20 Thread Hannes Reinecke
On 11/03/2017 11:56 PM, James Smart wrote: > pt2pt ndlp ref count prematurely goes to 0. There was reference > removed that should only be removed if connected to a switch, > not if in point-to-point mode. > > Add a mode check before the reference remove. > > Signed-off-by: Dick Kennedy

Re: [PATCH V10 1/4] dma-mapping: Rework dma_get_cache_alignment()

2017-11-20 Thread Christoph Hellwig
Please send the scsi fixes on their own for now so that the rework can go into 4.16. If you don't want to do it I'll do it myself and will send them to Martin for now you can the rebase the dma-mapping and mips work after that.