[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

[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

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 series

[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 h...@suse.de --- drivers/scsi/device_handler/scsi_dh_alua.c | 38 +- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git

[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

[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

[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 gbro...@codeaurora.org Signed-off-by: Yaniv Gardi yga...@codeaurora.org ---

[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

[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

[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

[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 gbro...@codeaurora.org Signed-off-by: Yaniv Gardi yga...@codeaurora.org --- drivers/scsi/ufs/ufshcd.c | 11 ++- 1 file changed, 6 insertions(+), 5

[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

[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 yga...@codeaurora.org --- drivers/scsi/ufs/ufshcd.c | 22

[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

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

[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

[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 h...@suse.de --- drivers/scsi/device_handler/scsi_dh_alua.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git

[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 h...@lst.de Signed-off-by: Hannes Reinecke h...@suse.de --- drivers/scsi/device_handler/scsi_dh_alua.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff

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

[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 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 h...@suse.de --- drivers/scsi/device_handler/scsi_dh_alua.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git

[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 h...@lst.de Signed-off-by: Hannes Reinecke h...@suse.de --- drivers/scsi/device_handler/scsi_dh_alua.c | 56

[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 h...@suse.de --- drivers/scsi/device_handler/scsi_dh_alua.c | 70 +++--- 1 file changed, 65 insertions(+), 5 deletions(-) diff --git

[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 h...@suse.de --- drivers/scsi/device_handler/scsi_dh_alua.c | 211 +++-- 1 file changed, 139 insertions(+), 72 deletions(-) diff --git

[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

[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 h...@suse.de --- drivers/scsi/device_handler/scsi_dh_alua.c | 21 + 1 file changed, 17 insertions(+), 4

[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 bart.vanass...@sandisk.com Reviewed-by: Christoph Hellwig h...@lst.de Signed-off-by: Hannes Reinecke h...@suse.de ---

[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 bart.vanass...@sandisk.com Reviewed-by: Reviewed-by: Christoph Hellwig h...@lst.de Signed-off-by: Hannes Reinecke h...@suse.de --- include/scsi/scsi_dbg.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/scsi/scsi_dbg.h

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

2015-08-27 Thread Hannes Reinecke
Signed-off-by: Hannes Reinecke h...@suse.de --- 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 ---

[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 bart.vanass...@sandisk.com Signed-off-by: Hannes Reinecke h...@suse.de --- drivers/scsi/device_handler/scsi_dh_alua.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git

[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 h...@suse.de --- drivers/scsi/device_handler/scsi_dh_alua.c | 179 + 1 file changed, 83 insertions(+), 96 deletions(-) diff --git

[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 h...@suse.de --- 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

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, yga...@codeaurora.org wrote: On Tue, Aug 25, 2015 at 7:36 AM, yga...@codeaurora.org wrote: On Aug 21, 2015 3:10 PM, Yaniv Gardi yga...@codeaurora.org wrote: Add a write memory barrier to make sure descriptors prepared are actually written to memory before

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 yga...@codeaurora.org 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

[PATCH] scsi: fix scsi_error_handler vs. scsi_host_dev_release race

2015-08-27 Thread mhocko
From: Michal Hocko mho...@suse.com 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] 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, mho...@kernel.org wrote: From: Michal Hocko mho...@suse.com 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

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

2015-08-27 Thread Wendy Xiong
Gabriel Krisman Bertazi krisman at 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 wenxi...@linux.vnet.ibm.com

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 == cmnd || NULL == devip) {

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 sreekanth.re...@avagotech.com Thanks, Sreekanth On Fri, Aug 28, 2015 at 6:50 AM, kbuild test robot fengguang...@intel.com wrote: Signed-off-by: Fengguang Wu fengguang...@intel.com --- mpt3sas_base.c |2 +- 1 file changed, 1

[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

[PATCH scsi] mpt3sas: mpt3sas_base_unmap_resources can be static

2015-08-27 Thread kbuild test robot
Signed-off-by: Fengguang Wu fengguang...@intel.com --- 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 +++

[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

RE: [PATCH 1/3] hpsa: convert show method snprintf usage to scnprintf

2015-08-27 Thread Seymour, Shane M
Hi James, There's been no ack on this one. However, there's no actual reason to prefer scnprintf over snprintf: the former will zero terminate, the latter won't if the write length is over the buffer length, but this is a file buffer: the routine will return as many bytes to userspace as are

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

[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 the...@redhat.com, Murthy Bhat murthy.b...@pmcs.com, Karthikeya Sunkesula

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

2015-08-27 Thread Mahesh Rajashekhara
Reviewed-by: Tomas Henzl the...@redhat.com, Murthy Bhat murthy.b...@pmcs.com, Karthikeya Sunkesula karthikeya.sunkes...@pmcs.com Signed-off-by: Mahesh Rajashekhara mahesh.rajashekh...@pmcs.com --- drivers/scsi/aacraid/aacraid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[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 murthy.b...@pmcs.com, Karthikeya Sunkesula karthikeya.sunkes...@pmcs.com Signed-off-by: Mahesh Rajashekhara mahesh.rajashekh...@pmcs.com

[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

[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 the...@redhat.com, Murthy Bhat murthy.b...@pmcs.com, Karthikeya Sunkesula karthikeya.sunkes...@pmcs.com Signed-off-by: Mahesh Rajashekhara mahesh.rajashekh...@pmcs.com ---

[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 the...@redhat.com, Murthy Bhat murthy.b...@pmcs.com, Karthikeya Sunkesula karthikeya.sunkes...@pmcs.com

[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

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

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

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, yga...@codeaurora.org wrote: On Aug 21, 2015 3:10 PM, Yaniv Gardi yga...@codeaurora.org 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

[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 bart.vanass...@sandisk.com Reviewed-by: Christoph Hellwig h...@lst.de Signed-off-by: Hannes Reinecke h...@suse.de --- drivers/scsi/scsi_dh.c | 1 + 1

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

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig h...@lst.de 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 h...@lst.de Reviewed-by: Martin K. Petersen

[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 h...@lst.de 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 h...@lst.de

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

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig h...@lst.de 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

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

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig h...@lst.de 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

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

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

[PATCH 06/10] scsi_dh: kill struct scsi_dh_data

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig h...@lst.de 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 h...@lst.de

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

2015-08-27 Thread Hannes Reinecke
From: Christoph Hellwig h...@lst.de 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

[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

[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 h...@suse.de --- drivers/scsi/scsi_dh.c| 67 +-- drivers/scsi/scsi_sysfs.c | 58