[PATCH V3 0/2] Add suport for internal request (NOP and Query Request)

2013-07-09 Thread Sujit Reddy Thumma
This patch series replace the previous Query Request and NOP patches: [PATCH 1/8] scsi: ufs: add support for query [PATCH 6/8] scsi: ufs: Add support for sending NOP OUT UPIU [PATCH 7/8] scsi: ufs: Set fDeviceInit flag to initiate device initialization Major difference - Sending the query

[PATCH V3 1/2] scsi: ufs: Add support for sending NOP OUT UPIU

2013-07-09 Thread Sujit Reddy Thumma
As part of device initialization sequence, sending NOP OUT UPIU and waiting for NOP IN UPIU response is mandatory. This confirms that the device UFS Transport (UTP) layer is functional and the host can configure the device with further commands. Add support for sending NOP OUT UPIU to check the

[PATCH V3 2/2] scsi: ufs: Set fDeviceInit flag to initiate device initialization

2013-07-09 Thread Sujit Reddy Thumma
From: Dolev Raviv dra...@codeaurora.org Allow UFS device to complete its initialization and accept SCSI commands by setting fDeviceInit flag. The device may take time for this operation and hence the host should poll until fDeviceInit flag is toggled to zero. This step is mandated by UFS device

[PATCH V3 2/4] scsi: ufs: Fix hardware race conditions while aborting a command

2013-07-09 Thread Sujit Reddy Thumma
There is a possible race condition in the hardware when the abort command is issued to terminate the ongoing SCSI command as described below: - A bit in the door-bell register is set in the controller for a new SCSI command. - In some rare situations, before controller get a chance to issue

[PATCH V3 1/2] scsi: ufs: Add support for host assisted background operations

2013-07-09 Thread Sujit Reddy Thumma
Background operations in the UFS device can be disabled by the host to reduce the response latency of transfer requests. Add support for enabling/disabling the background operations during runtime suspend/resume of the device. If the device is in critical need of BKOPS it will raise an

[PATCH V3 0/4] scsi: ufs: Improve UFS error handling

2013-07-09 Thread Sujit Reddy Thumma
The first patch fixes many issues with current task management handling in UFSHCD driver. Others improve error handling in various scenarios. These patches depends on: [PATCH V3 1/2] scsi: ufs: Add support for sending NOP OUT UPIU [PATCH V3 2/2] scsi: ufs: Set fDeviceInit flag to initiate device

[PATCH V3 3/4] scsi: ufs: Fix device and host reset methods

2013-07-09 Thread Sujit Reddy Thumma
As of now SCSI initiated error handling is broken because, the reset APIs don't try to bring back the device initialized and ready for further transfers. In case of timeouts, the scsi error handler takes care of handling aborts and resets. Improve the error handling in such scenario by resetting

[PATCH V3 1/4] scsi: ufs: Fix broken task management command implementation

2013-07-09 Thread Sujit Reddy Thumma
Currently, sending Task Management (TM) command to the card might be broken in some scenarios as listed below: Problem: If there are more than 8 TM commands the implementation returns error to the caller. Fix: Wait for one of the slots to be emptied and send the command. Problem:

[PATCH V3 2/2] scsi: ufs: Add runtime PM support for UFS host controller driver

2013-07-09 Thread Sujit Reddy Thumma
Add runtime PM helpers to suspend/resume UFS controller at runtime. Enable runtime PM by default for pci and platform drivers as the initialized hardware can suspend if it is not used after bootup. Signed-off-by: Sujit Reddy Thumma sthu...@codeaurora.org --- drivers/scsi/ufs/ufshcd-pci.c|

[PATCH V3 4/4] scsi: ufs: Improve UFS fatal error handling

2013-07-09 Thread Sujit Reddy Thumma
Error handling in UFS driver is broken and resets the host controller for fatal errors without re-initialization. Correct the fatal error handling sequence according to UFS Host Controller Interface (HCI) v1.1 specification. o Upon determining fatal error condition the host controller may hang

Re: [PATCH V3 2/2] scsi: ufs: Set fDeviceInit flag to initiate device initialization

2013-07-09 Thread merez
Tested-by: Maya Erez me...@codeaurora.org From: Dolev Raviv dra...@codeaurora.org Allow UFS device to complete its initialization and accept SCSI commands by setting fDeviceInit flag. The device may take time for this operation and hence the host should poll until fDeviceInit flag is

Re: [PATCH V3 1/2] scsi: ufs: Add support for sending NOP OUT UPIU

2013-07-09 Thread merez
Tested-by: Maya Erez me...@codeaurora.org As part of device initialization sequence, sending NOP OUT UPIU and waiting for NOP IN UPIU response is mandatory. This confirms that the device UFS Transport (UTP) layer is functional and the host can configure the device with further commands. Add

Re: [PATCH V3 1/2] scsi: ufs: Add support for host assisted background operations

2013-07-09 Thread merez
Tested-by: Maya Erez me...@codeaurora.org Background operations in the UFS device can be disabled by the host to reduce the response latency of transfer requests. Add support for enabling/disabling the background operations during runtime suspend/resume of the device. If the device is in

Re: [PATCH V3 2/2] scsi: ufs: Add runtime PM support for UFS host controller driver

2013-07-09 Thread merez
Tested-by: Maya Erez me...@codeaurora.org Add runtime PM helpers to suspend/resume UFS controller at runtime. Enable runtime PM by default for pci and platform drivers as the initialized hardware can suspend if it is not used after bootup. Signed-off-by: Sujit Reddy Thumma

Re: [PATCH V3 2/4] scsi: ufs: Fix hardware race conditions while aborting a command

2013-07-09 Thread merez
Tested-by: Maya Erez me...@codeaurora.org There is a possible race condition in the hardware when the abort command is issued to terminate the ongoing SCSI command as described below: - A bit in the door-bell register is set in the controller for a new SCSI command. - In some rare

Re: [PATCH V3 1/4] scsi: ufs: Fix broken task management command implementation

2013-07-09 Thread merez
Tested-by: Maya Erez me...@codeaurora.org Currently, sending Task Management (TM) command to the card might be broken in some scenarios as listed below: Problem: If there are more than 8 TM commands the implementation returns error to the caller. Fix: Wait for one of the slots

Re: [PATCH V3 3/4] scsi: ufs: Fix device and host reset methods

2013-07-09 Thread merez
Tested with error injection. Tested-by: Maya Erez me...@codeaurora.org As of now SCSI initiated error handling is broken because, the reset APIs don't try to bring back the device initialized and ready for further transfers. In case of timeouts, the scsi error handler takes care of handling

Re: [PATCH V3 4/4] scsi: ufs: Improve UFS fatal error handling

2013-07-09 Thread merez
Tested with error injection. Tested-by: Maya Erez me...@codeaurora.org Error handling in UFS driver is broken and resets the host controller for fatal errors without re-initialization. Correct the fatal error handling sequence according to UFS Host Controller Interface (HCI) v1.1

[PATCH v2 0/7] usb: phy: msm: Fixes and cleanups

2013-07-09 Thread Ivan T. Ivanov
From: Ivan T. Ivanov iiva...@mm-sol.com Changes since first version. * Extend commit messages a little bit. Following patches make initial cleanup of usb phy found in the Qualcomm chipsets. Changes include: * Build time error fix. * Move driver to Managed Device Resource allocation. * Checkpatch

[PATCH v2 3/7] usb: phy: msm: Move regulator usage to managed resource allocation

2013-07-09 Thread Ivan T. Ivanov
From: Ivan T. Ivanov iiva...@mm-sol.com This patch move global regulators variables to driver state structire and move allocation of the regulators to be devm managed. Signed-off-by: Ivan T. Ivanov iiva...@mm-sol.com --- drivers/usb/phy/phy-msm-usb.c | 111

[PATCH v2 2/7] usb: phy: msm: Migrate to Managed Device Resource allocation

2013-07-09 Thread Ivan T. Ivanov
From: Ivan T. Ivanov iiva...@mm-sol.com Use managed device resources to clean up the probe/remove and get DT support for free. Signed-off-by: Ivan T. Ivanov iiva...@mm-sol.com --- drivers/usb/phy/phy-msm-usb.c | 78 +++-- 1 file changed, 20 insertions(+),

[PATCH v2 7/7] usb: phy: msm: Lindent the code

2013-07-09 Thread Ivan T. Ivanov
From: Ivan T. Ivanov iiva...@mm-sol.com Signed-off-by: Ivan T. Ivanov iiva...@mm-sol.com --- drivers/usb/phy/phy-msm-usb.c | 99 ++--- 1 file changed, 52 insertions(+), 47 deletions(-) diff --git a/drivers/usb/phy/phy-msm-usb.c

[PATCH v2 5/7] usb: phy: msm: Fix WARNING: quoted string split across lines

2013-07-09 Thread Ivan T. Ivanov
From: Ivan T. Ivanov iiva...@mm-sol.com This fixes checkpatch.pl warnings. Signed-off-by: Ivan T. Ivanov iiva...@mm-sol.com --- drivers/usb/phy/phy-msm-usb.c | 33 +++-- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/drivers/usb/phy/phy-msm-usb.c

[PATCH v2 6/7] usb: phy: msm: Fix WARNING: Prefer seq_puts to seq_printf

2013-07-09 Thread Ivan T. Ivanov
From: Ivan T. Ivanov iiva...@mm-sol.com This fixes checkpatch.pl warnings. Signed-off-by: Ivan T. Ivanov iiva...@mm-sol.com --- drivers/usb/phy/phy-msm-usb.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/phy/phy-msm-usb.c

[PATCH v2 1/7] usb: phy: msm: Move mach depndend code to platform data

2013-07-09 Thread Ivan T. Ivanov
From: Ivan T. Ivanov iiva...@mm-sol.com This patch fix compilation error and is an intermediate step before the addition of DeviceTree support for newer targets. Fix suggested here: https://lkml.org/lkml/2013/6/19/381 Cc: David Brown dav...@codeaurora.org Cc: Daniel Walker dwal...@fifo99.com Cc: