Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-27 Thread Hannes Reinecke
On 08/27/2015 08:16 PM, mho...@kernel.org wrote: > From: Michal Hocko > > b9d5c6b7ef57 ("[SCSI] cleanup setting task state in > scsi_error_handler()") has introduced a race between scsi_error_handler > and scsi_host_dev_release resulting in the hang when the device goes > away because scsi_error_

Re: [PATCH scsi] mpt3sas: mpt3sas_base_unmap_resources can be static

2015-08-27 Thread Sreekanth Reddy
Hi, Please consider this patch as Ack-by: Sreekanth Reddy Thanks, Sreekanth On Fri, Aug 28, 2015 at 6:50 AM, kbuild test robot wrote: > > Signed-off-by: Fengguang Wu > --- > mpt3sas_base.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/mpt3sas/mpt3sa

[scsi:misc 97/113] drivers/scsi/mpt3sas/mpt3sas_scsih.c:5013:27: sparse: restricted __le16 degrades to integer

2015-08-27 Thread kbuild test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc head: b9e8a16466e62d46c0b8551fb807173d6a9c529f commit: e6d45e3e7e6582fa206ef84631639ce70d50e5c5 [97/113] mpt3sas: Provides the physical location of sas drives reproduce: # apt-get install sparse git checkout e6d45e3e7e6

[scsi:misc 95/113] drivers/scsi/mpt3sas/mpt3sas_base.c:1820:1: sparse: symbol 'mpt3sas_base_unmap_resources' was not declared. Should it be static?

2015-08-27 Thread kbuild test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc head: b9e8a16466e62d46c0b8551fb807173d6a9c529f commit: 580d4e3153f0d7a9a9235b675b0b7b13e2185a8b [95/113] mpt3sas: Remove redundancy code while freeing the controller resources. reproduce: # apt-get install sparse git ch

[PATCH scsi] mpt3sas: mpt3sas_base_unmap_resources can be static

2015-08-27 Thread kbuild test robot
Signed-off-by: Fengguang Wu --- mpt3sas_base.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 7e8ede2..6ee54dd 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3

Re: [scsi 5/7 RESEND] scsi_debug: schedule_resp fix input variable check

2015-08-27 Thread Ewan Milne
On Wed, 2015-08-26 at 16:38 -0700, James Bottomley wrote: > On Tue, 2015-08-25 at 21:03 +, Winkler, Tomas wrote: > > > > > > + /* this should never happen */ > > > > + if (WARN_ON(!cmnd)) > > > > + return SCSI_MLQUEUE_HOST_BUSY; > > > > > > > > - if (NULL == cmn

Re: [PATCH 2/2] ipr: Enable SIS pipe commands for SIS-32 devices.

2015-08-27 Thread Wendy Xiong
Gabriel Krisman Bertazi linux.vnet.ibm.com> writes: > > Remove unnecessary check that disabled SIS pipe commands for SIS-32 > devices. This change was sufficient to enable raw mode and send SIS > pipe commands for a 57B3 device. > Reviewed-by: Wen Xiong Thanks, Wendy -- To unsubscribe f

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-27 Thread Nicholas A. Bellinger
On Thu, 2015-08-27 at 07:40 -0700, James Bottomley wrote: > On Thu, 2015-08-27 at 10:37 +0530, Sreekanth Reddy wrote: > > HI Nicholas & Calvin, > > > > Thanks for the patchset. Sure We will review and we do some unit > > testing on this patch series. Currently my bandwidth is occupied with > > som

Re: [PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-27 Thread Dan Williams
On Thu, Aug 27, 2015 at 11:16 AM, wrote: > From: Michal Hocko > > b9d5c6b7ef57 ("[SCSI] cleanup setting task state in > scsi_error_handler()") has introduced a race between scsi_error_handler > and scsi_host_dev_release resulting in the hang when the device goes > away because scsi_error_handler

[PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-27 Thread mhocko
From: Michal Hocko b9d5c6b7ef57 ("[SCSI] cleanup setting task state in scsi_error_handler()") has introduced a race between scsi_error_handler and scsi_host_dev_release resulting in the hang when the device goes away because scsi_error_handler might miss a wake up: CPU0

Re: [PATCH v3 6/8] scsi: ufs: make the UFS variant a platform device

2015-08-27 Thread Rob Herring
On Sun, Aug 23, 2015 at 8:09 AM, Yaniv Gardi wrote: > This change turns the UFS variant (SCSI_UFS_QCOM) into a UFS > a platform device. > In order to do so a few additional changes are required: > 1. The ufshcd-pltfrm is no longer serves as a platform device. >Now it only serves as a group of

Re: [PATCH v1 14/15] scsi: ufs: commit descriptors before setting the doorbell

2015-08-27 Thread Rob Herring
On Thu, Aug 27, 2015 at 7:11 AM, wrote: >> On Tue, Aug 25, 2015 at 7:36 AM, wrote: On Aug 21, 2015 3:10 PM, "Yaniv Gardi" wrote: > > Add a write memory barrier to make sure descriptors prepared are > actually > written to memory before ringing the doorbell. We have also ad

Re: [PATCH v1 14/15] scsi: ufs: commit descriptors before setting the doorbell

2015-08-27 Thread Rob Herring
On Thu, Aug 27, 2015 at 7:28 AM, wrote: >>> On Aug 21, 2015 3:10 PM, "Yaniv Gardi" wrote: Add a write memory barrier to make sure descriptors prepared are actually written to memory before ringing the doorbell. We have also added the write memory barrier after ringing th

Re: [PATCH V7 1/9] [SCSI] aacraid: Fix for logical device name and UID not exposed to the OS

2015-08-27 Thread James Bottomley
On Thu, 2015-08-27 at 06:50 -0400, Mahesh Rajashekhara wrote: > Description: > Driver sends the right size of the response buffer. > > Changes from V2: > None > > Reviewed By: Tomas Henzl , Murthy Bhat > , Karthikeya Sunkesula > > Signed-off-by: Mahesh Rajashekhara You've had hundreds

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-27 Thread Sreekanth Reddy
Ok James, by 9/4/2015 we will provide our feedback over this patch series. Thanks, Sreekanth On Thu, Aug 27, 2015 at 8:10 PM, James Bottomley wrote: > On Thu, 2015-08-27 at 10:37 +0530, Sreekanth Reddy wrote: >> HI Nicholas & Calvin, >> >> Thanks for the patchset. Sure We will review and we do

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-27 Thread James Bottomley
On Thu, 2015-08-27 at 10:37 +0530, Sreekanth Reddy wrote: > HI Nicholas & Calvin, > > Thanks for the patchset. Sure We will review and we do some unit > testing on this patch series. Currently my bandwidth is occupied with > some internal activity, so by end of next week I will acknowledge this >

Re: [PATCH] scsi_debug: fix failure to probe with scsi_level=1 or 2 due to NULL devip

2015-08-27 Thread Douglas Gilbert
On 15-08-25 03:47 PM, Ewan D. Milne wrote: From: "Ewan D. Milne" commit cbf67842c3d9 ("scsi_debug: support scsi-mq, queues and locks") added a test for devip == NULL in schedule_resp which returned SCSI_MLQUEUE_HOST_BUSY. Unfortunately, if scsi_level 1 or 2 is specified, devip will be NULL for

[PATCH 03/23] scsi_dh_alua: improved logging

2015-08-27 Thread Hannes Reinecke
Issue different logging messages if ALUA is not supported or the TPGS setting is invalid. Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/devi

[PATCH 02/23] scsi_dh_alua: Use vpd_pg83 information

2015-08-27 Thread Hannes Reinecke
The SCSI device now has the VPD page 0x83 information attached, so there is no need to query it again. Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 83 +- 1 file changed, 13 insertions(+), 70 deletions

[PATCH 06/23] scsi_dh_alua: fixup description of stpg_endio()

2015-08-27 Thread Hannes Reinecke
Fixup copy-and-paste error in the description of stpg_endio(). Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh

[PATCH v2 00/15] Big fixes, retries, handle a race condition

2015-08-27 Thread Yaniv Gardi
Important: This serie of 15 small patches should be pushed after the series of 8 patches "Fix error message and present UFS variant probe" V2: a few minor changes V1: This serie of 15 small patches should be pushed after the series of 8 patches I have uploaded to the upstream a week ago: "Fix err

[PATCH 01/23] scsi_dh_alua: Disable ALUA handling for non-disk devices

2015-08-27 Thread Hannes Reinecke
Non-disk devices might support ALUA, but the firmware implementation is untested and frequently broken. As we're don't actually need it disable ALUA support for non-disk device for now. Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche --- drivers/scsi/device_handler/scsi_dh_alua.c |

[PATCH 12/23] scsi_dh_alua: switch to scsi_execute_req_flags()

2015-08-27 Thread Hannes Reinecke
All commands are issued synchronously, so no need to open-code scsi_execute_req_flags() anymore. And we can get rid of the static sense code structure element. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 124 - 1 file changed, 34 in

[PATCH v2 02/15] scsi: ufs: clear fields UTRD, UPIU req and rsp before new transfers

2015-08-27 Thread Yaniv Gardi
Some of the data structures (like response UPIU) and/or its elements (unused fields) should be cleared before sending out the respective command to UFS device. This change clears the UPIU response data structure for query commands and NOP command before sending out the command. We also initialize

[PATCH 05/23] scsi_dh_alua: return standard SCSI return codes in submit_rtpg

2015-08-27 Thread Hannes Reinecke
Fixup submit_rtpg() to always return a standard SCSI return code. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 38 +- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drive

[PATCH v2 01/15] scsi: ufs: clear UTRD, UPIU req and rsp before new transfers

2015-08-27 Thread Yaniv Gardi
Clear the UFS data structures before sending new request. The SCSI command is sent to the device within the UFS UPIU request. As part of the transfer UPIU preparation, the SCSI command is copied to the UPIU structure according to the SCSI command size. As different SCSI commands differ in size fro

[PATCH 23/23] scsi_dh_alua: Update version to 2.0

2015-08-27 Thread Hannes Reinecke
Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 3c6b365..5b15936 100644 --- a/drivers/scsi/device_handle

[PATCH 10/23] scsi_dh_alua: Pass buffer as function argument

2015-08-27 Thread Hannes Reinecke
Pass in the buffer as a function argument for submit_rtpg(). Reviewed-by: Bart Van Assche Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_

[PATCH 04/23] scsi_dh_alua: use standard logging functions

2015-08-27 Thread Hannes Reinecke
Use standard logging functions instead of hand-crafted ones. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 34 +- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/sc

[PATCH 16/23] scsi: Add scsi_vpd_lun_id()

2015-08-27 Thread Hannes Reinecke
Add a function scsi_vpd_lun_id() to return a unique device identifcation based on the designation descriptors of VPD page 0x83. As devices might implement several descriptors the order of preference is: - NAA IEE Registered Extended - EUI-64 based 16-byte - EUI-64 based 12-byte - NAA IEEE Register

[PATCH 21/23] scsi_dh_alua: update all port states

2015-08-27 Thread Hannes Reinecke
When we read in the target port group state we should be updating all affected port groups, otherwise we risk running out of sync. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --gi

[PATCH 08/23] scsi_dh_alua: use flag for RTPG extended header

2015-08-27 Thread Hannes Reinecke
We should be using a flag when RTPG extended header is not supported, that saves us sending RTPG twice for older arrays. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 15 +++ 1 file change

[PATCH 07/23] scsi: remove scsi_show_sense_hdr()

2015-08-27 Thread Hannes Reinecke
Last caller is gone, so remove it. Reviewed-by: Bart Van Assche Reviewed-by: Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- include/scsi/scsi_dbg.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h index f8170e9..56710e0 1

[PATCH 11/23] scsi_dh_alua: Make stpg synchronous

2015-08-27 Thread Hannes Reinecke
We should be issuing STPG synchronously as we need to evaluate the return code on failure. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 179 + 1 file changed, 83 insertions(+), 96 deletions(-) diff --git a/drivers/scsi/device_handle

[PATCH 18/23] revert "scsi_dh_alua: ALUA hander attach should succeed while TPG is transitioning"

2015-08-27 Thread Hannes Reinecke
This reverts commit a8e5a2d593cbfccf530c3382c2c328d2edaa7b66 Obsoleted by the next patch. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/device_handler

[PATCH 14/23] scsi_dh_alua: allocate RTPG buffer separately

2015-08-27 Thread Hannes Reinecke
The RTPG buffer will only evaluated within alua_rtpg(), so we can allocate it locally there and avoid having to put it into the global structure. Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 56 +++--- 1 f

[PATCH 13/23] scsi_dh_alua: Use separate alua_port_group structure

2015-08-27 Thread Hannes Reinecke
The port group needs to be a separate structure as several LUNs might belong to the same group. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 211 +++-- 1 file changed, 139 insertions(+), 72 deletions(-) diff --git a/drivers/scsi/device_

[PATCH 15/23] scsi_dh_alua: simplify sense code handling

2015-08-27 Thread Hannes Reinecke
Most sense code is already handled in the generic code, so we shouldn't be adding special cases here. However, when doing so we need to check for unit attention whenever we're sending an internal command. Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/device_hand

[PATCH 20/23] scsi_dh_alua: Recheck state on unit attention

2015-08-27 Thread Hannes Reinecke
When we receive a unit attention code of 'ALUA state changed' we should recheck the state, as it might be due to an implicit ALUA state transition. At the same time a workqueue item might already be queued, which should be started immediately to avoid any delays. Signed-off-by: Hannes Reinecke --

[PATCH v2 03/15] scsi: ufs: verify command tag validity

2015-08-27 Thread Yaniv Gardi
A race condition appear to exist between request completion when scsi_done() is called to end the request and set the tag back to -1 (at blk_queue_end_tag() scsi_end_request), and scsi layer error handling which aborts the command and reuses it to request sense data. Sending the request sense is do

[PATCH 22/23] scsi_dh_alua: Send TEST UNIT READY to poll for transitioning

2015-08-27 Thread Hannes Reinecke
Sending a 'REPORT TARGET PORT GROUP' command is a costly operation, as the array has to gather information about all ports. So instead of using RTPG to poll for a status update when a port is in transitioning we should be sending a TEST UNIT READY, and wait for the sense code to report success. Si

[PATCH 17/23] scsi_dh_alua: use unique device id

2015-08-27 Thread Hannes Reinecke
Use scsi_vpd_lun_id() to assign a unique device identification to the alua port group structure. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 70 +++--- 1 file changed, 65 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/device_h

[PATCH v2 05/15] scsi: ufs: increase fDeviceInit query response timeout

2015-08-27 Thread Yaniv Gardi
fDeviceInit query response time for some devices is too long that default query request timeout of 100ms may not be enough. Experiments show that fDeviceInit response sometimes takes 500ms so to be on safer side this change sets the timeout to 600ms. Without this change, we might unnecessarily have

[PATCH 19/23] scsi_dh_alua: Use workqueue for RTPG

2015-08-27 Thread Hannes Reinecke
The current ALUA device_handler has two drawbacks: - We're sending a 'SET TARGET PORT GROUP' command to every LUN, disregarding the fact that several LUNs might be in a port group and will be automatically switched whenever _any_ LUN within that port group receives the command. - Whenever a L

[PATCH v2 04/15] scsi: ufs: clear outstanding_request bit in case query timeout

2015-08-27 Thread Yaniv Gardi
When sending a query to the device returns with a timeout error, we clear the corresponding bit in the DOORBELL register but we don't clear the outstanding_request field as we should. This patch fixes this bug. Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 22 --

[PATCH v2 10/15] scsi: ufs: fix error recovery after the hibern8 exit failure

2015-08-27 Thread Yaniv Gardi
Hibern8 exit can be called from 3 different context: - ufshcd_hibern8_exit_work - ufshcd_ungate_work - runtime/system resume If hibern8 exit fails for some reason then we try to bring the link to active state by link startup but this recovery mechanism results into deadlock or errors f

[PATCH v2 06/15] scsi: ufs: avoid exception event handler racing with PM callbacks

2015-08-27 Thread Yaniv Gardi
If device raises the exception event in the response to the commands sent during the runtime/system PM callbacks, exception event handler might run in parallel with PM callbacks and may see unclocked register accesses. This change fixes this issue by not scheduling the exception event handler while

[PATCH v2 07/15] scsi: ufs: set REQUEST_SENSE command size to 18 bytes

2015-08-27 Thread Yaniv Gardi
According to UFS device specification REQUEST_SENSE command can only report back up to 18 bytes of data. Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.

[PATCH v2 09/15] scsi: ufs: add retries for hibern8 enter

2015-08-27 Thread Yaniv Gardi
If hibern8 enter command fails then UFS link state may be unknown which may result into timeout of all the commands issued after failure. This change does 2 things (for pre-defined number of retry counts) after hibern8 enter failure: 1. Recovers the UFS link to active state 2. If link is recovered

[PATCH v2 11/15] scsi: ufs: retry failed query flag requests

2015-08-27 Thread Yaniv Gardi
UFS flag query requests may fail sometimes due to timeouts etc. Add a wrapper function to retry up to 10 times in case of such failure, similar to retries being made for attribute queries. Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi --- drivers/scsi/ufs/ufshcd.c | 63 +++

[PATCH v2 12/15] scsi: ufs: reduce the interrupts for power mode change requests

2015-08-27 Thread Yaniv Gardi
DME commands such as Hibern8 enter/exit and gear switch generate 2 completion interrupts, one for confirmation that command is received by local UniPro and 2nd one is the final confirmation after communication with remote UniPro. Currently both of these completions are registered as interrupt event

[PATCH v2 13/15] scsi: ufs: add missing memory barriers

2015-08-27 Thread Yaniv Gardi
Performing several writes to UFS host controller registers has no gurrantee of ordering, so we must make sure register writes to setup request list base address etc. are performed before the run/stop register is enabled. In addition, when setting up a task request, we must make sure the updating of

[PATCH v2 14/15] scsi: ufs: commit descriptors before setting the doorbell

2015-08-27 Thread Yaniv Gardi
Add a write memory barrier to make sure descriptors prepared are actually written to memory before ringing the doorbell. We have also added the write memory barrier after ringing the doorbell register so that controller sees the new request immediately. Signed-off-by: Gilad Broner Signed-off-by:

[PATCH v2 15/15] scsi: ufs: add wrapper for retrying sending query attribute

2015-08-27 Thread Yaniv Gardi
Sometimes queries from the device might return a failure so it is recommended to retry sending the query, before giving up. This change adds a wrapper to retry sending a query attribute, in cases where we need to wait longer, before we continue, or before reporting a failure. Signed-off-by: Yaniv

[PATCH v2 08/15] scsi: ufs: add retries to dme_peer get and set attribute

2015-08-27 Thread Yaniv Gardi
The dme_peer get/set attribute commands are prone to errors, therefore we add three retries for the UIC command sending. Error code returned from ufshcd_send_uic_cmd() is checked, and unless it was successful or the retries have finished, another command will be sent. Signed-off-by: Lee Susman Si

[PATCHv4 00/23] asynchronous ALUA device handler

2015-08-27 Thread Hannes Reinecke
Hi all, here is an update to the ALUA device handler. The main features are: - Topology discovery: the device handler creates a separate port_group structure, which is used to update all paths to the same port group. With that we achieve a significant reduction of the number of RTPGs. - Asy

[PATCH 09/23] scsi_dh_alua: use unaligned access macros

2015-08-27 Thread Hannes Reinecke
Use 'get_unaligned_XX' and 'put_unaligned_XX' instead of open-coding it. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/driver

Re: [PATCH v1 14/15] scsi: ufs: commit descriptors before setting the doorbell

2015-08-27 Thread ygardi
>> On Aug 21, 2015 3:10 PM, "Yaniv Gardi" wrote: >>> >>> Add a write memory barrier to make sure descriptors prepared are >>> actually >>> written to memory before ringing the doorbell. We have also added the >>> write memory barrier after ringing the doorbell register so that >>> controller sees

[PATCH 10/10] scsi_dh: move 'dh_state' sysfs attribute to generic code

2015-08-27 Thread Hannes Reinecke
As scsi_dh.c is now always compiled in we should be moving the 'dh_state' attribute to the generic code. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_dh.c| 67 +-- drivers/scsi/scsi_sysfs.c | 58 2 f

[PATCH 02/10] dm-mpath, scsi_dh: request scsi_dh modules in scsi_dh, not dm-mpath

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig This way we can reused the same code any attachment method, not just those requested from dm-mpath. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Acked-by: Mike Snitzer --- drivers/md/dm-mpath.c | 6 ---

[PATCH 05/10] scsi_dh: move device matching to the core code

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig Add a single list of devices that need non-ALUA device handlers to the core scsi_dh code so that we can autoload the modules for them at probe time. While this is a little ugly in terms of architecture it actually significantly simplifies the code in addition to the new a

[PATCH 01/10] dm-mpath, scsi_dh: don't let dm detach device handlers

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig While allowing dm-mpath to attach device handlers is a functionality we need for backwards compatibility reason there is no reason to reference count them and detach them if dm-mpath stops using the device for some reason. If the device handler works for the given device

[PATCH 03/10] scsi_dh: move to drivers/scsi

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig Prepare for building scsi_dh.c into the core SCSI module by moving it to drivers/scsi. Signed-off-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/Makefile | 1 + drivers/scsi/device_handler/Makefile | 1 - drivers/scsi/device_

[PATCH 06/10] scsi_dh: kill struct scsi_dh_data

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig Add a ->handler and a ->handler_data field to struct scsi_device and kill this indirection. Also move struct scsi_device_handler to scsi_dh.h so that changes to it don't require rebuilding every SCSI LLDD. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen

[PATCH 04/10] scsi_dh: integrate into the core SCSI code

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig Stop building scsi_dh as a separate module and integrate it fully into the core SCSI code with explicit callouts at bus scan time. For now the callouts are placed at the same point as the old bus notifiers were called, but in the future we will be able to look at ALUA INQ

[PATCH 00/10] Integrate scsi_dh better into the scsi core V4

2015-08-27 Thread Hannes Reinecke
This series ties scsi_dh deeper into the scsi core, and fixes all kinds of issues in it, most importantly the race between using and detaching device handlers. Changes since V1: - updated comments / strings based on review feedback - moved scsi_dh.c to drivers/scsi to fix the srcdir = objdir b

[PATCH 08/10] scsi_dh: don't allow to detach device handlers at runtime

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig The I/O submission and completion pathes call into the device handler without any synchronization agains detachment. So disallow detaching device handlers at runtime. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- dr

[PATCH 07/10] scsi_dh: add a common helper to get a scsi_device from a request_queue

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig And cleanup the various messy opencoded versions of this. Note that this moves the sdev_state checks outside the queue_lock coverage, but as we don't hold the lock over the activation they are only advisory anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K.

[PATCH 09/10] scsi_dh: return SCSI_DH_NOTCONN in scsi_dh_activate()

2015-08-27 Thread Hannes Reinecke
When calling scsi_dh_activate() we should be returning SCSI_DH_NOTCONN if the device handler couldn't be attached. Reviewed-by: Bart van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_dh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/s

Re: [PATCH v1 14/15] scsi: ufs: commit descriptors before setting the doorbell

2015-08-27 Thread ygardi
> On Tue, Aug 25, 2015 at 7:36 AM, wrote: >>> On Aug 21, 2015 3:10 PM, "Yaniv Gardi" wrote: Add a write memory barrier to make sure descriptors prepared are actually written to memory before ringing the doorbell. We have also added the write memory barrier after ringing

[PATCH V7 6/9] [SCSI] aacraid: Reset irq affinity hints before releasing irq

2015-08-27 Thread Mahesh Rajashekhara
Description: Reset irq affinity hints before releasing IRQ Removed duplicate code of IRQ acquire/release Changes from V2: None Reviewed-by: Tomas Henzl , Murthy Bhat , Karthikeya Sunkesula Signed-off-by: Mahesh Rajashekhara --- drivers/scsi/aacraid/aacraid.h | 2 + drivers/s

[PATCH V7 8/9] [SCSI] aacraid: Replace pci_enable_msix() with pci_enable_msix_range()

2015-08-27 Thread Mahesh Rajashekhara
Description: As pci_enable_msix() deprecated, replaced with pci_enable_msix_range() Changes from V5: Merged 10 and 11 of V5 into this patch. AAC_MAX_MSIX definition change. Reviewed-by: Tomas Henzl , Murthy Bhat , Karthikeya Sunkesula Signed-off-by: Mahesh Rajashekhara --- drivers/scs

[PATCH V7 9/9] [SCSI] aacraid: Update driver version

2015-08-27 Thread Mahesh Rajashekhara
Reviewed-by: Tomas Henzl , Murthy Bhat , Karthikeya Sunkesula Signed-off-by: Mahesh Rajashekhara --- drivers/scsi/aacraid/aacraid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 2de5ebc..074878b 100644 -

[PATCH V7 5/9] [SCSI] aacraid: Tune response path if IsFastPath bit set

2015-08-27 Thread Mahesh Rajashekhara
Description: If 'IsFastPath' bit is set, then response path assumes no error and skips error check. Changes from V2: None Reviewed-by: Murthy Bhat , Karthikeya Sunkesula Signed-off-by: Mahesh Rajashekhara --- drivers/scsi/aacraid/aachba.c | 259 ++-

[PATCH V7 3/9] [SCSI] aacraid: Change interrupt mode to MSI for series-6 controller

2015-08-27 Thread Mahesh Rajashekhara
Description: This change always sets MSI interrupt mode for series-6 controller. Changes from V2: aac_msi option description and subject change. Reviewed-by: Tomas Henzl , Murthy Bhat , Karthikeya Sunkesula Signed-off-by: Mahesh Rajashekhara --- drivers/scsi/aacraid/aachba.c | 2 +- d

[PATCH V7 2/9] [SCSI] aacraid: Add Power Management support

2015-08-27 Thread Mahesh Rajashekhara
Description: * .suspend() and .resume() routines implemented in the driver * aac_release_resources() initiates firmware shutdown * aac_acquire_resources re-initializes the host interface Changes from V2: Increased msleep(1) to msleep(20) Reverted pci_enable_msix_exact() to

[PATCH V7 4/9] [SCSI] aacraid: Enable 64-bit write to controller register

2015-08-27 Thread Mahesh Rajashekhara
Description: If writeq() not supported, then do atomic two 32bit write Changes from V2: None Reviewed-by: Tomas Henzl , Murthy Bhat , Karthikeya Sunkesula Signed-off-by: Mahesh Rajashekhara --- drivers/scsi/aacraid/aacraid.h | 9 + drivers/scsi/aacraid/comminit.c | 1 + dri

[PATCH V7 7/9] [SCSI] aacraid: Unblock IOCTLs to controller once system resumed from suspend

2015-08-27 Thread Mahesh Rajashekhara
Description: Driver blocks ioctls once it received shutdown/suspend request during suspend/hybernation. This patch unblocks ioctls on resume path. Changes from V2: None Reviewed-by: Tomas Henzl , Murthy Bhat , Karthikeya Sunkesula Signed-off-by: Mahesh Rajashekhara --- drivers

[PATCH V7 0/9] [SCSI] aacraid: Patchset for aacraid driver version 41010

2015-08-27 Thread Mahesh Rajashekhara
This patchset includes the following changes (bug fixes and new feature support) specific to aacraid driver. V7: Removed patch 08 of V6. Keep the review-tags going V6->V7. V6: Applied driver update change at the end. Merged 10 and 11 of V5 into 9 of V6. AAC_MAX_MSIX definition change. aac_msi op

[PATCH V7 1/9] [SCSI] aacraid: Fix for logical device name and UID not exposed to the OS

2015-08-27 Thread Mahesh Rajashekhara
Description: Driver sends the right size of the response buffer. Changes from V2: None Reviewed By: Tomas Henzl , Murthy Bhat , Karthikeya Sunkesula Signed-off-by: Mahesh Rajashekhara --- drivers/scsi/aacraid/aachba.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

RE: [PATCH V6 08/10] [SCSI] aacraid: Send commit-config to controller firmware

2015-08-27 Thread Mahesh Rajashekhara
Hi Christoph, Hi Tomas, After discussed internally, this driver patch is required only if "auto commit" support is not available in the controller firmware. We have fix in the released controller firmware, so this driver patch is not needed. I'm removing this patch in V7. Hi James, As you

Re: [PATCH] aic94xx: Skip reading user settings if flash is not found

2015-08-27 Thread Christoph Hellwig
On Mon, Jul 06, 2015 at 01:07:58PM +0200, Hannes Reinecke wrote: > If no user settings are found it's pointless trying to > read them from flash. So skip that step. > This also fixes a compilation warning about uninitialized variables in > aic94xx. This looks okay to me. Reviewed-by: Christoph He

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-27 Thread Nicholas A. Bellinger
Hi Sreekanth, On Thu, 2015-08-27 at 10:37 +0530, Sreekanth Reddy wrote: > HI Nicholas & Calvin, > > Thanks for the patchset. Sure We will review and we do some unit > testing on this patch series. Currently my bandwidth is occupied with > some internal activity, so by end of next week I will ackn