Re: [PATCH 6/6] scsi: ufs: just use sizeof() for snprintf()

2017-03-28 Thread Subhash Jadavani
On 2017-03-28 06:49, kusumi.tomoh...@gmail.com wrote: From: Tomohiro Kusumi Not much reason to use ARRAY_SIZE() when we know it's for a C string. Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH 5/6] scsi: ufs: remove deprecated enum for hw interrupt

2017-03-28 Thread Subhash Jadavani
On 2017-03-28 06:49, kusumi.tomoh...@gmail.com wrote: From: Tomohiro Kusumi These flags are no longer needed after 2fbd009b in 2013. Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 7 --- 1 file changed, 7 deletions(-) diff --git

Re: [PATCH 4/6] scsi: ufs: add missing macros for register bits from UFSHCI spec

2017-03-28 Thread Subhash Jadavani
On 2017-03-28 06:49, kusumi.tomoh...@gmail.com wrote: From: Tomohiro Kusumi Add macros for register bits that can be found in JESD223C (v2.1). Not all registers are defined in ufshci.h (i.e. some are unused whether macros are defined or undefined), but all the bits for

Re: [PATCH 3/6] scsi: ufs: non functional macro fix

2017-03-28 Thread Subhash Jadavani
On 2017-03-28 06:49, kusumi.tomoh...@gmail.com wrote: From: Tomohiro Kusumi Not having () isn't likely to do any harm in this case, but all the other macros below do have it. Also add "are" in a comment. Signed-off-by: Tomohiro Kusumi ---

Re: [PATCH 2/6] scsi: ufs: use existing macro CONTROLLER_ENABLE to test register bit

2017-03-28 Thread Subhash Jadavani
On 2017-03-28 06:49, kusumi.tomoh...@gmail.com wrote: From: Tomohiro Kusumi (Note this commit directly goes on top of the previous one) Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [PATCH 1/6] scsi: ufs: make ufshcd_is_{device_present,hba_active}() return bool

2017-03-28 Thread Subhash Jadavani
On 2017-03-28 06:49, kusumi.tomoh...@gmail.com wrote: From: Tomohiro Kusumi ufshcd driver generally uses bool for is_xxx type things instead of int, so conform to its style. Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 12

Re: [PATCH] Revert "scsi: ufs: add queries retry mechanism"

2017-03-28 Thread Subhash Jadavani
On 2017-03-28 01:11, szy...@codeaurora.org wrote: From: Szymon Mielczarek This reverts commit 61e073590b82a539654626ecae91b8fab11db3f3. The patch introduced redundant query retries as we already had such mechanism provided with _retry functions. Both

[REGRESSION] v4.11-rc3: lpfc: panic during module removal / shutdown

2017-03-28 Thread Junichi Nomura
Since commit 895427bd012c ("scsi: lpfc: NVME Initiator: Base modifications"), "rmmod lpfc" starting to cause panic or corruption due to double free. The double-free occurs as followings: - During initialization, lpfc_create_wq_cq() binds cq and wq to the same ring in the way that both

Re: [PATCH v2] libsas: fix "sysfs group not found" warnings at port teardown time

2017-03-28 Thread Tejun Heo
Hello, On Fri, Mar 24, 2017 at 05:53:54PM +0100, Johannes Thumshirn wrote: > [ +Cc Tejun ] > > On Fri, Mar 24, 2017 at 11:44:55AM +, John Garry wrote: > > To be clear, was this the same test with isci which you initially reported? > > Yes, just echo into the PCI device's sysfs remove file

[PATCH 1/2] hpsa: update pci ids

2017-03-28 Thread Don Brace
Reviewed-by: Gerry Morong Reviewed-by: Scott Teel Signed-off-by: Don Brace --- drivers/scsi/hpsa.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index

[PATCH 0/2] hpsa updates

2017-03-28 Thread Don Brace
These patches are based on Linus's tree - add some PCI IDs - update the driver version --- Don Brace (2): hpsa: update pci ids hpsa: change driver version drivers/scsi/hpsa.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- Signature

[PATCH 2/2] hpsa: change driver version

2017-03-28 Thread Don Brace
Reviewed-by: Gerry Morong Reviewed-by: Scott Teel Signed-off-by: Don Brace --- drivers/scsi/hpsa.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c

Re: [PATCH 03/23] sd: implement REQ_OP_WRITE_ZEROES

2017-03-28 Thread Mike Snitzer
On Tue, Mar 28 2017 at 2:50pm -0400, Bart Van Assche wrote: > On Thu, 2017-03-23 at 10:33 -0400, Christoph Hellwig wrote: > > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > > index af632e350ab4..b6f70a09a301 100644 > > --- a/drivers/scsi/sd.c > > +++

Re: [PATCH 03/23] sd: implement REQ_OP_WRITE_ZEROES

2017-03-28 Thread Bart Van Assche
On Thu, 2017-03-23 at 10:33 -0400, Christoph Hellwig wrote: > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > index af632e350ab4..b6f70a09a301 100644 > --- a/drivers/scsi/sd.c > +++ b/drivers/scsi/sd.c > @@ -748,7 +748,7 @@ static int sd_setup_unmap_cmnd(struct scsi_cmnd *cmd) > return

Re: [PATCHv5 2/2] tcmu: Fix wrongly calculating of the base_command_size

2017-03-28 Thread Mike Christie
On 03/27/2017 04:07 AM, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > The t_data_nents and t_bidi_data_nents are the numbers of the > segments, but it couldn't be sure the block size equals to size > of the segment. > > For the worst case, all the blocks

Re: [PATCH 23/23] block: remove the discard_zeroes_data flag

2017-03-28 Thread Bart Van Assche
On Thu, 2017-03-23 at 10:33 -0400, Christoph Hellwig wrote: > Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we can > kill this hack. > > [ ... ] > > diff --git a/Documentation/ABI/testing/sysfs-block > b/Documentation/ABI/testing/sysfs-block > index

Re: [PATCH 11/23] block_dev: use blkdev_issue_zerout for hole punches

2017-03-28 Thread Bart Van Assche
On Thu, 2017-03-23 at 10:33 -0400, Christoph Hellwig wrote: > This gets us support for non-discard efficient write of zeroes (e.g. NVMe) > and preparse for removing the discard_zeroes_data flag. Hello Christoph, "preparse" probably should have been "prepare"? Thanks, Bart.

Re: [PATCH] scsi: hisi_sas: fix SATA dependency

2017-03-28 Thread John Garry
On 28/03/2017 15:22, Arnd Bergmann wrote: Removing the 'select SCSI_SAS_LIBSAS' statement in Kconfig resulted in a link failure in configurations that have hisi_sas built-in but libsas as a loadable module: drivers/scsi/built-in.o: In function `hisi_sas_scan_finished':

Re: [PATCH 12/23] sd: handle REQ_UNMAP

2017-03-28 Thread Bart Van Assche
On Thu, 2017-03-23 at 10:33 -0400, Christoph Hellwig wrote: > Try to use a write same with unmap bit variant if the device supports it > and the caller asks for it. > > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/sd.c | 10 ++ > 1 file changed, 10 insertions(+) >

Re: [PATCH 01/23] block: renumber REQ_OP_WRITE_ZEROES

2017-03-28 Thread Bart Van Assche
On Thu, 2017-03-23 at 10:33 -0400, Christoph Hellwig wrote: > Make life easy for implementations that needs to send a data buffer > to the device (e.g. SCSI) by numbering it as a data out command. > > Signed-off-by: Christoph Hellwig > --- > include/linux/blk_types.h | 2 +- > 1

Re: [REGRESSION][Stable][v3.12.y][v4.4.y][v4.9.y][v4.10.y][v4.11-rc1] scsi: storvsc: properly set residual data length on errors

2017-03-28 Thread Joseph Salisbury
On 03/27/2017 06:14 PM, Stephen Hemminger wrote: > Are you sure the real problem is not the one fixed by this commit? > > commit f1c635b439a5c01776fe3a25b1e2dc546ea82e6f > Author: Stephen Hemminger > Date: Tue Mar 7 09:15:53 2017 -0800 > > scsi: storvsc:

[PATCH] scsi: hisi_sas: fix SATA dependency

2017-03-28 Thread Arnd Bergmann
Removing the 'select SCSI_SAS_LIBSAS' statement in Kconfig resulted in a link failure in configurations that have hisi_sas built-in but libsas as a loadable module: drivers/scsi/built-in.o: In function `hisi_sas_scan_finished': hisi_sas_main.c:(.text+0x37ce9): undefined reference to

Re: [PATCH 1/7] ѕd: split sd_setup_discard_cmnd

2017-03-28 Thread ax...@kernel.dk
On Mon, Mar 27 2017, Bart Van Assche wrote: > On Mon, 2017-03-20 at 16:43 -0400, Christoph Hellwig wrote: > > + u64 sector = blk_rq_pos(rq) >> (ilog2(sdp->sector_size) - 9); > > + u32 nr_sectors = blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9); > > Although I know this is an issue in the

[PATCH 1/6] scsi: ufs: make ufshcd_is_{device_present,hba_active}() return bool

2017-03-28 Thread kusumi . tomohiro
From: Tomohiro Kusumi ufshcd driver generally uses bool for is_xxx type things instead of int, so conform to its style. Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[PATCH 3/6] scsi: ufs: non functional macro fix

2017-03-28 Thread kusumi . tomohiro
From: Tomohiro Kusumi Not having () isn't likely to do any harm in this case, but all the other macros below do have it. Also add "are" in a comment. Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 8 1 file changed, 4

[PATCH 5/6] scsi: ufs: remove deprecated enum for hw interrupt

2017-03-28 Thread kusumi . tomohiro
From: Tomohiro Kusumi These flags are no longer needed after 2fbd009b in 2013. Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c

[PATCH 6/6] scsi: ufs: just use sizeof() for snprintf()

2017-03-28 Thread kusumi . tomohiro
From: Tomohiro Kusumi Not much reason to use ARRAY_SIZE() when we know it's for a C string. Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c

[PATCH 4/6] scsi: ufs: add missing macros for register bits from UFSHCI spec

2017-03-28 Thread kusumi . tomohiro
From: Tomohiro Kusumi Add macros for register bits that can be found in JESD223C (v2.1). Not all registers are defined in ufshci.h (i.e. some are unused whether macros are defined or undefined), but all the bits for those registers that are already defined should appear

[PATCH 2/6] scsi: ufs: use existing macro CONTROLLER_ENABLE to test register bit

2017-03-28 Thread kusumi . tomohiro
From: Tomohiro Kusumi (Note this commit directly goes on top of the previous one) Signed-off-by: Tomohiro Kusumi --- drivers/scsi/ufs/ufshcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c

Re: [PATCH] scsi: hisi_sas: add missing break in switch statement

2017-03-28 Thread John Garry
On 28/03/2017 12:12, Colin King wrote: From: Colin Ian King It appears that a break in the TRANS_TX_OPEN_CNX_ERR_NO_DESTINATION case got accidentally removed in an earlier commit, as it stands, the ts->stat and ts->open_rej_reason are being updated twice for this case

[PATCH] scsi: hisi_sas: add missing break in switch statement

2017-03-28 Thread Colin King
From: Colin Ian King It appears that a break in the TRANS_TX_OPEN_CNX_ERR_NO_DESTINATION case got accidentally removed in an earlier commit, as it stands, the ts->stat and ts->open_rej_reason are being updated twice for this case which looks incorrect. Fix this by

Re: [PATCH] enclosure: fix sysfs symlinks creation when using multipath

2017-03-28 Thread Maurizio Lombardi
Dne 21.3.2017 v 10:58 Maurizio Lombardi napsal(a): > I will ask our customer to test your patch, > there is only a small problem: you can't set cdev->dev = NULL > and then call enclosure_add_links(cdev) because you will end up dereferencing > a NULL pointer. > I suggest a slightly different

Re: [PATCH v2] sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable

2017-03-28 Thread kbuild test robot
-if-opt_xfer_blocks-is-unusable/20170328-141853 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next config: x86_64-randconfig-x016-201713 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree