From: "Grant Jung" <grant.jung@samsung.com>
To: "'Avri Altman'" <Avri.Altman@wdc.com>,
"'Kiwoong Kim'" <kwmad.kim@samsung.com>,
<linux-scsi@vger.kernel.org>, <alim.akhtar@samsung.com>,
<jejb@linux.ibm.com>, <martin.petersen@oracle.com>,
<beanhuo@micron.com>, <asutoshd@codeaurora.org>,
<cang@codeaurora.org>, <bvanassche@acm.org>, <sc.suh@samsung.com>,
<hy50.seo@samsung.com>, <sh425.lee@samsung.com>
Subject: RE: [RFC PATCH v3 1/2] ufs: support various values per device
Date: Mon, 6 Jul 2020 20:35:01 +0900 [thread overview]
Message-ID: <478701d65389$7c936df0$75ba49d0$@samsung.com> (raw)
In-Reply-To: <SN6PR04MB464046C39B0B2AC5E36A7BF5FC680@SN6PR04MB4640.namprd04.prod.outlook.com>
> > Respective UFS devices have their own characteristics and many of them
> > could be a form of numbers, such as timeout and a number of retires.
> > This introduces the way to set those things per specific device vendor
> > or specific device.
> >
> > I wrote this like the style of ufs_fixups stuffs.
> >
> > Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com>
> This patch legitimize quirks of all kinds and shapes.
> I am not sure that we should allow it.
>
>
> > ---
> > drivers/scsi/ufs/ufs_quirks.h | 13 +++++++++++++
> > drivers/scsi/ufs/ufshcd.c | 39
> > +++++++++++++++++++++++++++++++++++++++
> > drivers/scsi/ufs/ufshcd.h | 1 +
> > 3 files changed, 53 insertions(+)
> >
> > diff --git a/drivers/scsi/ufs/ufs_quirks.h
> > b/drivers/scsi/ufs/ufs_quirks.h index 2a00414..f074093 100644
> > --- a/drivers/scsi/ufs/ufs_quirks.h
> > +++ b/drivers/scsi/ufs/ufs_quirks.h
> > @@ -29,6 +29,19 @@ struct ufs_dev_fix {
> > unsigned int quirk;
> > };
> >
> > +enum dev_val_type {
> > + DEV_VAL_FDEVICEINIT = 0x0,
>
> /* keep last */
> > + DEV_VAL_NUM,
> > +};
> > +
> > +struct ufs_dev_value {
> > + u16 wmanufacturerid;
> > + u8 *model;
> > + u32 key;
> > + u32 val;
> > + bool enable;
> > +};
> > +
> > #define END_FIX { }
> >
> > /* add specific device quirk */
> > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> > index 52abe82..b26f182 100644
> > --- a/drivers/scsi/ufs/ufshcd.c
> > +++ b/drivers/scsi/ufs/ufshcd.c
> > @@ -207,6 +207,21 @@ static struct ufs_dev_fix ufs_fixups[] = {
> > END_FIX
> > };
> >
> > +static const struct ufs_dev_value ufs_dev_values[] = {
> > + {0, 0, 0, 0, false},
> > +};
> > +
> > +static inline bool
> > +ufs_get_dev_specific_value(struct ufs_hba *hba,
> > + enum dev_val_type type, u32 *val) {
> If (ARRAY_SIZE(ufs_dev_values) <= type)
> return false;
>
>
> Thanks,
> Avri
There is no specification for fdeviceinit timeout value like eMMC CMD1 which is 1s.
Usually this value is small but can be increased under some abnormal situation like SPO(fdeviceinit after Sudden Power Off).
I think that 1000 retries take less than 1 second but it is inaccurate and not enough. Some UFS vendor wants 1.5s.
Moreover, the latency of resuming ufs driver can be dependent on this value when vcc and vccq is off during suspend.
So it's bad to set with big value to apply all UFS devices.
I wonder quirk is needed for that.
BR
Grant
next prev parent reply other threads:[~2020-07-06 11:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200703053755epcas2p23adbc614d9a72cf3335ed1e6223709f3@epcas2p2.samsung.com>
2020-07-03 5:30 ` [RFC PATCH v3 0/2] ufs: support various values per device Kiwoong Kim
2020-07-03 5:30 ` [RFC PATCH v3 1/2] " Kiwoong Kim
2020-07-05 11:14 ` Avri Altman
2020-07-06 11:35 ` Grant Jung [this message]
2020-07-15 8:03 ` Kiwoong Kim
2020-07-05 15:07 ` Bart Van Assche
2020-07-06 6:43 ` Kiwoong Kim
2020-07-06 17:52 ` Bart Van Assche
2020-07-03 5:30 ` [RFC PATCH v3 2/2] ufs: change the way to complete fDeviceInit Kiwoong Kim
2020-07-05 10:53 ` Avri Altman
2020-07-15 8:09 ` Kiwoong Kim
2020-07-19 6:46 ` 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='478701d65389$7c936df0$75ba49d0$@samsung.com' \
--to=grant.jung@samsung.com \
--cc=Avri.Altman@wdc.com \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=hy50.seo@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sc.suh@samsung.com \
--cc=sh425.lee@samsung.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 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.