From: Stanley Chu <stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> To: "Bean Huo (beanhuo)" <beanhuo-AL4WhLSQfzjQT0dZR+AlfA@public.gmane.org> Cc: "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" <linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>, "linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, "martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org" <martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>, "marc.w.gonzalez-GANU6spQydw@public.gmane.org" <marc.w.gonzalez-GANU6spQydw@public.gmane.org>, "andy.teng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org" <andy.teng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>, "chun-hung.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org" <chun-hung.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>, "kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org" <kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>, "evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org" <evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>, "avri.altman-Sjgp3cTcYWE@public.gmane.org" <avri.altman-Sjgp3cTcYWE@public.gmane.org>, "linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" <linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>, "peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org" <peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>, "alim.akhtar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org" <alim.akhtar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>, "subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org" <subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>, "sayalil-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org" <sayalil-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>, "pedrom.sousa-HKixBCOQz3hWk0Htik3J/w@public.gmane.org" <pedrom.sousa-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> Subject: RE: [EXT] [PATCH v1 2/3] scsi: ufs: add error handling of auto-hibern8 Date: Tue, 14 May 2019 14:58:22 +0800 [thread overview] Message-ID: <1557817102.24427.20.camel@mtkswgap22> (raw) In-Reply-To: <BN7PR08MB568438668FC7C90A1284F53DDB0F0-7KdolmqvL8eEpBUohhTomJNArRD3w/9+vxpqHgZTriW3zl9H0oFU5g@public.gmane.org> Hi Bean, Thanks so much for review. On Mon, 2019-05-13 at 18:21 +0000, Bean Huo (beanhuo) wrote: > Hi, Stanley > > >+ > >+static inline bool ufshcd_is_auto_hibern8_error(struct ufs_hba *hba, > >+ u32 intr_mask) > >+{ > >+ return (ufshcd_is_auto_hibern8_supported(hba) && > >+ !hba->uic_async_done && > > Here check if uic_async_done is NULL, no big problem so far, but not safe enough. > How about setting a flag in ufshcd_auto_hibern8_enable(), > > I concern about how to compatible with auto_hibern8 disabled condition. Currently auto-hibern8 disabling method is not implemented in mainstream, so an "enabling" flag may looks redundant unless disabling path is really existed. I agree that checking hba->uic_async_done here does not look so intuitive. However even if auto-hibern8 is disabled, these checks could be safe enough because both "UIC_HIBERNATE_ENTER" and "UIC_HIBERNATE_EXIT" are raised only if "manual-hibernate" is performed, and in this case hba->uic_async_done shall be true. Anything else or corner case I missed? > > > //Bean Thanks, Stanley > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: Stanley Chu <stanley.chu@mediatek.com> To: "Bean Huo (beanhuo)" <beanhuo@micron.com> Cc: "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>, "martin.petersen@oracle.com" <martin.petersen@oracle.com>, "marc.w.gonzalez@free.fr" <marc.w.gonzalez@free.fr>, "andy.teng@mediatek.com" <andy.teng@mediatek.com>, "chun-hung.wu@mediatek.com" <chun-hung.wu@mediatek.com>, "kuohong.wang@mediatek.com" <kuohong.wang@mediatek.com>, "evgreen@chromium.org" <evgreen@chromium.org>, "avri.altman@wdc.com" <avri.altman@wdc.com>, "linux-mediatek@lists.infradead.org" <linux-mediatek@lists.infradead.org>, "peter.wang@mediatek.com" <peter.wang@mediatek.com>, "alim.akhtar@samsung.com" <alim.akhtar@samsung.com>, "subhashj@codeaurora.org" <subhashj@codeaurora.org>, "sayalil@codeaurora.org" <sayalil@codeaurora.org>, "pedrom.sousa@synopsys.com" <pedrom.sousa@synopsys.com>, "vivek.gautam@codeaurora.org" <vivek.gautam@codeaurora.org>, "matthias.bgg@gmail.com" <matthias.bgg@gmail.com> Subject: RE: [EXT] [PATCH v1 2/3] scsi: ufs: add error handling of auto-hibern8 Date: Tue, 14 May 2019 14:58:22 +0800 [thread overview] Message-ID: <1557817102.24427.20.camel@mtkswgap22> (raw) In-Reply-To: <BN7PR08MB568438668FC7C90A1284F53DDB0F0@BN7PR08MB5684.namprd08.prod.outlook.com> Hi Bean, Thanks so much for review. On Mon, 2019-05-13 at 18:21 +0000, Bean Huo (beanhuo) wrote: > Hi, Stanley > > >+ > >+static inline bool ufshcd_is_auto_hibern8_error(struct ufs_hba *hba, > >+ u32 intr_mask) > >+{ > >+ return (ufshcd_is_auto_hibern8_supported(hba) && > >+ !hba->uic_async_done && > > Here check if uic_async_done is NULL, no big problem so far, but not safe enough. > How about setting a flag in ufshcd_auto_hibern8_enable(), > > I concern about how to compatible with auto_hibern8 disabled condition. Currently auto-hibern8 disabling method is not implemented in mainstream, so an "enabling" flag may looks redundant unless disabling path is really existed. I agree that checking hba->uic_async_done here does not look so intuitive. However even if auto-hibern8 is disabled, these checks could be safe enough because both "UIC_HIBERNATE_ENTER" and "UIC_HIBERNATE_EXIT" are raised only if "manual-hibernate" is performed, and in this case hba->uic_async_done shall be true. Anything else or corner case I missed? > > > //Bean Thanks, Stanley > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-05-14 6:58 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-13 14:36 [PATCH v1 0/3] scsi: ufs: add error handlings of auto-hibern8 Stanley Chu 2019-05-13 14:36 ` Stanley Chu 2019-05-13 14:36 ` [PATCH v1 1/3] scsi: ufs: do not overwrite auto-hibern8 timer Stanley Chu 2019-05-13 14:36 ` Stanley Chu 2019-05-13 14:36 ` [PATCH v1 2/3] scsi: ufs: add error handling of auto-hibern8 Stanley Chu 2019-05-13 14:36 ` Stanley Chu 2019-05-13 18:21 ` [EXT] " Bean Huo (beanhuo) 2019-05-13 18:21 ` Bean Huo (beanhuo) [not found] ` <BN7PR08MB568438668FC7C90A1284F53DDB0F0-7KdolmqvL8eEpBUohhTomJNArRD3w/9+vxpqHgZTriW3zl9H0oFU5g@public.gmane.org> 2019-05-14 6:58 ` Stanley Chu [this message] 2019-05-14 6:58 ` Stanley Chu 2019-05-14 11:14 ` Bean Huo (beanhuo) 2019-05-14 11:14 ` Bean Huo (beanhuo) 2019-05-15 2:52 ` Stanley Chu 2019-05-15 2:52 ` Stanley Chu [not found] ` <1557758186-18706-1-git-send-email-stanley.chu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> 2019-05-13 14:36 ` [PATCH v1 3/3] scsi: ufs: use re-factored auto_hibern8 function Stanley Chu 2019-05-13 14:36 ` Stanley Chu 2019-05-13 14:51 ` [PATCH v1 0/3] scsi: ufs: add error handlings of auto-hibern8 Marc Gonzalez 2019-05-13 14:51 ` Marc Gonzalez 2019-05-14 6:25 ` Stanley Chu 2019-05-14 6:25 ` Stanley Chu [not found] ` <55818bc4-d464-bb35-25bb-9ef87af8224e-GANU6spQydw@public.gmane.org> 2019-05-20 5:58 ` Avri Altman 2019-05-20 5:58 ` Avri Altman
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=1557817102.24427.20.camel@mtkswgap22 \ --to=stanley.chu-nus5lvnupcjwk0htik3j/w@public.gmane.org \ --cc=alim.akhtar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \ --cc=andy.teng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \ --cc=avri.altman-Sjgp3cTcYWE@public.gmane.org \ --cc=beanhuo-AL4WhLSQfzjQT0dZR+AlfA@public.gmane.org \ --cc=chun-hung.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \ --cc=evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \ --cc=kuohong.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \ --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=marc.w.gonzalez-GANU6spQydw@public.gmane.org \ --cc=martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \ --cc=pedrom.sousa-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \ --cc=peter.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \ --cc=sayalil-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \ --cc=subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.