[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56D54A1B.8080008@suse.de>
Date: Tue, 1 Mar 2016 15:51:55 +0800
From: Hannes Reinecke <hare@...e.de>
To: Yaniv Gardi <ygardi@...eaurora.org>,
James.Bottomley@...senPartnership.com
Cc: linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-arm-msm@...r.kernel.org, santoshsy@...il.com,
linux-scsi-owner@...r.kernel.org,
Subhash Jadavani <subhashj@...eaurora.org>,
Vinayak Holikatti <vinholikatti@...il.com>,
"James E.J. Bottomley" <JBottomley@...n.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH v5 09/15] scsi: ufs: add error recovery after DL NAC error
On 02/28/2016 09:32 PM, Yaniv Gardi wrote:
> Some vendor's UFS device sends back to back NACs for the DL data frames
> causing the host controller to raise the DFES error status. Sometimes
> such UFS devices send back to back NAC without waiting for new
> retransmitted DL frame from the host and in such cases it might be
> possible the Host UniPro goes into bad state without raising the DFES
> error interrupt. If this happens then all the pending commands would
> timeout only after respective SW command (which is generally too
> large).
>
> This change workarounds such device behaviour like this:
> - As soon as SW sees the DL NAC error, it would schedule the error
> handler
> - Error handler would sleep for 50ms to see if there any fatal errors
> raised by UFS controller.
> - If there are fatal errors then SW does normal error recovery.
> - If there are no fatal errors then SW sends the NOP command to
> device to check if link is alive.
> - If NOP command times out, SW does normal error recovery
> - If NOP command succeed, skip the error handling.
>
> If DL NAC error is seen multiple times with some vendor's UFS devices
> then enable this quirk to initiate quick error recovery and also
> silence related error logs to reduce spamming of kernel logs.
>
> Signed-off-by: Subhash Jadavani <subhashj@...eaurora.org>
> Signed-off-by: Yaniv Gardi <ygardi@...eaurora.org>
>
> ---
> drivers/scsi/ufs/ufshcd.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++
> drivers/scsi/ufs/ufshci.h | 2 +
> 2 files changed, 95 insertions(+)
>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@...e.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
Powered by blists - more mailing lists