[PATCH] scsi: ufs: Clean up some rpm/spm level SysFS nodes upon remove

2017-05-11 Thread Michal Potomski
From: Michał Potomski When reloading module these two attributes aren't cleaned up properly and they persist causing warnings when trying to load module again. Additionally they are not recreated properly due to that. Signed-off-by: Michał Potomski --- drivers/scsi/ufs/ufshcd.c | 7 +++ 1

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. Appli

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 > request

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! -- Mar

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 Resol

[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 Resol

[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&action=edit The patch fixes the bug The patch has been merged into the latest version of the Linux kerne

[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&action=edit The patch fixes the bug The patch has been merged into the latest version of the Linux kerne

[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 Resol

[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 --- drivers/scsi/libfc/fc_rport.c | 2 +- 1 fi

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 > --- Reviewed-by: Tyrel Datwyler

[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 function

[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 underflow/overflow for PR OUT etc. commands to 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 SCSI midlayer for task manag

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 cleans

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 error code in the sense

[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 have discussed and monitored UF

[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 Layer (UIC - UniPro & M-PHY). Si

[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 readable for features, that we'

[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 will help to test all hosts

[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 additional Power Management rules use

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 Reviewed-by: M

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 ("target/iscsi: Fix a deadlock between th

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 static?" >> >> Fixes: 1bd0529

[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 we can do for these driv

[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") Signed-off-by: Colin Ian King -

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(-) > > diff --git a/drivers/scsi/lpfc/lpfc_version.h > b/d

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 > --- > drivers/scsi/lpfc/lpfc.h

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 > wer

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 h

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: James Smart > --- > drive

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 > --- > drivers/scsi/lpfc/lpfc.h |

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 wha