* [PATCH v1 8/8] scsi: ufs: dump hw regs on link failures
@ 2017-02-04 0:58 ` Subhash Jadavani
0 siblings, 0 replies; 2+ messages in thread
From: Subhash Jadavani @ 2017-02-04 0:58 UTC (permalink / raw)
To: vinholikatti, jejb, martin.petersen
Cc: linux-scsi, Venkat Gopalakrishnan, Subhash Jadavani, open list
From: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Dump host state, power info and host/vendor specific registers
on link failures. This provides useful info to debug the failures.
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
---
drivers/scsi/ufs/ufshcd.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index a99a673..8b721f4 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -3554,6 +3554,12 @@ static int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd)
ret = (status != PWR_OK) ? status : -1;
}
out:
+ if (ret) {
+ ufshcd_print_host_state(hba);
+ ufshcd_print_pwr_info(hba);
+ ufshcd_print_host_regs(hba);
+ }
+
spin_lock_irqsave(hba->host->host_lock, flags);
hba->active_uic_cmd = NULL;
hba->uic_async_done = NULL;
@@ -4146,8 +4152,12 @@ static int ufshcd_link_startup(struct ufs_hba *hba)
ret = ufshcd_make_hba_operational(hba);
out:
- if (ret)
+ if (ret) {
dev_err(hba->dev, "link startup failed %d\n", ret);
+ ufshcd_print_host_state(hba);
+ ufshcd_print_pwr_info(hba);
+ ufshcd_print_host_regs(hba);
+ }
return ret;
}
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v1 8/8] scsi: ufs: dump hw regs on link failures
@ 2017-02-04 0:58 ` Subhash Jadavani
0 siblings, 0 replies; 2+ messages in thread
From: Subhash Jadavani @ 2017-02-04 0:58 UTC (permalink / raw)
To: vinholikatti, jejb, martin.petersen
Cc: linux-scsi, Venkat Gopalakrishnan, Subhash Jadavani, open list
From: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Dump host state, power info and host/vendor specific registers
on link failures. This provides useful info to debug the failures.
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
---
drivers/scsi/ufs/ufshcd.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index a99a673..8b721f4 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -3554,6 +3554,12 @@ static int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd)
ret = (status != PWR_OK) ? status : -1;
}
out:
+ if (ret) {
+ ufshcd_print_host_state(hba);
+ ufshcd_print_pwr_info(hba);
+ ufshcd_print_host_regs(hba);
+ }
+
spin_lock_irqsave(hba->host->host_lock, flags);
hba->active_uic_cmd = NULL;
hba->uic_async_done = NULL;
@@ -4146,8 +4152,12 @@ static int ufshcd_link_startup(struct ufs_hba *hba)
ret = ufshcd_make_hba_operational(hba);
out:
- if (ret)
+ if (ret) {
dev_err(hba->dev, "link startup failed %d\n", ret);
+ ufshcd_print_host_state(hba);
+ ufshcd_print_pwr_info(hba);
+ ufshcd_print_host_regs(hba);
+ }
return ret;
}
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-04 0:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-04 0:58 [PATCH v1 8/8] scsi: ufs: dump hw regs on link failures Subhash Jadavani
2017-02-04 0:58 ` Subhash Jadavani
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.