[PATCH 1/1] scsi: ufs: Allowing power mode change

2018-01-23 Thread Asutosh Das
From: Yaniv Gardi Due to M-PHY issues, moving from HS to any other mode or gear or even Hibern8 causes some un-predicted behavior of the device. This patch fixes this issues. Signed-off-by: Yaniv Gardi Signed-off-by: Subhash Jadavani Signed-off-by: Can Guo Signed-off-by: Asutosh Das --- dri

Re: [PATCH v2] scsi: sd: add new match array for cache_type

2018-01-23 Thread weiping zhang
2018-01-23 8:23 GMT+08:00 Martin K. Petersen : > > Hi Weiping, > >> currently, there are four combinations as following: "write through", >> "none", "write back", "write back, no read (daft)" >> >> cache_type can control both write and read cache, but for "write >> through" and "write back" we can

[PATCH v3] scsi: sd: add new match array for cache_type

2018-01-23 Thread weiping zhang
add user friendly command strings sd_wr_cache to enable/disable write&read cache. user can enable both write and read cache by one of the following commands: echo w1r1 > cache_type echo "write back" > cache_type sd_wr_cache[] = {"w0r1", "w0r0", "w1r1", "w1r0"}; for sd_wr_cache 0 means disable, 1

Reply

2018-01-23 Thread Andrew
Dear Sir, I am Andrew Wetkas.Personal Assistant to a former Governor in Nigeria. We need your assistance to invest a huge sum in your country. I will give you further details once I hear from you. Regards Andrew

[PATCH V3] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Ming Lei
This status is returned from driver to block layer if device related resource is run out of, but driver can guarantee that IO dispatch will be triggered in future when the resource is available. This patch converts some drivers to use this return value. Meantime if driver returns BLK_STS_RESOURCE

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Bart Van Assche
On 01/22/18 16:57, Ming Lei wrote: Even though RCU lock is held during dispatch, preemption or interrupt can happen too, so it is simply wrong to depend on the timing to make sure __blk_mq_run_hw_queue() can see the request in this situation. It is very unlikely that this race will ever be hi

Re: [PATCH V3] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Mike Snitzer
On Tue, Jan 23 2018 at 11:16am -0500, Ming Lei wrote: > This status is returned from driver to block layer if device related > resource is run out of, but driver can guarantee that IO dispatch will > be triggered in future when the resource is available. > > This patch converts some drivers to u

Re: [PATCH V3] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Bart Van Assche
On Wed, 2018-01-24 at 00:16 +0800, Ming Lei wrote: > @@ -1280,10 +1282,18 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, > struct list_head *list, >* - Some but not all block drivers stop a queue before >* returning BLK_STS_RESOURCE. Two exceptions are s

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Ming Lei
On Tue, Jan 23, 2018 at 08:17:02AM -0800, Bart Van Assche wrote: > > > On 01/22/18 16:57, Ming Lei wrote: > > Even though RCU lock is held during dispatch, preemption or interrupt > > can happen too, so it is simply wrong to depend on the timing to make > > sure __blk_mq_run_hw_queue() can see th

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Bart Van Assche
On 01/23/18 08:26, Ming Lei wrote: On Tue, Jan 23, 2018 at 08:17:02AM -0800, Bart Van Assche wrote: On 01/22/18 16:57, Ming Lei wrote: Even though RCU lock is held during dispatch, preemption or interrupt can happen too, so it is simply wrong to depend on the timing to make sure __blk_mq_run_hw

Re: [PATCH V3] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Ming Lei
On Tue, Jan 23, 2018 at 04:24:20PM +, Bart Van Assche wrote: > On Wed, 2018-01-24 at 00:16 +0800, Ming Lei wrote: > > @@ -1280,10 +1282,18 @@ bool blk_mq_dispatch_rq_list(struct request_queue > > *q, struct list_head *list, > > * - Some but not all block drivers stop a queue befor

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Ming Lei
On Tue, Jan 23, 2018 at 08:37:26AM -0800, Bart Van Assche wrote: > On 01/23/18 08:26, Ming Lei wrote: > > On Tue, Jan 23, 2018 at 08:17:02AM -0800, Bart Van Assche wrote: > > > On 01/22/18 16:57, Ming Lei wrote: > > > > Even though RCU lock is held during dispatch, preemption or interrupt > > > > c

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Bart Van Assche
On Wed, 2018-01-24 at 00:41 +0800, Ming Lei wrote: > Could you explain where to call call_rcu()? call_rcu() can't be used in > IO path at all. Can you explain what makes you think that call_rcu() can't be used in the I/O path? As you know call_rcu() invokes a function asynchronously. From Documen

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Ming Lei
On Tue, Jan 23, 2018 at 04:47:11PM +, Bart Van Assche wrote: > On Wed, 2018-01-24 at 00:41 +0800, Ming Lei wrote: > > Could you explain where to call call_rcu()? call_rcu() can't be used in > > IO path at all. > > Can you explain what makes you think that call_rcu() can't be used in the > I/O

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Bart Van Assche
On Wed, 2018-01-24 at 00:49 +0800, Ming Lei wrote: > On Tue, Jan 23, 2018 at 04:47:11PM +, Bart Van Assche wrote: > > On Wed, 2018-01-24 at 00:41 +0800, Ming Lei wrote: > > > Could you explain where to call call_rcu()? call_rcu() can't be used in > > > IO path at all. > > > > Can you explain

Re: [PATCH V3] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Bart Van Assche
On Wed, 2018-01-24 at 00:37 +0800, Ming Lei wrote: > On Tue, Jan 23, 2018 at 04:24:20PM +, Bart Van Assche wrote: > > My opinion about this patch is as follows: > > * Changing a blk_mq_delay_run_hw_queue() call followed by return > > BLK_STS_DEV_RESOURCE into return BLK_STS_RESOURCE is wrong

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Ming Lei
On Tue, Jan 23, 2018 at 04:54:02PM +, Bart Van Assche wrote: > On Wed, 2018-01-24 at 00:49 +0800, Ming Lei wrote: > > On Tue, Jan 23, 2018 at 04:47:11PM +, Bart Van Assche wrote: > > > On Wed, 2018-01-24 at 00:41 +0800, Ming Lei wrote: > > > > Could you explain where to call call_rcu()? ca

[PATCH] qla2xxx: Fix memory corruption during hba reset test

2018-01-23 Thread Himanshu Madhani
From: Quinn Tran This patch fixes memory corrpution while performing HBA Reset test. Following stack trace is seen [ 466.397219] BUG: unable to handle kernel NULL pointer dereference at 0020 [ 466.433669] IP: [] qlt_free_session_done+0x260/0x5f0 [qla2xxx] [ 466.467731] PGD 0 [

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Bart Van Assche
On Wed, 2018-01-24 at 00:59 +0800, Ming Lei wrote: > How is that enough to fix the IO hang when driver returns STS_RESOURCE > and the queue is idle? If you want to follow previous dm-rq's way of > call blk_mq_delay_run_hw_queue() in .queue_rq(), the same trick need > to be applied to other drivers

[PATCH] Remove init_rcu_head() and destroy_rcu_head() calls

2018-01-23 Thread Bart Van Assche
According to Documentation/RCU/Design/Requirements/Requirements.html calling these functions is not necessary for dynamically allocated objects: The corresponding rcu_head structures that are dynamically allocated are automatically tracked, but rcu_head structures allocated

[PATCH] scsi_dh: Document alua_rtpg_queue() arguments

2018-01-23 Thread Bart Van Assche
Since commit 3a025e1d1c2e ("Add optional check for bad kernel-doc comments") building with W=1 causes warnings to appear for issues in kernel-doc headers. This patch avoids that the following warnings are reported when building with W=1: drivers/scsi/device_handler/scsi_dh_alua.c:867: warning: No

[PATCH 3/6] qla2xxx: Remove unused symbols

2018-01-23 Thread Bart Van Assche
Remove a few preprocessor macros that are not used anywhere. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_nx2.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_nx2.h b/drivers/scsi/qla2xxx/qla_nx2.h index 83c1b7e17c80..8ba7c1db

[PATCH 4/6] qla4xxx: Remove unused symbols

2018-01-23 Thread Bart Van Assche
Remove a few preprocessor macros that are not used anywhere. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani --- drivers/scsi/qla4xxx/ql4_nx.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_nx.h b/drivers/scsi/qla4xxx/ql4_nx.h index 337d9fcf6417..2c098cf9a1

[PATCH 0/6] Six qla2xxx and qla4xxx patches

2018-01-23 Thread Bart Van Assche
Hello Martin, The patches in this series are what I came up with after having analyzed the source code of the qla[24]xxx drivers with several source code analysis tools (scripts/kernel-doc, gcc, sparse and smatch). None of the patches in this series have been tested. Yet I'm asking you to consider

[PATCH 2/6] qla2xxx: Use %p for printing pointers

2018-01-23 Thread Bart Van Assche
Using %p instead of %lx to print a pointer allows to remove a cast. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c i

[PATCH 6/6] qla2xxx: Fix function argument descriptions

2018-01-23 Thread Bart Van Assche
Bring the kernel-doc headers in sync with the function argument lists. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.c| 4 +- drivers/scsi/qla2xxx/qla_gs.c | 78 +++ drivers/scsi/qla2xxx/qla_init.c | 33 ++

[PATCH 5/6] qla4xxx: Move an array from a .h into a .c file

2018-01-23 Thread Bart Van Assche
This patch does not change any functionality but slightly reduces the size of the compiled kernel module. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani --- drivers/scsi/qla4xxx/ql4_nx.c | 2 ++ drivers/scsi/qla4xxx/ql4_nx.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --

[PATCH 1/6] qla2xxx: Fix a locking imbalance in qlt_24xx_handle_els()

2018-01-23 Thread Bart Van Assche
Ensure that upon return the tgt->ha->tgt.sess_lock spin lock is unlocked no matter which code path is taken through this function. This was detected by sparse. Fixes: 82abdcaf3ede ("scsi: qla2xxx: Allow target mode to accept PRLI in dual mode") Signed-off-by: Bart Van Assche Cc: Himanshu Madhani

[PATCH] scsi_debug: Use scsi-mq if it has been enabled

2018-01-23 Thread Bart Van Assche
Since we want to remove the single queue code from the SCSI core at the appropriate time and since scsi-mq performs better than scsi-sq even when using only a single hardware queue, use scsi-mq if it has been enabled. Signed-off-by: Bart Van Assche Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Ch

[PATCH] ibmvfc: fix misdefined reserved field in ibmvfc_fcp_rsp_info

2018-01-23 Thread Tyrel Datwyler
The fcp_rsp_info structure as defined in the FC spec has an initial 3 bytes reserved field. The ibmvfc driver mistakenly defined this field as 4 bytes resulting in the rsp_code field being defined in what should be the start of the second reserved field and thus always being reported as zero by the

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Ming Lei
On Tue, Jan 23, 2018 at 10:01:37PM +, Bart Van Assche wrote: > On Wed, 2018-01-24 at 00:59 +0800, Ming Lei wrote: > > How is that enough to fix the IO hang when driver returns STS_RESOURCE > > and the queue is idle? If you want to follow previous dm-rq's way of > > call blk_mq_delay_run_hw_queu

Re: [PATCH V3] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-23 Thread Ming Lei
On Tue, Jan 23, 2018 at 04:57:34PM +, Bart Van Assche wrote: > On Wed, 2018-01-24 at 00:37 +0800, Ming Lei wrote: > > On Tue, Jan 23, 2018 at 04:24:20PM +, Bart Van Assche wrote: > > > My opinion about this patch is as follows: > > > * Changing a blk_mq_delay_run_hw_queue() call followed by

[PATCH 1/1] scsi: ufs: Enable quirk to ignore sending WRITE_SAME command

2018-01-23 Thread Asutosh Das
From: Sujit Reddy Thumma WRITE_SAME command is not supported by UFS. Enable a quirk for the upper level drivers to not send WRITE SAME command. Signed-off-by: Sujit Reddy Thumma Signed-off-by: Subhash Jadavani Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 3 +++ 1 file changed,

Re: [PATCH 4/6] mpt3sas: Introduce Base function for cloning.

2018-01-23 Thread Suganath Prabu Subramani
Hi All, We tried to reproduce below error "drivers/scsi/mpt3sas/mpt3sas_base.c:315:10: error: implicit declaration of function 'mpt3sas_scsih_scsi_lookup_get'; did you mean scmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid);" with base code and Make file flags (sparse) as mentioned under reprodu

Re: [PATCH] scsi_debug: Use scsi-mq if it has been enabled

2018-01-23 Thread Douglas Gilbert
On 2018-01-23 07:39 PM, Bart Van Assche wrote: Since we want to remove the single queue code from the SCSI core at the appropriate time and since scsi-mq performs better than scsi-sq even when using only a single hardware queue, use scsi-mq if it has been enabled. Signed-off-by: Bart Van Assche

Re: [PATCH target-pending] iscsi-target: make sure to wake up sleeping login worker

2018-01-23 Thread Nicholas A. Bellinger
Hey Florian & Co, On Fri, 2018-01-19 at 18:26 +0100, Florian Westphal wrote: > Eric Dumazet wrote: > > On Fri, 2018-01-19 at 14:36 +0100, Florian Westphal wrote: > > > diff --git a/drivers/target/iscsi/iscsi_target_nego.c > > > b/drivers/target/iscsi/iscsi_target_nego.c > > > index b686e2ce9c0e.

Re: [PATCH] scsi_dh: Document alua_rtpg_queue() arguments

2018-01-23 Thread Hannes Reinecke
On 01/24/2018 12:50 AM, Bart Van Assche wrote: > Since commit 3a025e1d1c2e ("Add optional check for bad kernel-doc > comments") building with W=1 causes warnings to appear for issues > in kernel-doc headers. This patch avoids that the following warnings > are reported when building with W=1: > > d

Re: [PATCH] scsi_dh: Document alua_rtpg_queue() arguments

2018-01-23 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn