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

2017-05-11 Thread Martin K. Petersen
Johannes, > 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.

Re: [PATCH] sd: Unlock zone in case of error in sd_setup_write_same_cmnd()

2017-05-11 Thread Martin K. Petersen
Damien, > scsi_io_init() may fail, leaving a zone of a zoned block device locked. > Fix this by properly unlocking the write same request target zone if > scsi_io_init() fails. Applied to 4.12/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2] sd: Write lock zone for REQ_OP_WRITE_ZEROES

2017-05-11 Thread Martin K. Petersen
Damien, > For a zoned block device, sd_zbc_complete() handles zone write unlock > on completion of a REQ_OP_WRITE_ZEROES command but the zone write > locking is missing from sd_setup_write_zeroes_cmnd(). This patch fixes > this problem by locking the target zone of a REQ_OP_WRITE_ZEROES >

Re: [PATCH V4 00/12] hpsa updates

2017-05-11 Thread Martin K. Petersen
Don, Applied to 4.13/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

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

2017-05-11 Thread Martin K. Petersen
Raghava, > 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. Applied to 4.13/scsi-queue, thanks! --

Re: [PATCH V2 00/36] smartpqi updates

2017-05-11 Thread Martin K. Petersen
Don, Applied to 4.13/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

[Bug 188961] Function mvs_task_prep() returns improper values on failures

2017-05-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=188961 bianpan (bianpan2...@ruc.edu.cn) changed: What|Removed |Added Status|NEW |RESOLVED

[Bug 188951] Function beiscsi_create_eqs() may return improper value when the call to pci_alloc_consistent() fails, which may result in use-after-free

2017-05-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=188951 bianpan (bianpan2...@ruc.edu.cn) changed: What|Removed |Added Status|NEW |RESOLVED

[Bug 188951] Function beiscsi_create_eqs() may return improper value when the call to pci_alloc_consistent() fails, which may result in use-after-free

2017-05-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=188951 --- Comment #1 from bianpan (bianpan2...@ruc.edu.cn) --- Created attachment 256441 --> https://bugzilla.kernel.org/attachment.cgi?id=256441=edit The patch fixes the bug The patch has been merged into the latest version of the Linux kernel. So

[Bug 188941] Function beiscsi_create_cqs() may return improper value when the call to pci_alloc_consistent() fails, which may result in use-after-free

2017-05-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=188941 --- Comment #1 from bianpan (bianpan2...@ruc.edu.cn) --- Created attachment 256439 --> https://bugzilla.kernel.org/attachment.cgi?id=256439=edit The patch fixes the bug The patch has been merged into the latest version of the Linux kernel. So

[Bug 188941] Function beiscsi_create_cqs() may return improper value when the call to pci_alloc_consistent() fails, which may result in use-after-free

2017-05-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=188941 bianpan (bianpan2...@ruc.edu.cn) changed: What|Removed |Added Status|NEW |RESOLVED

[PATCH] scsi: libfc: fix incorrect variable assingment

2017-05-11 Thread Gustavo A. R. Silva
Previous assignment was causing the use of the uninitialized variable _explan_ inside fc_seq_ls_rjt() function, which in this particular case is being called by fc_seq_els_rsp_send(). Addresses-Coverity-ID: 1398125 Signed-off-by: Gustavo A. R. Silva ---

Re: [PATCH] target: remove dead code

2017-05-11 Thread Tyrel Datwyler
On 05/09/2017 02:46 PM, Gustavo A. R. Silva wrote: > Local variable _ret_ is assigned to a constant value and it is never > updated again. Remove this variable and the dead code it guards. > > Addresses-Coverity-ID: 140761 > Signed-off-by: Gustavo A. R. Silva > ---

[GIT PULL] target updates for v4.12-rc1

2017-05-11 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending updates for v4.12-rc1. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next Things where alot more calm than previously expected. It's primarily fixes in various areas, with most of the new

[PATCH] target: Re-add check to reject control WRITEs with overflow data

2017-05-11 Thread Nicholas A. Bellinger
From: Nicholas Bellinger During v4.3 when the overflow/underflow check was relaxed by commit c72c525022: commit c72c5250224d475614a00c1d7e54a67f77cd3410 Author: Roland Dreier Date: Wed Jul 22 15:08:18 2015 -0700 target: allow

Re: [PATCH v1 1/4] scsi: ufs: Add ioctl() interface with Query Request

2017-05-11 Thread Christoph Hellwig
NAK for new SCSI LLDD ioctl handlers, we're not in the 90s anymore.

Re: [PATCH v1 3/4] scsi: ufs: Expose Task Management to ioctl() UAPI

2017-05-11 Thread Christoph Hellwig
On Thu, May 11, 2017 at 04:01:48PM +0200, Michal Potomski wrote: > From: Michał Potomski > > Since we already have UFS ioctl() API some additional tools > like task management are "nice-to-have" for testing and management > purposes. No way you're going to bypass the

Re: [PATCH v1] ibmvscsis: Fix cleaning up pointers

2017-05-11 Thread Nicholas A. Bellinger
On Thu, 2017-05-11 at 10:40 -0500, Bryant G. Ly wrote: > On 5/9/17 10:45 PM, Nicholas A. Bellinger wrote: > > > On Tue, 2017-05-09 at 11:50 -0500, Bryant G. Ly wrote: > >> This patch is dependent on: > >> 'commit 25e78531268e ("ibmvscsis: Do not send aborted task response")' > >> This patch

Re: [PATCH v4] sd: Ignore sync cache failures when not supported

2017-05-11 Thread Ewan D. Milne
On Thu, 2017-05-11 at 14:34 +0200, Thierry Escande wrote: > From: Derek Basehore > > Some external hard drives don't support the sync command even though the > hard drive has write cache enabled. In this case, upon suspend request, > sync cache failures are ignored if the

[PATCH v1 0/4] UFS ioctl UAPI

2017-05-11 Thread Michal Potomski
From: Michał Potomski This patchset introduces UFS ioctl UAPI. It's more readable and flexible than its possible SysFS counterpart. Moreover it will be needed for future features, which will require user setup, but are not satified by SysFS "simple types" rule. We

[PATCH v1 4/4] scsi: ufs: add ioctl interface to read UIC attributes

2017-05-11 Thread Michal Potomski
From: Szymon Mielczarek The interface allows to read both local (Host side) and peer (Device side) UIC attributes using either DME_GET or DME_PEER_GET primitives. The Attribute can be used to determine the current state or the capabilities of the UFS InterConnect

[PATCH v1 1/4] scsi: ufs: Add ioctl() interface with Query Request

2017-05-11 Thread Michal Potomski
From: Michał Potomski Based on unmerged patch: https://patchwork.kernel.org/patch/6435721/ This patch introduces ioctl() API using SCSI ioctl() API for user-space in preparation to wider usage. We came to a conclusion, that ioctl() interface is more convenient and

[PATCH v1 3/4] scsi: ufs: Expose Task Management to ioctl() UAPI

2017-05-11 Thread Michal Potomski
From: Michał Potomski Since we already have UFS ioctl() API some additional tools like task management are "nice-to-have" for testing and management purposes. Using this API we can transparently from user perspective query or abort tasks and reset Logical Units. This

[PATCH v1 2/4] scsi: ufs: Implement Auto-Hibern8 setup

2017-05-11 Thread Michal Potomski
From: Michał Potomski Since Auto-Hibern8 feature has to be enabled by the user proper API has been given via ioctl() by adding it to already existing implementation of UFS ioctl(). We expose this API to user-space, since we don't know in driver, what kind of

Re: [PATCH v1] ibmvscsis: Fix cleaning up pointers

2017-05-11 Thread Bryant G. Ly
On 5/9/17 10:45 PM, Nicholas A. Bellinger wrote: On Tue, 2017-05-09 at 11:50 -0500, Bryant G. Ly wrote: This patch is dependent on: 'commit 25e78531268e ("ibmvscsis: Do not send aborted task response")' This patch cleans up some pointers after usage. Signed-off-by: Bryant G. Ly

Re: [PATCH] target/iscsi: make function target_parse_xcopy_cmd static

2017-05-11 Thread Bart Van Assche
On Thu, 2017-05-11 at 11:16 +0100, Colin King wrote: > From: Colin Ian King > > Making target_parse_xcopy_cmd static fixes sparse warning: > > "warning: symbol 'target_parse_xcopy_cmd' was not declared. Should > it be static?" > > Fixes: 1bd05294519f76

Re: [PATCH] target/iscsi: make function target_parse_xcopy_cmd static

2017-05-11 Thread Colin Ian King
On 11/05/17 14:55, Bart Van Assche wrote: > On Thu, 2017-05-11 at 11:16 +0100, Colin King wrote: >> From: Colin Ian King >> >> Making target_parse_xcopy_cmd static fixes sparse warning: >> >> "warning: symbol 'target_parse_xcopy_cmd' was not declared. Should >> it be

[PATCH v4] sd: Ignore sync cache failures when not supported

2017-05-11 Thread Thierry Escande
From: Derek Basehore Some external hard drives don't support the sync command even though the hard drive has write cache enabled. In this case, upon suspend request, sync cache failures are ignored if the error code in the sense header is ILLEGAL_REQUEST. There's not much

[PATCH] target/iscsi: make function target_parse_xcopy_cmd static

2017-05-11 Thread Colin King
From: Colin Ian King Making target_parse_xcopy_cmd static fixes sparse warning: "warning: symbol 'target_parse_xcopy_cmd' was not declared. Should it be static?" Fixes: 1bd05294519f76 ("target/iscsi: Fix a deadlock between the XCOPY code and session shutdown")

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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(-) >

Re: [PATCH 13/15] lpfc: Fix NVMEI's handling of NVMET's PRLI response attributes

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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 >

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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:

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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

Re: [PATCH v2] ibmvscsis: Fix the incorrect req_lim_delta

2017-05-11 Thread Nicholas A. Bellinger
On Wed, 2017-05-10 at 14:35 -0500, Bryant G. Ly wrote: > 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

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

2017-05-11 Thread Nicholas A. Bellinger
On Thu, 2017-05-11 at 08:26 +0200, h...@lst.de wrote: > On Wed, May 10, 2017 at 09:50:35PM -0700, Nicholas A. Bellinger wrote: > > 1) Expose a block_device or request_queue bit to signal 'real LBPRZ' > > support up to IBLOCK, in order to maintain SCSI target feature > > compatibility. > > No way.

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

2017-05-11 Thread h...@lst.de
On Wed, May 10, 2017 at 09:50:35PM -0700, Nicholas A. Bellinger wrote: > 1) Expose a block_device or request_queue bit to signal 'real LBPRZ' > support up to IBLOCK, in order to maintain SCSI target feature > compatibility. No way. If you want to zero use REQ_OP_WRITE_ZEROES..

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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 > --- >

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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 512 > RQEs

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > More debug messages added for nvme statistics. > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart > --- > drivers/scsi/lpfc/lpfc_attr.c| 24 - >

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:07 PM, James Smart wrote: > 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 > --- >

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

2017-05-11 Thread Hannes Reinecke
On 05/10/2017 09:06 PM, James Smart wrote: > 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