Re: [PATCH 00/13] use setup_timer() helper function.

2017-09-22 Thread Lee Duncan
On 09/22/2017 02:51 AM, Allen Pais wrote: > This series uses setup_timer() helper function. The series > addresses the files under drivers/scsi/*. > > Allen Pais (13): > scsi: sym53c8xx: use setup_timer() helper. > scsi: qla2xxx: use setup_timer() helper. > scsi: esas2r: use setup_timer()

Re: [PATCH 5/6] scsi: qla2xxx: Cocci spatch "pool_zalloc-simple"

2017-09-22 Thread Madhani, Himanshu
> On Sep 20, 2017, at 11:15 PM, Thomas Meyer wrote: > > Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. > Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci" > > Signed-off-by: Thomas Meyer > --- > > diff -u -p

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

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

Re: usb/storage/uas: slab-out-of-bounds in uas_probe

2017-09-22 Thread Alan Stern
On Fri, 22 Sep 2017, Greg Kroah-Hartman wrote: > On Fri, Sep 22, 2017 at 09:58:15AM +0200, Greg Kroah-Hartman wrote: > > On Thu, Sep 21, 2017 at 03:04:05PM -0400, Alan Stern wrote: > > > On Thu, 21 Sep 2017, Andrey Konovalov wrote: > > > > > > > On Thu, Sep 21, 2017 at 6:10 PM, Greg

Re: [PATCH V6 1/3] dma-mapping: Introduce device_is_coherent() as ahelper

2017-09-22 Thread Christoph Hellwig
On Fri, Sep 22, 2017 at 02:44:51PM +0100, Robin Murphy wrote: > Not quite - I mean instead of adding an ops->device_is_coherent callback > (which cannot really have a safe fallback value either way) and trying > to enforce that dma_get_cache_alignment() should be the only valid > caller, just add

Re: [PATCH V6 1/3] dma-mapping: Introduce device_is_coherent() as ahelper

2017-09-22 Thread Robin Murphy
On 22/09/17 03:13, 陈华才 wrote: > Hi, Robin, > > Before 2.6.36 dma_get_cache_alignment is arch-dependent, and it is unified in > commit 4565f0170dfc849b3629c27d7 ("dma-mapping: unify dma_get_cache_alignment > implementations"). Should we revert to the old implementation? Not quite - I mean

Re: usb/storage/uas: slab-out-of-bounds in uas_probe

2017-09-22 Thread Andrey Konovalov
On Thu, Sep 21, 2017 at 9:04 PM, Alan Stern wrote: > On Thu, 21 Sep 2017, Andrey Konovalov wrote: > >> On Thu, Sep 21, 2017 at 6:10 PM, Greg Kroah-Hartman >> wrote: >> > On Thu, Sep 21, 2017 at 05:39:05PM +0200, Andrey Konovalov wrote: >> >>

[PATCH] scsi: ufs: continue to boot even with Boot LUN is disabled

2017-09-22 Thread Huanlin Ke
Several configurable fields of the Device Descriptor and the Unit Descriptors determine the Boot LUN status. The bBootEnable field and the bBootLunEn attribute is set to zero by default, so the Boot LUN is disabled by default. At which point the scsi device add for Boot LUN will fail, but we can

[PATCH 3/5] iscsi-target: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/target/iscsi/iscsi_target_erl0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 4/5] iscsi-target: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/target/iscsi/iscsi_target_erl1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 5/5] iscsi-target: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/target/iscsi/iscsi_target_util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 0/5] use setup_timer() helper function.

2017-09-22 Thread Allen Pais
This series uses setup_timer() helper function. The series addresses the files under drivers/target/iscsi/*. Allen Pais (5): iscsi-target: use setup_timer() helper. iscsi-target: use setup_timer() helper. iscsi-target: use setup_timer() helper. iscsi-target: use setup_timer() helper.

[PATCH 1/5] iscsi-target: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/target/iscsi/iscsi_target_nego.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 2/5] iscsi-target: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/target/iscsi/iscsi_target_login.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 13/13] scsi: bfa: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/bfa/bfad.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c

[PATCH 09/13] scsi: arm: fas216: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/arm/fas216.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/arm/fas216.c

[PATCH 12/13] scsi: qla2xxx: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/qla2xxx/qla_os.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c

[PATCH 11/13] scsi: dc395x: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/dc395x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index

[PATCH 08/13] scsi: ncr53c8xx: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/ncr53c8xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c

[PATCH 10/13] scsi: libiscsi: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/libiscsi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c

[PATCH 03/13] scsi: esas2r: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/esas2r/esas2r_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/esas2r/esas2r_main.c

[PATCH 00/13] use setup_timer() helper function.

2017-09-22 Thread Allen Pais
This series uses setup_timer() helper function. The series addresses the files under drivers/scsi/*. Allen Pais (13): scsi: sym53c8xx: use setup_timer() helper. scsi: qla2xxx: use setup_timer() helper. scsi: esas2r: use setup_timer() helper. scsi: bnx2i: use setup_timer() helper. scsi:

[PATCH 04/13] scsi: bnx2i: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/bnx2i/bnx2i_iscsi.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git

[PATCH 05/13] scsi: arcmsr: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/arcmsr/arcmsr_hba.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c

[PATCH 06/13] scsi: be2iscsi: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/be2iscsi/be_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_main.c

[PATCH 07/13] scsi: qla4xxx: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/qla4xxx/ql4_os.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c

[PATCH 02/13] scsi: qla2xxx: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/qla2xxx/qla_inline.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_inline.h

[PATCH 01/13] scsi: sym53c8xx: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/scsi/sym53c8xx_2/sym_glue.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c

Re: usb/storage/uas: slab-out-of-bounds in uas_probe

2017-09-22 Thread Greg Kroah-Hartman
On Fri, Sep 22, 2017 at 09:58:15AM +0200, Greg Kroah-Hartman wrote: > On Thu, Sep 21, 2017 at 03:04:05PM -0400, Alan Stern wrote: > > On Thu, 21 Sep 2017, Andrey Konovalov wrote: > > > > > On Thu, Sep 21, 2017 at 6:10 PM, Greg Kroah-Hartman > > > wrote: > > > > On

Re: usb/storage/uas: slab-out-of-bounds in uas_probe

2017-09-22 Thread Greg Kroah-Hartman
On Thu, Sep 21, 2017 at 03:04:05PM -0400, Alan Stern wrote: > On Thu, 21 Sep 2017, Andrey Konovalov wrote: > > > On Thu, Sep 21, 2017 at 6:10 PM, Greg Kroah-Hartman > > wrote: > > > On Thu, Sep 21, 2017 at 05:39:05PM +0200, Andrey Konovalov wrote: > > >> Hi! > > >> >

[PATCH 16/19] lpfc: Ensure io aborts interlocked with the target.

2017-09-22 Thread James Smart
From: Dick Kennedy Before releasing nvme io back to the io stack for possible retry on other paths, ensure the io termination is interlocked with the target device by ensuring the entire ABTS-LS protocol is complete. Additionally, FC-NVME ABTS-LS protocol does not use

[PATCH 06/19] lpfc: Make ktime sampling more accurate

2017-09-22 Thread James Smart
From: Dick Kennedy Need to make ktime samples more accurate If ktime is turned on in the middle of an IO, the max calculation could be misleading. Base sampling on the start time of the IO as opposed to ktime_on. Make ISR ktime timestamps be from when CQE is read

[PATCH 13/19] lpfc: Disable NPIV support if NVME is enabled

2017-09-22 Thread James Smart
From: Dick Kennedy The initial implementation of NVME didn't merge with NPIV support. As such, there are several issues if NPIV is used with NVME. For now, ensure that if NVME is enabled then NPIV is not enabled. Support for NPIV with NVME will be added in the near

[PATCH 18/19] lpfc: Fix oops of nvme host during driver unload.

2017-09-22 Thread James Smart
From: Dick Kennedy When running NVME io as a NVME host, if the driver is unloaded there would be oops in lpfc_sli4_issue_wqe. When unloading, controllers are torn down and the transport initiates set_property commands to reset the controller and issues aborts to

[PATCH 17/19] lpfc: Extend RDP support

2017-09-22 Thread James Smart
From: Dick Kennedy Support RDP and Multiple Frames If the remote Nport is not logged in, the driver would not populate all the descriptors in the RDP response payload. Doing so would create a payload length that requires multiple frames due to exceeding the default rx

[PATCH 19/19] lpfc: change version to 11.4.0.4

2017-09-22 Thread James Smart
From: Dick Kennedy Change version to 11.4.0.4 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

[PATCH 10/19] lpfc: Set missing abort context

2017-09-22 Thread James Smart
Always set ctxp->state to LPFC_NVMET_STE_ABORT if ABORT op gets called Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvmet.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 12/19] lpfc: Fix oops if nvmet_fc_register_targetport fails

2017-09-22 Thread James Smart
From: Dick Kennedy if nvmet targetport registration fails, the driver encounters a NULL pointer oops in lpfc_hb_timeout_handler. To fix: if registration fails, ensure nvmet_support is cleared on the port structure. Also enhanced the log message on failure.

[PATCH 15/19] lpfc: Fix secure firmware updates

2017-09-22 Thread James Smart
From: Dick Kennedy Firmware update fails with: status x17 add_status x56 on the final write If multiple DMA buffers are used for the download, some firmware revs have difficulty with signatures and crcs split across the dma buffer boundaries. Resolve by making all

[PATCH 07/19] lpfc: Move CQ processing to a soft IRQ

2017-09-22 Thread James Smart
From: Dick Kennedy Under heavy target nvme load duration, the lpfc irq handler is encountering cpu lockup warnings. Convert the driver to a shortened ISR handler which identifies the interrupting condition then schedules a workq thread to process the completion queue

[PATCH 14/19] lpfc: Fix crash in lpfc_nvme_fcp_io_submit during LIP

2017-09-22 Thread James Smart
From: Dick Kennedy The driver is seeing a NULL pointer in lpfc_nvme_fcp_io_submit. This was ultimately due to a transport AER being send on a terminated controller, thus some of the values were not set. In case we're in a system without a corrected transport and in

[PATCH 09/19] lpfc: Reduce log spew on controller reconnects

2017-09-22 Thread James Smart
There are several log messages that report abnormal terminations that by default are marked warn. These are typically the result of failures due to invalid controller state or abort completions. They are all natural when a controller resets. Unfortunately, as they are logged by default, it makes

[PATCH 11/19] lpfc: Revise NVME module parameter descriptions for better clarity

2017-09-22 Thread James Smart
From: Dick Kennedy The descriptions for lpfc_xri_split and lpfc_enable_fc4_type were poor. Revise for better understanding: lpfc_xri_split - Percentage of FCP XRI resources versus NVME lpfc_enable_fc4_type - Enable FC4 Protocol support - FCP / NVME Signed-off-by:

[PATCH 00/19] lpfc updates for 11.4.0.4

2017-09-22 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.14/scsi-queue tree. There are no outside dependencies. lpfc: Fix crash in pci hot plug situations lpfc: Fix crash receiving ELS while detaching driver lpfc: Fix lpfc nvme

[PATCH 01/19] lpfc: Fix crash in pci hot plug situations

2017-09-22 Thread James Smart
From: Dick Kennedy During pci hot plug scenarios the driver had two issues: a) oops in a list_add call The lookup by tag function will return null if the IOCB is out of range or does not have the on txcmplq flag set. Fix: Check for null return from lookup by tag.

[PATCH 03/19] lpfc: Fix lpfc nvme host rejecting IO with Not Ready message

2017-09-22 Thread James Smart
From: Dick Kennedy In a link bounce scenario, a condition can occur where the discovery engine swaps an ndlp structure (address changbe for an nport). While the swap was successfully executed by the discovery engine, the driver did not properly detect a change in the

[PATCH 02/19] lpfc: Fix crash receiving ELS while detaching driver

2017-09-22 Thread James Smart
From: Dick Kennedy The driver crashes when attempting to use a freed ndpl pointer. The pci_remove_one handler runs on a separate kernel thread. The order of the removal is starting by freeing all of the ndlps and then disabling interrupts. In between these two events

[PATCH 08/19] lpfc: Fix FCP hba_wqidx assignment

2017-09-22 Thread James Smart
From: Dick Kennedy The driver is encountering oops in lpfc_sli_calc_ring. The driver is setting hba_wqidx for FCP based on the policy in use for NVME. The two may not be the same. Change to set the wqidx based on the FCP policy. Signed-off-by: Dick Kennedy

[PATCH 05/19] lpfc: PLOGI failures during NPIV testing

2017-09-22 Thread James Smart
From: Dick Kennedy Local Reject/Invalid RPI errors seen during discovery. Temporary RPI cleanup was occurring regardless of SLI rev. It's only necessary on SLI-4. Adjust the test for whether cleanup is necessary. Signed-off-by: Dick Kennedy

[PATCH 04/19] lpfc: Fix warning messages when NVME_TARGET_FC not defined

2017-09-22 Thread James Smart
From: Dick Kennedy Warning messages when NVME_TARGET_FC not defined on ppc builds The lpfc_nvmet_replenish_context() function is only meaningful when NVME target mode enabled. Surround the function body with ifdefs for target mode enablement. Signed-off-by: Dick

[PATCHv5 0/5] scsi: Fixup blacklist handling

2017-09-22 Thread Hannes Reinecke
From: Hannes Reinecke the SCSI blacklist handling seems to be rather tricky issue; everytime a fix is included it tends to break other devices. This patchset attempt to simplify the devlist handling yet again, but this time implementing the framework for regression testing, too. A

[PATCHv5 3/5] scsi_devinfo: Reformat blacklist flags

2017-09-22 Thread Hannes Reinecke
Reformat blacklist flags to make the values easier to read and to enhance error checking. Signed-off-by: Hannes Reinecke Reviewed-by: Bart van Assche --- include/scsi/scsi_devinfo.h | 76 + 1 file changed, 50

[PATCHv5 5/5] scsi_devinfo: fixup string compare

2017-09-22 Thread Hannes Reinecke
When checking the model and vendor string we need to use the minimum value of either string, otherwise we'll miss out on wildcard matches. And we should take card when matching with zero size strings; results might be unpredictable. With this patch the rules for matching devinfo strings are as

[PATCHv5 1/5] scsi_debug: allow to specify inquiry vendor and model

2017-09-22 Thread Hannes Reinecke
For testing purposes we need to be able to pass in the inquiry vendor and model. Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Cc: Doug Gilbert --- drivers/scsi/scsi_debug.c | 25 + 1 file

[PATCHv5 4/5] scsi_devinfo: Whitespace fixes

2017-09-22 Thread Hannes Reinecke
Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_devinfo.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 28fea83ae2fe..6858ad87dac1 100644 ---

[PATCHv5 2/5] scsi: Export blacklist flags to sysfs

2017-09-22 Thread Hannes Reinecke
Each scsi device is scanned according to the found blacklist flags, but this information is never presented to sysfs. This makes it quite hard to figure out if blacklisting worked as expected. With this patch we're exporting an additional attribute 'blacklist' containing the blacklist flags for