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
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
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
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
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
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
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
---
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
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
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
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
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
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
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
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.
-
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
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
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
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.
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
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
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
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
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
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
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
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
---
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
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
---
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
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
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
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
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
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
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
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
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) {
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
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
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
+++
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
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
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
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
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
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
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
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
---
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
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
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
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
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
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
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
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
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
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
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 +
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
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
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
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
64 matches
Mail list logo