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

2017-09-21 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 RRQ. Remove RRQ behavior fr

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

2017-09-21 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 instead of EQE. Added additiona

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

2017-09-21 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 future. Signed-off-by: Dick K

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

2017-09-21 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 terminate existing io. The drive

[PATCH 17/19] lpfc: Extend RDP support

2017-09-21 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 buffer size without an expl

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

2017-09-21 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 a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h index 6aa192b3e4bf.

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

2017-09-21 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 a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index 43ad220e17ad

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

2017-09-21 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. Signed-off-by: Dick Kennedy Signed-o

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

2017-09-21 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 writes be a single 4k page in

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

2017-09-21 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 t

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

2017-09-21 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: Dick Kennedy Signed-off-by:

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

2017-09-21 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 the interrupt was for. This

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

2017-09-21 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 case a race condition occurs wh

[PATCH 00/19] lpfc updates for 11.4.0.4

2017-09-21 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-21 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. b) oops in kernels timer mana

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

2017-09-21 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 ndlp bound to the nvme rport.

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

2017-09-21 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 the driver can still receive

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

2017-09-21 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 Signed-off-by: James Smart --- dri

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

2017-09-21 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 Signed-off-by: James Smart --- drivers/scsi/lpfc/l

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

2017-09-21 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 Kennedy Signed-off-by: James Sm

[PATCHv5 0/5] scsi: Fixup blacklist handling

2017-09-21 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 patch adding a

[PATCHv5 3/5] scsi_devinfo: Reformat blacklist flags

2017-09-21 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 insertions(+), 26 deletions(-) diff --git

[PATCHv5 5/5] scsi_devinfo: fixup string compare

2017-09-21 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 foll

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

2017-09-21 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 changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/scs

[PATCHv5 4/5] scsi_devinfo: Whitespace fixes

2017-09-21 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 --- a/drivers/scsi/sc

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

2017-09-21 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 thi

Re: ibmvfc oddities

2017-09-21 Thread Hannes Reinecke
On 09/21/2017 08:29 PM, Tyrel Datwyler wrote: > On 09/21/2017 08:13 AM, Brian King wrote: >> On 09/21/2017 05:02 AM, Hannes Reinecke wrote: >>> Hi Brian, >>> >>> I was looking at the ibmvfc code (trying to hook up libfc), and have >>> found this definition: >>> >>> struct ibmvfc_fcp_rsp_info { >>>

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

2017-09-21 Thread 陈华才
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? Huacai -- Original -- From: "

Re: [PATCH 1/1] scsi: bnx: use setup_timer

2017-09-21 Thread Chad Dupuis
On Thu, 21 Sep 2017, 7:47am, Allen Pais wrote: > Use setup_timer function instead of initializing timer with the > function and data fields. > > Signed-off-by: Allen Pais > --- > drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --

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

2017-09-21 Thread Alan Stern
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! > >> > >> I've got the following report while fuzzing the kernel with syzkaller. > >> > >> On commit ebb2c2437

Re: Is the possible cross-talking between unrelated file-descriptors on bsg-device by design?

2017-09-21 Thread Benjamin Block
On Tue, Sep 19, 2017 at 02:16:26PM -0400, Douglas Gilbert wrote: > On 2017-09-19 10:56 AM, Benjamin Block wrote: > > Hello linux-block, > > > > I wrote some tests recently to test patches against bsg.c and bsg-lib.c, > > and while writing those I noticed something strange: > > > > When you use th

Re: ibmvfc oddities

2017-09-21 Thread Tyrel Datwyler
On 09/21/2017 08:13 AM, Brian King wrote: > On 09/21/2017 05:02 AM, Hannes Reinecke wrote: >> Hi Brian, >> >> I was looking at the ibmvfc code (trying to hook up libfc), and have >> found this definition: >> >> struct ibmvfc_fcp_rsp_info { >> __be16 reserved; >> u8 rsp_code; >> u8 re

[PATCH 1/1] bsg-lib: fix use-after-free under memory-pressure

2017-09-21 Thread Benjamin Block
When under memory-pressure it is possible that the mempool which backs the 'struct request_queue' will make use of up to BLKDEV_MIN_RQ count emergency buffers - in case it can't get a regular allocation. These buffers are preallocated and once they are also used, they are re-supplied with old finis

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

2017-09-21 Thread Andrey Konovalov
On Thu, Sep 21, 2017 at 6:50 PM, Alan Stern wrote: > On Thu, 21 Sep 2017, Andrey Konovalov wrote: > >> Hi! >> >> I've got the following report while fuzzing the kernel with syzkaller. >> >> On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). >> >> The issue occurs when we iterate over int

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

2017-09-21 Thread Alan Stern
On Thu, 21 Sep 2017, Andrey Konovalov wrote: > Hi! > > I've got the following report while fuzzing the kernel with syzkaller. > > On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). > > The issue occurs when we iterate over interface altsettings, but I > don't see the driver doing anyt

RE: [PATCH] scsi: aacraid: Add a small delay after IOP reset

2017-09-21 Thread Dave Carroll
> From: Guilherme G. Piccoli [mailto:gpicc...@linux.vnet.ibm.com] > Sent: Tuesday, September 19, 2017 9:12 AM > To: dl-esc-Aacraid Linux Driver ; linux- > s...@vger.kernel.org > Cc: gpicc...@linux.vnet.ibm.com; Raghava Aditya Renukunta > ; Dave Carroll > ; brk...@linux.vnet.ibm.com; > dougm...@linu

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

2017-09-21 Thread Greg Kroah-Hartman
On Thu, Sep 21, 2017 at 05:39:05PM +0200, Andrey Konovalov wrote: > Hi! > > I've got the following report while fuzzing the kernel with syzkaller. > > On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). > > The issue occurs when we iterate over interface altsettings, but I > don't see t

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

2017-09-21 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). The issue occurs when we iterate over interface altsettings, but I don't see the driver doing anything wrong. I might be missing something, or this might be an

Re: ibmvfc oddities

2017-09-21 Thread Brian King
On 09/21/2017 05:02 AM, Hannes Reinecke wrote: > Hi Brian, > > I was looking at the ibmvfc code (trying to hook up libfc), and have > found this definition: > > struct ibmvfc_fcp_rsp_info { > __be16 reserved; > u8 rsp_code; > u8 reserved2[4]; > }__attribute__((packed, aligned (2

Re: [PATCH V6 2/3] dma-mapping: Rework dma_get_cache_alignment()function

2017-09-21 Thread Christoph Hellwig
On Thu, Sep 21, 2017 at 12:28:25PM +0800, 陈华才 wrote: > Hi, Christoph, > > I have changed dma_get_cache_alignment's return value, and I don't know > whether those drivers want to return ARCH_DMA_MINALIGN unconditionally. So I > pass a NULL for those drivers, in order to keep their old behavior.

[PATCH 1/1] scsi: bnx: use setup_timer

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

[PATCH 1/1] drivers:scsi: use setup_timer

2017-09-21 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 b/drivers/scsi/sym53c8xx

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

2017-09-21 Thread Robin Murphy
On 19/09/17 09:52, Huacai Chen wrote: > We will use device_is_coherent() as a helper function, which will be > used in the next patch. > > There is a MIPS-specific plat_device_is_coherent(), but we need a more > generic solution, so add and use a new function pointer in dma_map_ops. I think we're

ibmvfc oddities

2017-09-21 Thread Hannes Reinecke
Hi Brian, I was looking at the ibmvfc code (trying to hook up libfc), and have found this definition: struct ibmvfc_fcp_rsp_info { __be16 reserved; u8 rsp_code; u8 reserved2[4]; }__attribute__((packed, aligned (2))); in comparison, libfc has this: struct fcp_resp_rsp_inf

Re: [PATCH V3 4/9] pm80xx : tag allocation for phy control request.

2017-09-21 Thread Jinpu Wang
On Wed, Sep 20, 2017 at 5:18 PM, kbuild test robot wrote: > Hi Viswas, > > [auto build test WARNING on mkp-scsi/for-next] > [also build test WARNING on v4.14-rc1 next-20170920] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > ht

Re: [PATCH v2 18/31] scsi/aic7xxx: Clean up timer usage

2017-09-21 Thread Hannes Reinecke
On 09/21/2017 01:27 AM, Kees Cook wrote: > stat_timer only ever assigns the same function and data, so consolidate to > a setup_timer() call and drop everything else used to pass things around. > > reset_timer is unused; remove it. > > Cc: Hannes Reinecke > Cc: "James E.J. Bottomley" > Cc: "Mar