Re: [PATCH v6 15/17] scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup

2016-03-07 Thread Gilad Broner
Reviewed-by: Gilad Broner > Some UFS devices (and may be host) have issues if LCC is > enabled. So we are setting PA_Local_TX_LCC_Enable to 0 > before link startup which will make sure that both host > and device TX LCC are disabled once link startup is > completed. > >

Re: [PATCH v6 16/17] scsi: ufs-qcom: enable/disable the device ref clock

2016-03-07 Thread Gilad Broner
Reviewed-by: Gilad Broner > This change enables the device ref clock before changing to HS mode > and disables it if entered to PWM mode. > > Signed-off-by: Yaniv Gardi > > --- > drivers/scsi/ufs/ufs-qcom.c | 12 > drivers/scsi/ufs/ufshcd.h | 9

Re: [PATCH v6 17/17] scsi: ufs-qcom: add printouts of testbus debug registers

2016-03-07 Thread Gilad Broner
Reviewed-by: Gilad Broner > This change adds printouts of testbus and debug registers. > > Signed-off-by: Yaniv Gardi > > --- > drivers/scsi/ufs/ufs-qcom.c | 77 > + > drivers/scsi/ufs/ufs-qcom.h | 9 ++ > 2 f

Re: [PATCH v2 00/17] add fixes, device quirks, error recovery,

2015-10-28 Thread Gilad Broner
Looks good to me. Reviewed-by: Gilad Broner > V2: > This series should be pushed on top of 15 patches series: > "Big fixes, retries, handle a race condition" > fixed and few comments. > > V1: > This series should be pushed on top of 15 patches series: >

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

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > 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 platform

Re: [PATCH v8 4/8] add ufshcd_get_variant ufshcd_set_variant

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > Signed-off-by: Yaniv Gardi > > --- > drivers/scsi/ufs/ufs-qcom.c | 34 +- > drivers/scsi/ufs/ufshcd.h | 21 + > 2 files changed, 38 insertions(+), 17 deletions(-) > > diff --git a/drive

Re: [PATCH v8 8/8] scsi: ufs-qcom: add QUniPro hardware support and power optimizations

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > New revisions of UFS host controller supports the new UniPro > hardware controller (referred as QUniPro). This patch adds > the support to enable this new UniPro controller hardware. > > This change also adds power optimization for bus scaling featur

Re: [PATCH v8 7/8] scsi: ufs-qcom: add debug prints for test bus

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > Adds support for configuring and reading the test bus and debug > registers. This change also adds another vops in order to print the > debug registers. > > Signed-off-by: Yaniv Gardi > > --- > drivers/s

Re: [PATCH v8 5/8] scsi: ufs: creates wrapper functions for vops

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > In order to simplify the code a set of wrapper functions is created > to test and call each of the variant operations. > > Signed-off-by: Yaniv Gardi > > --- > drivers/scsi/ufs/ufs-qcom.c | 1 - > drivers/s

Re: [PATCH v8 3/8] scsi: ufs-qcom: update configuration option of SCSI_UFS_QCOM component

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > This change is required in order to be able to build the component > as a module. > > Signed-off-by: Yaniv Gardi > > --- > drivers/scsi/ufs/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/

Re: [PATCH v8 2/8] scsi: ufs-qcom: fix compilation warning if compiled as a module

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > This change fixes a compilation warning that happens if SCSI_UFS_QCOM > is compiled as a module. > Also this patch fixes an error happens when insmod the module: > "ufs_qcom: module license 'unspecified' taints kernel."

Re: [PATCH v8 1/8] phy: qcom-ufs: fix build error when the component is built as a module

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > Export the following functions in order to avoid build errors > when the component PHY_QCOM_UFS is compiled as a module: > > ERROR: "ufs_qcom_phy_disable_ref_clk" > [drivers/scsi/ufs/ufs-qcom.ko] undefined! > ERROR: "ufs_qcom_phy

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

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > 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,

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

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > 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 star

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

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > 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 b

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

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > 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 com

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

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > 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. Rec

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

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > 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

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

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > 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 60

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

2015-10-27 Thread Gilad Broner
Looks OK. Reviewed-by: Gilad Broner > 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 &g

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

2015-10-27 Thread Gilad Broner
Reviewed-by: Gilad Broner > 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 Ga

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

2015-10-27 Thread Gilad Broner
Looks OK. Reviewed-by: Gilad Broner > 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 t

[PATCH v9] scsi: ufs: add ioctl interface for query request

2015-05-19 Thread Gilad Broner
-off-by: Noa Rubens Signed-off-by: Raviv Shvili Signed-off-by: Yaniv Gardi Signed-off-by: Gilad Broner --- drivers/scsi/ufs/ufs.h| 53 +++ drivers/scsi/ufs/ufshcd.c | 205 +- include/scsi/scsi.h | 1 + include/uapi/scsi

[PATCH v9] scsi: ufs: add ioctl interface for query request

2015-05-19 Thread Gilad Broner
This patch was originally patch 1/3 in a patch series titled "Add ioctl and debug utilities to UFS driver". As it has no dependency with the debug utilities it is separated from the series, and now stands on its own. Dolev Raviv (1): scsi: ufs: add ioctl interface for query request drivers/s

[PATCH v8 1/3] scsi: ufs: add ioctl interface for query request

2015-04-14 Thread Gilad Broner
: Yaniv Gardi Signed-off-by: Gilad Broner --- drivers/scsi/ufs/ufs.h| 53 +++--- drivers/scsi/ufs/ufshcd.c | 219 +- include/scsi/scsi.h | 1 + include/uapi/scsi/Kbuild | 1 + include/uapi/scsi/ufs/Kbuild | 3 + include

[RESEND/PATCH v8 3/3] scsi: ufs: add trace events and dump prints for debug

2015-04-14 Thread Gilad Broner
Add trace events to driver to allow monitoring and profilig of activities such as PM suspend/resume, hibernate enter/exit, clock gating and clock scaling up/down. In addition, add UFS host controller register dumps to provide detailed information in case of errors to assist in analysis of issues.

[PATCH v8 2/3] scsi: ufs: add debugfs for ufs

2015-04-14 Thread Gilad Broner
- Get/set DME attributes Signed-off-by: Lee Susman Signed-off-by: Dolev Raviv Signed-off-by: Yaniv Gardi Signed-off-by: Raviv Shvili Signed-off-by: Gilad Broner --- drivers/scsi/ufs/Makefile | 3 +- drivers/scsi/ufs/ufs-debugfs.c | 901 + driver

[PATCH v8 0/3] Add ioctl and debug utilities to UFS driver

2015-04-14 Thread Gilad Broner
Changes from V7: Fix handling of copy_from_user() result in case of incomplete copy in ufshcd_query_ioctl(). Fix ufs-debugfs build in case UFS is configured as a loadable kernel module. Dolev Raviv (1): scsi: ufs: add ioctl interface for query request Gilad Broner (1): scsi: ufs: add trace

Re: [PATCH v1 2/2] scsi: ufs: add support to allow non standard behaviours (quirks)

2015-04-07 Thread Gilad Broner
+- > drivers/scsi/ufs/ufs-qcom.h | 18 ++ > drivers/scsi/ufs/ufshcd.c | 35 +++ > drivers/scsi/ufs/ufshcd.h | 9 + > 4 files changed, 79 insertions(+), 5 deletions(-) > Reviewed-by: Gilad Broner -- Qualcomm

Re: [PATCH v1 1/2] scsi: ufs-qcom: save controller revision info in internal structure

2015-04-07 Thread Gilad Broner
ion in internal structure. > > Signed-off-by: Yaniv Gardi > > --- > drivers/scsi/ufs/ufs-qcom.c | 14 +++--- > drivers/scsi/ufs/ufs-qcom.h | 8 > 2 files changed, 15 insertions(+), 7 deletions(-) > Reviewed-by: Gilad Broner -- Qualcomm Israel, on be

[PATCH v7 0/3] Add ioctl and debug utilities to UFS driver

2015-03-12 Thread Gilad Broner
Changes from V6: Moved NULL user argument check from ufshcd_ioctl to ufshcd_query_ioctl. Add comment in include/scsi/scsi.h to note 0x5388 is in use. *** BLURB HERE *** Dolev Raviv (1): scsi: ufs: add ioctl interface for query request Gilad Broner (1): scsi: ufs: add trace events and dump

[PATCH v7 2/3] scsi: ufs: add debugfs for ufs

2015-03-12 Thread Gilad Broner
- Get/set DME attributes Signed-off-by: Lee Susman Signed-off-by: Dolev Raviv Signed-off-by: Yaniv Gardi Signed-off-by: Raviv Shvili Signed-off-by: Gilad Broner --- drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-debugfs.c | 902 + drivers/sc

[PATCH v7 1/3] scsi: ufs: add ioctl interface for query request

2015-03-12 Thread Gilad Broner
From: Dolev Raviv This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Signed-off-by: Dolev Raviv Signed-off-by: Noa Rubens Signed-off-by: Raviv Shvili Signed-off-by: Ya

[PATCH v7 3/3] scsi: ufs: add trace events and dump prints for debug

2015-03-12 Thread Gilad Broner
Add trace events to driver to allow monitoring and profilig of activities such as PM suspend/resume, hibernate enter/exit, clock gating and clock scaling up/down. In addition, add UFS host controller register dumps to provide detailed information in case of errors to assist in analysis of issues.

[PATCH v7 1/3] scsi: ufs: add ioctl interface for query request

2015-03-12 Thread Gilad Broner
From: Dolev Raviv This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Signed-off-by: Dolev Raviv Signed-off-by: Noa Rubens Signed-off-by: Raviv Shvili Signed-off-by: Ya

[PATCH v7 0/3] Add ioctl and debug utilities to UFS driver

2015-03-12 Thread Gilad Broner
Changes from V6: Moved NULL user argument check from ufshcd_ioctl to ufshcd_query_ioctl. Add comment in include/scsi/scsi.h to note 0x5388 is in use. Dolev Raviv (1): scsi: ufs: add ioctl interface for query request Gilad Broner (1): scsi: ufs: add trace events and dump prints for debug Lee

Re: [PATCH v6 1/3] scsi: ufs: add ioctl interface for query request

2015-03-12 Thread Gilad Broner
>> + if (!buffer) { >> + dev_err(hba->dev, "%s: User buffer is NULL!\n", >> __func__); >> + return -EINVAL; >> + } >> + > > Should we remove this check or move it into ufshcd_query_ioctl()? > For example, BLKFLS ioctl without argument is correct usage, but >

[PATCH v6 3/3] scsi: ufs: add trace events and dump prints for debug

2015-03-12 Thread Gilad Broner
Add trace events to driver to allow monitoring and profilig of activities such as PM suspend/resume, hibernate enter/exit, clock gating and clock scaling up/down. In addition, add UFS host controller register dumps to provide detailed information in case of errors to assist in analysis of issues.

[PATCH v6 2/3] scsi: ufs: add debugfs for ufs

2015-03-12 Thread Gilad Broner
- Get/set DME attributes Signed-off-by: Lee Susman Signed-off-by: Dolev Raviv Signed-off-by: Yaniv Gardi Signed-off-by: Raviv Shvili Signed-off-by: Gilad Broner --- drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-debugfs.c | 902 + drivers/sc

[PATCH v6 1/3] scsi: ufs: add ioctl interface for query request

2015-03-12 Thread Gilad Broner
From: Dolev Raviv This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Signed-off-by: Dolev Raviv Signed-off-by: Noa Rubens Signed-off-by: Raviv Shvili Signed-off-by: Ya

[PATCH v6 0/3] Add ioctl and debug utilities to UFS driver

2015-03-12 Thread Gilad Broner
Changes from V5: Created a common trace event class for driver state changes instead of individual trace events definitions. Dolev Raviv (1): scsi: ufs: add ioctl interface for query request Gilad Broner (1): scsi: ufs: add trace events and dump prints for debug Lee Susman (1): scsi: ufs

Re: [PATCH v5 3/3] scsi: ufs: add trace events and dump prints for debug

2015-03-12 Thread Gilad Broner
> This and the auto_bkops_state is pretty much the same. Can't you use > the same TP_printk() and just have a DECLARE_EVENT_CLASS? The trace > point name is printed with the event to see different events. I agree. will upload the fix in next patchset. -- Qualcomm Israel, on behalf of Qualcomm In

[PATCH v5 3/3] scsi: ufs: add trace events and dump prints for debug

2015-03-10 Thread Gilad Broner
Add trace events to driver to allow monitoring and profilig of activities such as PM suspend/resume, hibernate enter/exit, clock gating and clock scaling up/down. In addition, add UFS host controller register dumps to provide detailed information in case of errors to assist in analysis of issues.

[PATCH v5 2/3] scsi: ufs: add debugfs for ufs

2015-03-10 Thread Gilad Broner
- Get/set DME attributes Signed-off-by: Lee Susman Signed-off-by: Dolev Raviv Signed-off-by: Yaniv Gardi Signed-off-by: Raviv Shvili Signed-off-by: Gilad Broner --- drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-debugfs.c | 902 + drivers/sc

[PATCH v5 1/3] scsi: ufs: add ioctl interface for query request

2015-03-10 Thread Gilad Broner
From: Dolev Raviv This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Signed-off-by: Dolev Raviv Signed-off-by: Noa Rubens Signed-off-by: Raviv Shvili Signed-off-by: Ya

[PATCH v5 0/3] Add ioctl and debug utilities to UFS driver

2015-03-10 Thread Gilad Broner
Changes from V4: Dropped error injection change titled: scsi: ufs: inject errors to verify error handling Dolev Raviv (1): scsi: ufs: add ioctl interface for query request Gilad Broner (1): scsi: ufs: add trace events and dump prints for debug Lee Susman (1): scsi: ufs: add debugfs for

Re: [PATCH] drivers: scsi: ufs: Fix possible null derefrence

2015-03-10 Thread Gilad Broner
> Check for null before being dereferenced to avoid a invalid null > dereference. > > Found using Coccinelle. > > Signed-off-by: Tapasweni Pathak > Acked-by: Julia Lawall > --- > drivers/scsi/ufs/ufshcd.c |7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/

Re: [PATCH v4 4/4] scsi: ufs: inject errors to verify error handling

2015-03-10 Thread Gilad Broner
>> +static bool inject_cmd_hang_tr(struct ufs_hba *hba) >> +{ >> + int tag; >> + >> + tag = find_first_bit(&hba->outstanding_reqs, hba->nutrs); >> + if (tag == hba->nutrs) >> + return 0; >> + >> + __clear_bit(tag, &hba->outstanding_reqs); >> + hba->lrb[ta

[PATCH v4 3/4] scsi: ufs: add trace events and dump prints for debug

2015-03-02 Thread Gilad Broner
Add trace events to driver to allow monitoring and profilig of activities such as PM suspend/resume, hibernate enter/exit, clock gating and clock scaling up/down. In addition, add UFS host controller register dumps to provide detailed information in case of errors to assist in analysis of issues.

[PATCH v4 4/4] scsi: ufs: inject errors to verify error handling

2015-03-02 Thread Gilad Broner
From: Sujit Reddy Thumma Use fault-injection framework to simulate error conditions in the controller and verify error handling mechanisms implemented in UFS host controller driver. This is used only during development and hence guarded by CONFIG_UFS_FAULT_INJECTION debug config option. Signed-

[PATCH v4 1/4] scsi: ufs: add ioctl interface for query request

2015-03-02 Thread Gilad Broner
From: Dolev Raviv This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Signed-off-by: Dolev Raviv Signed-off-by: Noa Rubens Signed-off-by: Raviv Shvili Signed-off-by: Ya

[PATCH v4 2/4] scsi: ufs: add debugfs for ufs

2015-03-02 Thread Gilad Broner
- Get/set DME attributes Signed-off-by: Lee Susman Signed-off-by: Dolev Raviv Signed-off-by: Yaniv Gardi Signed-off-by: Raviv Shvili Signed-off-by: Gilad Broner --- drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-debugfs.c | 902 + drivers/sc

[PATCH v4 0/4] Add ioctl and debug utilities to UFS driver

2015-03-02 Thread Gilad Broner
Changes from V3: Changed tag statistics macros to functions and removed redundant call to ufsdbg_remove_debugfs(). Other minor changes fixing previous comments. Dolev Raviv (1): scsi: ufs: add ioctl interface for query request Gilad Broner (1): scsi: ufs: add trace events and dump prints for

Re: [PATCH v3 3/4] scsi: ufs: add trace events and dump prints for debug

2015-03-01 Thread Gilad Broner
> If I understand the patch above, you basically have: > > if () > goto out; > else > ret = ufshcd_resume(); > out: > > Wouldn't it be better to just reverse the above if condition? > > if (!...) > ret = ufshcd_resume(); > > That would

Re: [PATCH v3 2/4] scsi: ufs: add debugfs for ufs

2015-03-01 Thread Gilad Broner
>> +#define UFSHCD_UPDATE_TAG_STATS(hba, tag) >> +#define UFSHCD_UPDATE_TAG_STATS_COMPLETION(hba, cmd) >> +#define UFSHCD_UPDATE_ERROR_STATS(hba, type) >> + >> +#endif > > Is there any reason that these are defined as macros instead of > static functions? No special reason that I'm aware of. I wil

[PATCH v3 4/4] scsi: ufs: inject errors to verify error handling

2015-02-23 Thread Gilad Broner
From: Sujit Reddy Thumma Use fault-injection framework to simulate error conditions in the controller and verify error handling mechanisms implemented in UFS host controller driver. This is used only during development and hence guarded by CONFIG_UFS_FAULT_INJECTION debug config option. Signed-

[PATCH v3 1/4] scsi: ufs: add ioctl interface for query request

2015-02-23 Thread Gilad Broner
From: Dolev Raviv This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Signed-off-by: Dolev Raviv Signed-off-by: Noa Rubens Signed-off-by: Raviv Shvili Signed-off-by: Ya

[PATCH v3 2/4] scsi: ufs: add debugfs for ufs

2015-02-23 Thread Gilad Broner
- Get/set DME attributes Signed-off-by: Lee Susman Signed-off-by: Dolev Raviv Signed-off-by: Yaniv Gardi Signed-off-by: Raviv Shvili Signed-off-by: Gilad Broner --- drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-debugfs.c | 902 + drivers/sc

[PATCH v3 3/4] scsi: ufs: add trace events and dump prints for debug

2015-02-23 Thread Gilad Broner
Add trace events to driver to allow monitoring and profilig of activities such as PM suspend/resume, hibernate enter/exit, clock gating and clock scaling up/down. In addition, add UFS host controller register dumps to provide detailed information in case of errors to assist in analysis of issues.

[PATCH v3 0/4] Add ioctl and debug utilities to UFS driver

2015-02-23 Thread Gilad Broner
Changes from V2: Fixed comment for debugfs change: Added missing clean up to driver unload path and remove redundant macros. Dolev Raviv (1): scsi: ufs: add ioctl interface for query request Gilad Broner (1): scsi: ufs: add trace events and dump prints for debug Lee Susman (1): scsi: ufs

Re: [PATCH v2 2/4] scsi: ufs: add debugfs for ufs

2015-02-22 Thread Gilad Broner
> UFSDBG_REMOVE_DEBUGFS() is not called in the driver unloading path. > So ufs debugfs directory is not removed when unloading driver. It > should be called in ufshcd_remove(). > > BTW, do we really need UFSDBG_ADD_DEBUGFS() and UFSDBG_REMOVE_DEBUGFS() > macros? > We can use static inline function

Re: [PATCH v2 3/4] scsi: ufs: add trace events and dump prints for debug

2015-02-22 Thread Gilad Broner
>> struct ufs_stats { >> +#ifdef CONFIG_DEBUG_FS >> bool enabled; >> u64 **tag_stats; >> int q_depth; >> int err_stats[UFS_ERR_MAX]; >> +#endif > > Can any of the tracepoint code be called that references these when > CONFIG_DEBUG_FS is not set? Because soon (possibly even this

Re: [PATCH v1 2/4] scsi: ufs: add debugfs for ufs

2015-02-10 Thread Gilad Broner
> Should we append the index for unique directory > name for each contoroller like "ufs0", "ufs1", ...? I agree - uploaded patch V2 in which this is handled. Thanks, Gilad. -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the

[PATCH v2 0/4] Add ioctl and debug utilities to UFS driver

2015-02-10 Thread Gilad Broner
Changes from V1: - Renamed debugfs.* to ufs-debugfs.* - Added host controller instance number to ufs debug-fs entry name. - Removed FTRACE_EVENT_ENABLED macro as it was redundant. Dolev Raviv (1): scsi: ufs: add ioctl interface for query request Gilad Broner (1): scsi: ufs: add trace events

[PATCH v2 1/4] scsi: ufs: add ioctl interface for query request

2015-02-10 Thread Gilad Broner
From: Dolev Raviv This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Signed-off-by: Dolev Raviv Signed-off-by: Noa Rubens Signed-off-by: Raviv Shvili Signed-off-by: Ya

[PATCH v2 2/4] scsi: ufs: add debugfs for ufs

2015-02-10 Thread Gilad Broner
- Get/set DME attributes Signed-off-by: Lee Susman Signed-off-by: Dolev Raviv Signed-off-by: Yaniv Gardi Signed-off-by: Raviv Shvili Signed-off-by: Gilad Broner --- drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-debugfs.c | 902 + drivers/sc

[PATCH v2 4/4] scsi: ufs: inject errors to verify error handling

2015-02-10 Thread Gilad Broner
From: Sujit Reddy Thumma Use fault-injection framework to simulate error conditions in the controller and verify error handling mechanisms implemented in UFS host controller driver. This is used only during development and hence guarded by CONFIG_UFS_FAULT_INJECTION debug config option. Signed-

[PATCH v2 3/4] scsi: ufs: add trace events and dump prints for debug

2015-02-10 Thread Gilad Broner
Add trace events to driver to allow monitoring and profilig of activities such as PM suspend/resume, hibernate enter/exit, clock gating and clock scaling up/down. In addition, add UFS host controller register dumps to provide detailed information in case of errors to assist in analysis of issues.

Re: [PATCH v1 3/4] scsi: ufs: add trace events and dump prints for debug

2015-02-04 Thread Gilad Broner
> Please use trace__enabled(), for instance, > trace_ufshcd_command_enabled(). > > This also uses jump_labels and is a nop when it is not enabled. I accept your comment and will fix it. I'll wait a bit longer with sending v2 in case there are more comments. Thanks, Gilad. -- QUALCOMM ISRAEL, on

[PATCH v1 4/4] scsi: ufs: inject errors to verify error handling

2015-02-03 Thread Gilad Broner
From: Sujit Reddy Thumma Use fault-injection framework to simulate error conditions in the controller and verify error handling mechanisms implemented in UFS host controller driver. This is used only during development and hence guarded by CONFIG_UFS_FAULT_INJECTION debug config option. Signed-

[PATCH v1 2/4] scsi: ufs: add debugfs for ufs

2015-02-03 Thread Gilad Broner
- Get/set DME attributes Signed-off-by: Lee Susman Signed-off-by: Dolev Raviv Signed-off-by: Yaniv Gardi Signed-off-by: Raviv Shvili Signed-off-by: Gilad Broner --- drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/debugfs.c | 898 + driver

[PATCH v1 3/4] scsi: ufs: add trace events and dump prints for debug

2015-02-03 Thread Gilad Broner
Add trace events to driver to allow monitoring and profilig of activities such as PM suspend/resume, hibernate enter/exit, clock gating and clock scaling up/down. In addition, add UFS host controller register dumps to provide detailed information in case of errors to assist in analysis of issues.

[PATCH v1 1/4] scsi: ufs: add ioctl interface for query request

2015-02-03 Thread Gilad Broner
From: Dolev Raviv This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Signed-off-by: Dolev Raviv Signed-off-by: Noa Rubens Signed-off-by: Raviv Shvili Signed-off-by: Ya

[PATCH v1 0/4] Add ioctl and debug utilities to UFS driver

2015-02-03 Thread Gilad Broner
, dump host controller registers and requests descriptors on failures, several statistics. Dolev Raviv (1): scsi: ufs: add ioctl interface for query request Gilad Broner (1): scsi: ufs: add trace events and dump prints for debug Lee Susman (1): scsi: ufs: add debugfs for ufs Sujit Reddy