From: Joe Perches <joe@perches.com>
To: Subhash Jadavani <subhashj@codeaurora.org>,
vinholikatti@gmail.com, jejb@linux.vnet.ibm.com,
martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, Dolev Raviv <draviv@codeaurora.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 12/12] scsi: ufs: Improve fatal error logs
Date: Mon, 12 Dec 2016 17:19:45 -0800 [thread overview]
Message-ID: <1481591985.29291.15.camel@perches.com> (raw)
In-Reply-To: <1481590599-17765-1-git-send-email-subhashj@codeaurora.org>
On Mon, 2016-12-12 at 16:56 -0800, Subhash Jadavani wrote:
> Errors such as UIC error, illegal OCS values, and others may require
> more information for debugging. Such information could be hibern8 events,
> events sequences, recoverable errors, error history, and more.
[]
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
[]
> @@ -346,6 +346,37 @@ static inline void ufshcd_cond_add_cmd_trace(struct ufs_hba *hba,
[]
> +static void ufshcd_print_uic_err_hist(struct ufs_hba *hba,
> + struct ufs_uic_err_reg_hist *err_hist, char *err_name)
> +{
> + int i;
> +
> + for (i = 0; i < UIC_ERR_REG_HIST_LENGTH; i++) {
> + int p = (i + err_hist->pos - 1) % UIC_ERR_REG_HIST_LENGTH;
> +
> + if (err_hist->reg[p] == 0)
> + continue;
> + dev_err(hba->dev, "%s[%d] = 0x%x at %lld us", err_name, i,
> + err_hist->reg[p], ktime_to_us(err_hist->tstamp[p]));
Please consistently use a terminating \n
> + }
> +}
> +
> static void ufshcd_print_host_regs(struct ufs_hba *hba)
> {
> /*
> @@ -362,6 +393,21 @@ static void ufshcd_print_host_regs(struct ufs_hba *hba)
> dev_err(hba->dev,
> "hba->outstanding_reqs = 0x%x, hba->outstanding_tasks = 0x%x",
> (u32)hba->outstanding_reqs, (u32)hba->outstanding_tasks);
> + dev_err(hba->dev,
> + "last_hibern8_exit_tstamp at %lld us, hibern8_exit_cnt = %d",
etc...
next prev parent reply other threads:[~2016-12-13 1:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 0:56 [PATCH v1 12/12] scsi: ufs: Improve fatal error logs Subhash Jadavani
2016-12-13 1:19 ` Joe Perches [this message]
2016-12-13 1:38 ` Subhash Jadavani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481591985.29291.15.camel@perches.com \
--to=joe@perches.com \
--cc=draviv@codeaurora.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=subhashj@codeaurora.org \
--cc=vinholikatti@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox