[PATCH 1/5] mmc: core: Add support to read command queue parameters

2014-12-02 Thread Sujit Reddy Thumma
eMMC cards with EXT_CSD version >= 7, optionally support command queuing feature as defined by Jedec eMMC5.1. Add support for probing command queue feature for such type of cards. Signed-off-by: Sujit Reddy Thumma Signed-off-by: Asutosh Das --- drivers/mmc/core/mmc.c |

Re: [PATCH V7 1/6] scsi: ufs: fix endianness sparse warnings

2014-05-25 Thread Sujit Reddy Thumma
On 11/18/2013 2:34 PM, vinayak holikatti wrote: On Mon, Sep 23, 2013 at 5:44 PM, vinayak holikatti wrote: On Thu, Sep 19, 2013 at 4:44 PM, Sujit Reddy Thumma wrote: Fix many warnings with incorrect endian assumptions which makes the code unportable to new architectures. The UFS

[RESEND PATCH V7 1/6] scsi: ufs: fix endianness sparse warnings

2014-05-25 Thread Sujit Reddy Thumma
Fix many warnings with incorrect endian assumptions which makes the code unportable to new architectures. The UFS specification defines the byte order as big-endian for UPIU structure and little-endian for the host controller transfer/task management descriptors. Signed-off-by: Sujit Reddy

[RESEND PATCH V7 0/6] scsi: ufs: TM, fatal-error handling and other fixes

2014-05-25 Thread Sujit Reddy Thumma
or cleanup and rebase - [PATCH V2 4/4]: Fix a bug - sleeping in atomic context Sujit Reddy Thumma (6): scsi: ufs: fix endianness sparse warnings scsi: ufs: make undeclared functions static scsi: ufs: Fix broken task management command implementation scsi: ufs: Fix hardware race condit

[RESEND PATCH V7 3/6] scsi: ufs: Fix broken task management command implementation

2014-05-25 Thread Sujit Reddy Thumma
TIBLE set. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv Gardi Tested-by: Dolev Raviv Acked-by: Vinayak Holikatti --- drivers/scsi/ufs/ufshcd.c | 169 +++--- drivers/scsi/ufs/ufshcd.h | 8 ++- 2 files changed, 122 insertions(+), 55 dele

[RESEND PATCH V7 6/6] scsi: ufs: Improve UFS fatal error handling

2014-05-25 Thread Sujit Reddy Thumma
separate error handling work. o SCSI is informed about the expected Unit-Attention exception from the device for the immediate command after a reset so that the SCSI layer take necessary steps to establish communication with the device. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv

[RESEND PATCH V7 5/6] scsi: ufs: Fix device and host reset methods

2014-05-25 Thread Sujit Reddy Thumma
tting the device and host and re-initializing them in proper manner. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv Gardi Tested-by: Dolev Raviv Acked-by: Vinayak Holikatti --- drivers/scsi/ufs/ufshcd.c | 240 -- drivers/scsi/ufs/ufshcd.h | 2

[RESEND PATCH V7 4/6] scsi: ufs: Fix hardware race conditions while aborting a command

2014-05-25 Thread Sujit Reddy Thumma
-existent in both controller and the device. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv Gardi Tested-by: Dolev Raviv Acked-by: Vinayak Holikatti --- drivers/scsi/ufs/ufshcd.c | 70 +-- 1 file changed, 55 insertions(+), 15 deletions(-) diff

[RESEND PATCH V7 2/6] scsi: ufs: make undeclared functions static

2014-05-25 Thread Sujit Reddy Thumma
Make undeclared functions static and declare exported symbols to suppress warnings from sparse tool. Signed-off-by: Sujit Reddy Thumma Acked-by: Vinayak Holikatti --- drivers/scsi/ufs/ufshcd.c | 4 ++-- drivers/scsi/ufs/ufshcd.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff

Re: [PATCH V2 1/3] scsi: ufs: Allow vendor specific initialization

2013-09-19 Thread Sujit Reddy Thumma
On 9/9/2013 5:03 PM, Seungwon Jeon wrote: > Hi Sujit, > > On Tue, August 27, 2013, Sujit Reddy Thumma wrote: >> Some vendor specific controller versions might need to configure >> vendor specific - registers, clocks, voltage regulators etc. to >> initialize the host c

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

2013-09-19 Thread Sujit Reddy Thumma
-existent in both controller and the device. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv Gardi Tested-by: Dolev Raviv --- drivers/scsi/ufs/ufshcd.c | 70 +-- 1 file changed, 55 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/ufs

[PATCH V7 6/6] scsi: ufs: Improve UFS fatal error handling

2013-09-19 Thread Sujit Reddy Thumma
separate error handling work. o SCSI is informed about the expected Unit-Attention exception from the device for the immediate command after a reset so that the SCSI layer take necessary steps to establish communication with the device. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv

[PATCH V7 5/6] scsi: ufs: Fix device and host reset methods

2013-09-19 Thread Sujit Reddy Thumma
tting the device and host and re-initializing them in proper manner. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv Gardi Tested-by: Dolev Raviv --- drivers/scsi/ufs/ufshcd.c | 240 -- drivers/scsi/ufs/ufshcd.h | 2 + 2 files changed, 189 inser

[PATCH V7 3/6] scsi: ufs: Fix broken task management command implementation

2013-09-19 Thread Sujit Reddy Thumma
TIBLE set. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv Gardi Tested-by: Dolev Raviv --- drivers/scsi/ufs/ufshcd.c | 169 +++--- drivers/scsi/ufs/ufshcd.h | 8 ++- 2 files changed, 122 insertions(+), 55 deletions(-) diff --git a/drivers

[PATCH V7 2/6] scsi: ufs: make undeclared functions static

2013-09-19 Thread Sujit Reddy Thumma
Make undeclared functions static and declare exported symbols to suppress warnings from sparse tool. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 4 ++-- drivers/scsi/ufs/ufshcd.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs

[PATCH V7 1/6] scsi: ufs: fix endianness sparse warnings

2013-09-19 Thread Sujit Reddy Thumma
Fix many warnings with incorrect endian assumptions which makes the code unportable to new architectures. The UFS specification defines the byte order as big-endian for UPIU structure and little-endian for the host controller transfer/task management descriptors. Signed-off-by: Sujit Reddy

[PATCH V7 0/6] scsi: ufs: TM, fatal-error handling and other fixes

2013-09-19 Thread Sujit Reddy Thumma
2 4/4]: Fix a bug - sleeping in atomic context Sujit Reddy Thumma (6): scsi: ufs: fix endianness sparse warnings scsi: ufs: make undeclared functions static scsi: ufs: Fix broken task management command implementation scsi: ufs: Fix hardware race conditions while aborting a command scsi

[PATCH V2 2/3] scsi: ufs: Add regulator enable support

2013-08-26 Thread Sujit Reddy Thumma
VCCQ2 are optional as they can be generated using internal LDO inside the UFS device. Add DT bindings for voltage regulators that can be controlled from host driver. Signed-off-by: Sujit Reddy Thumma --- .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 24 +++ drivers/scsi/ufs/ufs.h

[PATCH V2 0/3] scsi: ufs: Add support for clock and regulator initializaiton

2013-08-26 Thread Sujit Reddy Thumma
scsi-misc. - Minor code fixes. Sujit Reddy Thumma (3): scsi: ufs: Allow vendor specific initialization scsi: ufs: Add regulator enable support scsi: ufs: Add clock initialization support .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 37 ++ drivers/scsi/ufs/ufs.h

[PATCH V2 3/3] scsi: ufs: Add clock initialization support

2013-08-26 Thread Sujit Reddy Thumma
Add generic clock initialization support for UFSHCD platform driver. The clock info is read from device tree using standard clock bindings. A generic max-clock-frequency-hz property is defined to save information on maximum operating clock frequency the h/w supports. Signed-off-by: Sujit Reddy

[PATCH V2 1/3] scsi: ufs: Allow vendor specific initialization

2013-08-26 Thread Sujit Reddy Thumma
be extended in future, for example, for power mode transitions. The operations are vendor/board specific and hence determined with the help of compatible property in device tree. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd-pci.c| 8 +- drivers/scsi/ufs/ufshcd-pltfrm.c

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

2013-08-14 Thread Sujit Reddy Thumma
re details. - [PATCH V2 3/4]: Minor cleanup and rebase - [PATCH V2 4/4]: Fix a bug - sleeping in atomic context Sujit Reddy Thumma (4): scsi: ufs: Fix broken task management command implementation scsi: ufs: Fix hardware race conditions while aborting a command scsi: ufs: Fix device and

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

2013-08-14 Thread Sujit Reddy Thumma
tting the device and host and re-initializing them in proper manner. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv Gardi Tested-by: Dolev Raviv --- drivers/scsi/ufs/ufshcd.c | 240 +++-- drivers/scsi/ufs/ufshcd.h |2 + 2 files changed

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

2013-08-14 Thread Sujit Reddy Thumma
TIBLE set. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv Gardi Tested-by: Dolev Raviv --- drivers/scsi/ufs/ufshcd.c | 173 ++--- drivers/scsi/ufs/ufshcd.h |8 ++- 2 files changed, 122 insertions(+), 59 deletions(-) diff --git a/drivers

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

2013-08-14 Thread Sujit Reddy Thumma
-existent in both controller and the device. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv Gardi Tested-by: Dolev Raviv --- drivers/scsi/ufs/ufshcd.c | 70 +++- 1 files changed, 55 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/ufs

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

2013-08-14 Thread Sujit Reddy Thumma
separate error handling work. o SCSI is informed about the expected Unit-Attention exception from the device for the immediate command after a reset so that the SCSI layer take necessary steps to establish communication with the device. Signed-off-by: Sujit Reddy Thumma Reviewed-by: Yaniv

Re: [PATCH 1/3] scsi: ufs: Allow vendor specific initialization

2013-08-13 Thread Sujit Reddy Thumma
On 8/13/2013 7:23 PM, Josh Cartwright wrote: On Tue, Aug 13, 2013 at 04:30:18PM +0530, Sujit Reddy Thumma wrote: [..] diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c index a823cf4..829f7a4 100644 --- a/drivers/scsi/ufs/ufshcd-pci.c +++ b/drivers/scsi/ufs/ufshcd-pci.c

[PATCH 3/3] scsi: ufs: Add clock initialization support

2013-08-13 Thread Sujit Reddy Thumma
Add generic clock initialization support for UFSHCD platform driver. The clock info is read from device tree using standard clock bindings. A generic max-clock-frequency-hz property is defined to save information on maximum operating clock frequency the h/w supports. Signed-off-by: Sujit Reddy

[PATCH 1/3] scsi: ufs: Allow vendor specific initialization

2013-08-13 Thread Sujit Reddy Thumma
be extended in future, for example, for power mode transitions. The operations are vendor/board specific and hence determined with the help of compatible property in device tree. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd-pci.c|8 ++- drivers/scsi/ufs/ufshcd-pltfrm.c

[PATCH 0/3] scsi: ufs: Add support for clock and regulator initializaiton

2013-08-13 Thread Sujit Reddy Thumma
controller. In addition, the vendor specific operations can also be used to control the power supply of controller and Uni-Pro h/w blocks. This patchset adds support for vendor specific initialization, regulator and clock initialization based on device-tree properties. Sujit Reddy Thumma (3): scsi

[PATCH 2/3] scsi: ufs: Add regulator enable support

2013-08-13 Thread Sujit Reddy Thumma
VCCQ2 are optional as they can be generated using internal LDO inside the UFS device. Add DT bindings for voltage regulators that can be controlled from host driver. Signed-off-by: Sujit Reddy Thumma --- .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 18 ++ drivers/scsi/ufs/ufs.h

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

2013-07-29 Thread Sujit Reddy Thumma
separate error handling work. o SCSI is informed about the expected Unit-Attention exception from the device for the immediate command after a reset so that the SCSI layer take necessary steps to establish communication with the device. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs

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

2013-07-29 Thread Sujit Reddy Thumma
2 2/4]: Commit text update to clarify the hardware race with more details. - [PATCH V2 3/4]: Minor cleanup and rebase - [PATCH V2 4/4]: Fix a bug - sleeping in atomic context Sujit Reddy Thumma (4): scsi: ufs: Fix broken task management command implementation scsi: ufs

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

2013-07-29 Thread Sujit Reddy Thumma
tting the device and host and re-initializing them in proper manner. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 240 +++-- drivers/scsi/ufs/ufshcd.h |2 + 2 files changed, 189 insertions(+), 53 deletions(-) diff --git a/drivers

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

2013-07-29 Thread Sujit Reddy Thumma
-existent in both controller and the device. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 70 +++- 1 files changed, 55 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index d7f3746

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

2013-07-29 Thread Sujit Reddy Thumma
TIBLE set. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 173 ++--- drivers/scsi/ufs/ufshcd.h |8 ++- 2 files changed, 122 insertions(+), 59 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c

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

2013-07-29 Thread Sujit Reddy Thumma
On 7/24/2013 7:09 PM, Seungwon Jeon wrote: > On Wed, July 24, 2013, Sujit Reddy Thumma wrote: >> On 7/23/2013 1:57 PM, Seungwon Jeon wrote: >>> On Sat, July 20, 2013, Sujit Reddy Thumma wrote: >>>> On 7/19/2013 7:27 PM, Seungwon Jeon wrote: >>>>> On

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

2013-07-29 Thread Sujit Reddy Thumma
On 7/24/2013 7:09 PM, Seungwon Jeon wrote: > On Wed, July 24, 2013, Sujit Reddy Thumma wrote: >> On 7/23/2013 2:04 PM, Seungwon Jeon wrote: >>> On Sat, July 20, 2013, Sujit Reddy Thumma wrote: >>>> On 7/19/2013 7:28 PM, Seungwon Jeon wrote: >>>>> On

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

2013-07-23 Thread Sujit Reddy Thumma
On 7/23/2013 2:04 PM, Seungwon Jeon wrote: > On Sat, July 20, 2013, Sujit Reddy Thumma wrote: >> On 7/19/2013 7:28 PM, Seungwon Jeon wrote: >>> On Tue, July 09, 2013, Sujit Reddy Thumma wrote: >>>> Error handling in UFS driver is broken and resets the host controller

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

2013-07-23 Thread Sujit Reddy Thumma
On 7/23/2013 1:54 PM, Seungwon Jeon wrote: > On Sat, July 20, 2013, Sujit Reddy Thumma wrote: >> On 7/19/2013 7:26 PM, Seungwon Jeon wrote: >>> On Tue, July 09, 2013 Sujit Reddy Thumma wrote: >>>> Currently, sending Task Management (TM) command to the card might >&

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

2013-07-23 Thread Sujit Reddy Thumma
On 7/23/2013 1:57 PM, Seungwon Jeon wrote: > On Sat, July 20, 2013, Sujit Reddy Thumma wrote: >> On 7/19/2013 7:27 PM, Seungwon Jeon wrote: >>> On Tue, July 09, 2013, Sujit Reddy Thumma wrote: >>>> As of now SCSI initiated error handling is broken because, >>

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

2013-07-23 Thread Sujit Reddy Thumma
TIBLE set. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 174 ++--- drivers/scsi/ufs/ufshcd.h |8 ++- 2 files changed, 123 insertions(+), 59 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c

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

2013-07-23 Thread Sujit Reddy Thumma
o SCSI is informed about the expected Unit-Attention exception from the device for the immediate command after a reset so that the SCSI layer take necessary steps to establish communication with the device. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshc

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

2013-07-23 Thread Sujit Reddy Thumma
tting the device and host and re-initializing them in proper manner. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 437 +++-- drivers/scsi/ufs/ufshcd.h |2 + 2 files changed, 381 insertions(+), 58 deletions(-) diff --git a/drivers

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

2013-07-23 Thread Sujit Reddy Thumma
-existent in both controller and the device. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 70 +++- 1 files changed, 55 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 1d7e027

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

2013-07-23 Thread Sujit Reddy Thumma
- sleeping in atomic context Sujit Reddy Thumma (4): scsi: ufs: Fix broken task management command implementation scsi: ufs: Fix hardware race conditions while aborting a command scsi: ufs: Fix device and host reset methods scsi: ufs: Improve UFS fatal error handling drivers/scsi/ufs/ufshcd.c

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

2013-07-23 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 --- drivers/scsi/ufs/ufshcd-pci.c| 62

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

2013-07-23 Thread Sujit Reddy Thumma
due to continuous data transfers the runtime suspend is not triggered, the BKOPS is enabled when the device raises a level-2 exception (outstanding operations - performance impact). Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufs.h| 23 +++ drivers/scsi/ufs/ufshcd.c | 343

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

2013-07-23 Thread Sujit Reddy Thumma
order to requeue the request. To avoid frequent collisions between internal commands and scsi commands the device management command tag is allocated in the opposite direction w.r.t block layer tag allocation. Signed-off-by: Sujit Reddy Thumma Signed-off-by: Dolev Raviv --- drivers/scsi/ufs

[PATCH V4 0/2] scsi: ufs: Add support to control UFS device background operations

2013-07-23 Thread Sujit Reddy Thumma
- Forced enable of auto bkops during initialization to make sure device and driver state are matched. Sujit Reddy Thumma (2): scsi: ufs: Add support for host assisted background operations scsi: ufs: Add runtime PM support for UFS host controller driver drivers/scsi/ufs/ufs.h

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

2013-07-23 Thread Sujit Reddy Thumma
device initialization completion. Signed-off-by: Dolev Raviv Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufs.h| 96 +-- drivers/scsi/ufs/ufshcd.c | 238 - drivers/scsi/ufs/ufshcd.h | 20 drivers/scsi/ufs/ufshci.h

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

2013-07-23 Thread Sujit Reddy Thumma
of reserving tag[MAX_QUEUE - 1]. - Changed the "internal_cmd" naming to "dev_cmd" to avoid confusion with other type of internal commands other than NOP and QUERY. Dolev Raviv (1): scsi: ufs: Set fDeviceInit flag to initiate device initialization

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

2013-07-19 Thread Sujit Reddy Thumma
I'm not sure that BKOPS with runtime-pm associates. Do you think it's helpful for power management? How about hibernation scheme for runtime-pm? I'm testing and I can introduce soon. Well, I am thinking on following approach when we introduce power management. ufshcd_runtime_suspend() {

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

2013-07-19 Thread Sujit Reddy Thumma
On 7/19/2013 7:27 PM, Seungwon Jeon wrote: > On Tue, July 09, 2013, Sujit Reddy Thumma wrote: >> 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. >> >&g

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

2013-07-19 Thread Sujit Reddy Thumma
On 7/19/2013 7:26 PM, Seungwon Jeon wrote: > On Tue, July 09, 2013 Sujit Reddy Thumma wrote: >> 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

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

2013-07-19 Thread Sujit Reddy Thumma
On 7/19/2013 7:28 PM, Seungwon Jeon wrote: > On Tue, July 09, 2013, Sujit Reddy Thumma wrote: >> 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 t

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

2013-07-19 Thread Sujit Reddy Thumma
On 7/19/2013 7:26 PM, Seungwon Jeon wrote: > On Tue, July 09, 2013, Sujit Reddy Thumma wrote: >> 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

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

2013-07-19 Thread Sujit Reddy Thumma
On 7/19/2013 7:17 PM, Seungwon Jeon wrote: On Thu, July 18, 2013, Sujit Reddy Thumma wrote: + * ufshcd_wait_for_register - wait for register value to change + * @hba - per-adapter interface + * @reg - mmio register offset + * @mask - mask to apply to read register value + * @val - wait

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

2013-07-17 Thread Sujit Reddy Thumma
+ * ufshcd_wait_for_register - wait for register value to change + * @hba - per-adapter interface + * @reg - mmio register offset + * @mask - mask to apply to read register value + * @val - wait condition + * @interval_us - polling interval in microsecs + * @timeout_ms - timeout in millisecs +

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

2013-07-17 Thread Sujit Reddy Thumma
> >I'm not sure that BKOPS with runtime-pm associates. > >Do you think it's helpful for power management? > >How about hibernation scheme for runtime-pm? > >I'm testing and I can introduce soon. > >Well, I am thinking on following approach when we introduce >power management. > >ufshcd_runtime_

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

2013-07-11 Thread Sujit Reddy Thumma
On 7/10/2013 7:01 PM, Seungwon Jeon wrote: On Tue, July 09, 2013, Sujit Reddy Thumma wrote: 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

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

2013-07-11 Thread Sujit Reddy Thumma
hibernate(); /* Link and the device for more savings */ } } Let me know if this is okay. On Tue, July 09, 2013, Sujit Reddy Thumma wrote: Background operations in the UFS device can be disabled by the host to reduce the response latency of transfer requests. Add support for enab

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

2013-07-11 Thread Sujit Reddy Thumma
On 7/10/2013 6:58 PM, Seungwon Jeon wrote: > On Tue, July 09, 2013, Sujit Reddy Thumma wrote: >> 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

[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 --- drivers/scsi/ufs/ufshcd-pci.c| 65

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

2013-07-09 Thread Sujit Reddy Thumma
o SCSI is informed about the expected Unit-Attentioni exception from the device for the immediate command after a reset so that the SCSI layer take necessary steps to establish communication with the device. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshc

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

2013-07-09 Thread Sujit Reddy Thumma
tting the device and host and re-initializing them in proper manner. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 467 +++-- drivers/scsi/ufs/ufshcd.h |2 + 2 files changed, 411 insertions(+), 58 deletions(-) diff --git a/drivers

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

2013-07-09 Thread Sujit Reddy Thumma
TIBLE set. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 177 ++--- drivers/scsi/ufs/ufshcd.h |8 ++- 2 files changed, 126 insertions(+), 59 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c

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

2013-07-09 Thread Sujit Reddy Thumma
due to continuous data transfers the runtime suspend is not triggered, the BKOPS is enabled when the device raises a level-2 exception (outstanding operations - performance impact). Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufs.h| 25 - drivers/scsi/ufs/ufshcd.c | 338

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

2013-07-09 Thread Sujit Reddy Thumma
tm_slots_in_use will track which slots are in use by the driver. - [PATCH V2 2/4]: Commit text update to clarify the hardware race with more details. - [PATCH V2 3/4]: Minor cleanup and rebase - [PATCH V2 4/4]: Fix a bug - sleeping in atomic context Sujit Reddy

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

2013-07-09 Thread Sujit Reddy Thumma
-existent in both controller and the device. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 70 +++- 1 files changed, 55 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index a176421

[PATCH V3 0/2] scsi: ufs: Add support to control UFS device background operations

2013-07-09 Thread Sujit Reddy Thumma
state are matched. Sujit Reddy Thumma (2): scsi: ufs: Add support for host assisted background operations scsi: ufs: Add runtime PM support for UFS host controller driver drivers/scsi/ufs/ufs.h | 25 +++- drivers/scsi/ufs/ufshcd-pci.c| 65 +++- drivers/scsi/ufs/ufshcd

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

2013-07-09 Thread Sujit Reddy Thumma
device initialization completion. Signed-off-by: Dolev Raviv Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufs.h| 88 +- drivers/scsi/ufs/ufshcd.c | 292 - drivers/scsi/ufs/ufshcd.h | 14 ++ drivers/scsi/ufs/ufshci.h |2

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

2013-07-09 Thread Sujit Reddy Thumma
order to requeue the request. To avoid frequent collisions between internal commands and scsi commands the device management command tag is allocated in the opposite direction w.r.t block layer tag allocation. Signed-off-by: Sujit Reddy Thumma Signed-off-by: Dolev Raviv --- drivers/scsi/ufs

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

2013-07-09 Thread Sujit Reddy Thumma
[MAX_QUEUE - 1]. - Changed the "internal_cmd" naming to "dev_cmd" to avoid confusion with other type of internal commands other than NOP and QUERY. Dolev Raviv (1): scsi: ufs: Set fDeviceInit flag to initiate device initialization Sujit Reddy Thumma (1): sc

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

2013-07-04 Thread Sujit Reddy Thumma
On 7/3/2013 10:22 PM, Santosh Y wrote: + +/** + * ufshcd_fatal_err_handler - handle fatal errors + * @work: pointer to work structure */ static void ufshcd_fatal_err_handler(struct work_struct *work) { struct ufs_hba *hba; + unsigned long flags; + u32 err_xfer = 0; +

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

2013-07-03 Thread Sujit Reddy Thumma
On 7/3/2013 11:19 AM, Santosh Y wrote: + >+/** >+ * ufshcd_eh_device_reset_handler - device reset handler registered to >+ *scsi layer. >+ * @cmd - SCSI command pointer >+ * >+ * Returns SUCCESS/FAILED >+ */ >+static int ufshcd_eh_device_reset_handler(struct sc

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

2013-07-03 Thread Sujit Reddy Thumma
On 7/3/2013 9:53 PM, Santosh Y wrote: On Wed, Jul 3, 2013 at 9:22 PM, Sujit Reddy Thumma wrote: On 7/2/2013 9:21 PM, Santosh Y wrote: On Fri, Jun 28, 2013 at 5:02 PM, Sujit Reddy Thumma wrote: On 6/27/2013 4:49 PM, Santosh Y wrote: + spin_lock_irqsave(host->host_lock, fl

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

2013-07-03 Thread Sujit Reddy Thumma
On 7/2/2013 9:21 PM, Santosh Y wrote: On Fri, Jun 28, 2013 at 5:02 PM, Sujit Reddy Thumma wrote: On 6/27/2013 4:49 PM, Santosh Y wrote: + spin_lock_irqsave(host->host_lock, flags); task_req_descp = hba->utmrdl_base_addr; task_req_descp += free_slot; @@ -2

Re: [PATCH] block: Fix possible sleep in invalid context

2013-07-01 Thread Sujit Reddy Thumma
On 7/2/2013 8:34 AM, Aaron Lu wrote: Fix this by releasing spin_lock_irq() before calling >pm_runtime_autosuspend() in blk_post_runtime_resume(). Hi Sujit, Thanks for testing out block layer runtime PM! As for the problem here, it is already fixed by: commit c60855cdb976c632b3bf8922eeab8a0e78

[PATCH] block: Fix possible sleep in invalid context

2013-07-01 Thread Sujit Reddy Thumma
+0x1ac/0x2ac) from [] (kthread+0x88/0x94) from [] (kernel_thread_exit+0x0/0x8) Fix this by releasing spin_lock_irq() before calling pm_runtime_autosuspend() in blk_post_runtime_resume(). Signed-off-by: Sujit Reddy Thumma Cc: sta...@vger.kernel.org --- block/blk-core.c |6 -- 1 files

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

2013-06-28 Thread Sujit Reddy Thumma
d-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 175 ++--- drivers/scsi/ufs/ufshcd.h |8 ++- 2 files changed, 124 insertions(+), 59 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ac323a8..4781b00 1

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

2013-06-28 Thread Sujit Reddy Thumma
-existent in both controller and the device. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 70 +++- 1 files changed, 55 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 4781b00

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

2013-06-28 Thread Sujit Reddy Thumma
o SCSI is informed about the expected Unit-Attentioni exception from the device for the immediate command after a reset so that the SCSI layer take necessary steps to establish communication with the device. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshc

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

2013-06-28 Thread Sujit Reddy Thumma
tting the device and host and re-initializing them in proper manner. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 446 +++-- drivers/scsi/ufs/ufshcd.h |2 + 2 files changed, 393 insertions(+), 55 deletions(-) diff --git a/drivers

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

2013-06-28 Thread Sujit Reddy Thumma
- sleeping in atomic context Sujit Reddy Thumma (4): scsi: ufs: Fix broken task management command implementation scsi: ufs: Fix hardware race conditions while aborting a command scsi: ufs: Fix device and host reset methods scsi: ufs: Improve UFS fatal error handling drivers/scsi/ufs/ufshcd.c

[PATCH V2 0/2] scsi: ufs: Add support to control UFS device background operations

2013-06-28 Thread Sujit Reddy Thumma
. Sujit Reddy Thumma (2): scsi: ufs: Add support for host assisted background operations scsi: ufs: Add runtime PM helpers for UFS host driver drivers/scsi/ufs/ufs.h | 25 +++- drivers/scsi/ufs/ufshcd-pci.c| 60 ++- drivers/scsi/ufs/ufshcd-pltfrm.c | 41 + drivers/scsi

[PATCH V2 2/2] scsi: ufs: Add runtime PM helpers for UFS host driver

2013-06-28 Thread Sujit Reddy Thumma
Add runtime PM helpers to suspend/resume the UFS controller device at runtime. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd-pci.c| 60 ++ drivers/scsi/ufs/ufshcd-pltfrm.c | 41 ++ 2 files changed, 95 insertions

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

2013-06-28 Thread Sujit Reddy Thumma
due to continuous data transfers the runtime suspend is not triggered, the BKOPS is enabled when the device raises a level-2 exception (outstanding operations - performance impact). Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufs.h| 25 - drivers/scsi/ufs/ufshcd.c | 337

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

2013-06-28 Thread Sujit Reddy Thumma
device initialization completion. Signed-off-by: Dolev Raviv Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufs.h| 88 +- drivers/scsi/ufs/ufshcd.c | 292 - drivers/scsi/ufs/ufshcd.h | 14 ++ drivers/scsi/ufs/ufshci.h |2

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

2013-06-28 Thread Sujit Reddy Thumma
order to requeue the request. To avoid frequent collisions between internal commands and scsi commands the device management command tag is allocated in the opposite direction w.r.t block layer tag allocation. Signed-off-by: Sujit Reddy Thumma Signed-off-by: Dolev Raviv --- drivers/scsi/ufs

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

2013-06-28 Thread Sujit Reddy Thumma
with other type of internal commands other than NOP and QUERY. Dolev Raviv (1): scsi: ufs: Set fDeviceInit flag to initiate device initialization Sujit Reddy Thumma (1): scsi: ufs: Add support for sending NOP OUT UPIU drivers/scsi/ufs/ufs.h| 127 ++- drivers/scsi

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

2013-06-28 Thread Sujit Reddy Thumma
On 6/26/2013 11:06 PM, Santosh Y wrote: +/** > * ufshcd_memory_alloc - allocate memory for host memory space data >structures > * @hba: per adapter instance > * >@@ -1803,6 +1904,9 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, >struct ufshcd_lrb *lrbp) > */ >

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

2013-06-28 Thread Sujit Reddy Thumma
On 6/27/2013 4:49 PM, Santosh Y wrote: >+ spin_lock_irqsave(host->host_lock, flags); > task_req_descp = hba->utmrdl_base_addr; > task_req_descp += free_slot; > >@@ -2353,38 +2387,39 @@ ufshcd_issue_tm_cmd(struct ufs_hba *hba, > (struct utp_upiu_task_req *) ta

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

2013-06-14 Thread Sujit Reddy Thumma
On 6/13/2013 10:03 AM, Sujit Reddy Thumma wrote: static struct scsi_host_template ufshcd_driver_template = { @@ -1771,8 +2064,8 @@ int ufshcd_init(struct device *dev, struct ufs_hba **hba_handle, /* Configure LRB */ ufshcd_host_memory_configure(hba); - host->can_qu

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

2013-06-13 Thread Sujit Reddy Thumma
s H/W communication, abruptly ending the request on kill interrupt signal might cause h/w malfunction. Fix: Wait for hardware completion interrupt with TASK_UNINTERRUPTIBLE set. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 174 + drivers/scs

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

2013-06-13 Thread Sujit Reddy Thumma
o SCSI is informed about the expected Unit-Attentioni exception from the device for the immediate command after a reset so that the SCSI layer take necessary steps to establish communication with the device. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshc

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

2013-06-13 Thread Sujit Reddy Thumma
mmand so that after the abort operation, the command is guaranteed to be non-existent in both controller and the device. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 71 ++-- 1 files changed, 55 insertions(+), 16 deletions(-) diff --

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

2013-06-13 Thread Sujit Reddy Thumma
tting the device and host and re-initializing them in proper manner. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd.c | 446 +++-- drivers/scsi/ufs/ufshcd.h |2 + 2 files changed, 391 insertions(+), 57 deletions(-) diff --git a/drivers

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

2013-06-13 Thread Sujit Reddy Thumma
operations [PATCH 2/2] scsi: ufs: Add runtime PM helpers for UFS host driver Sujit Reddy Thumma (4): scsi: ufs: Fix broken task management command implementation scsi: ufs: Fix hardware race conditions while aborting a command scsi: ufs: Fix device and host reset methods scsi: ufs: Improve UFS

[PATCH 0/2] scsi: ufs: Add support to control UFS device background operations

2013-06-13 Thread Sujit Reddy Thumma
initiate device initialization Sujit Reddy Thumma (2): scsi: ufs: Add support for host assisted background operations scsi: ufs: Add runtime PM helpers for UFS host driver drivers/scsi/ufs/ufs.h | 25 +++- drivers/scsi/ufs/ufshcd-pci.c| 60 ++- drivers/scsi/ufs/ufshcd

  1   2   >