Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1540781

Re: [PATCH v1 12/12] scsi: ufs: Improve fatal error logs

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH v1 12/12] scsi: ufs: Improve fatal error logs
Date 2016-12-13 02:20 +0100
Message-ID <sNJV7-38P-1@gated-at.bofh.it> (permalink)
References <sNJBM-2Ne-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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...

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v1 12/12] scsi: ufs: Improve fatal error logs Subhash Jadavani <subhashj@codeaurora.org> - 2016-12-13 02:00 +0100
  Re: [PATCH v1 12/12] scsi: ufs: Improve fatal error logs Joe Perches <joe@perches.com> - 2016-12-13 02:20 +0100
    Re: [PATCH v1 12/12] scsi: ufs: Improve fatal error logs Subhash Jadavani <subhashj@codeaurora.org> - 2016-12-13 02:40 +0100

csiph-web