[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1578908621.17435.18.camel@mtkswgap22>
Date: Mon, 13 Jan 2020 17:43:41 +0800
From: Stanley Chu <stanley.chu@...iatek.com>
To: "Bean Huo (beanhuo)" <beanhuo@...ron.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"avri.altman@....com" <avri.altman@....com>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
"cang@...eaurora.org" <cang@...eaurora.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"bvanassche@....org" <bvanassche@....org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kuohong.wang@...iatek.com" <kuohong.wang@...iatek.com>,
"peter.wang@...iatek.com" <peter.wang@...iatek.com>,
"chun-hung.wu@...iatek.com" <chun-hung.wu@...iatek.com>,
"andy.teng@...iatek.com" <andy.teng@...iatek.com>
Subject: RE: [EXT] [PATCH v1 1/3] scsi: ufs: fix empty check of error history
Hi Bean,
On Mon, 2020-01-13 at 09:28 +0000, Bean Huo (beanhuo) wrote:
> Hi, Stanley
>
> >
> > Currently checking if an error history element is empty or not is by its "value". In
> > most cases, value is error code.
> >
> > However this checking is not correct because some errors or events do not
> > specify any values in error history so values remain as 0, and this will lead to
> > incorrect empty checking.
> >
> Do you think this is a bug of UFS host controller? According to the UFS host Spec,
> If there had error detected in each layer, at least bit31 in its error code register
> Should be set to 1.
>
> Why there was an error happening, but host didn't set this bit31?
>
Thanks so much for review.
Yes, the case bit[31] set is true for UIC errors.
However the users of UFS error history, i.e., users of
ufshcd_update_reg_hlist(), are not only UIC errors. Some other essential
events will update history too, for example, device reset events and
abort events.
Take "device reset events" as example: parameter "val" may be 0 while
invoking ufshcd_update_reg_hlist(). If this happens, the device reset
event will not be printed out because its err_hist->reg[p] is 0
according to the original logic in ufshcd_print_err_hist().
Feel free to correct above description if it is wrong.
Thanks,
Stanley
Powered by blists - more mailing lists