From: Stanley Chu <stanley.chu@mediatek•com>
To: <linux-scsi@vger•kernel.org>, <martin.petersen@oracle•com>,
<avri.altman@wdc•com>, <alim.akhtar@samsung•com>,
<jejb@linux•ibm.com>, <asutoshd@codeaurora•org>
Cc: bvanassche@acm•org, andy.teng@mediatek•com, cc.chou@mediatek•com,
chun-hung.wu@mediatek•com, kuohong.wang@mediatek•com,
linux-kernel@vger•kernel.org, cang@codeaurora•org,
linux-mediatek@lists•infradead.org, peter.wang@mediatek•com,
matthias.bgg@gmail•com, Stanley Chu <stanley.chu@mediatek•com>,
chaotian.jing@mediatek•com, linux-arm-kernel@lists•infradead.org,
beanhuo@micron•com
Subject: [PATCH v1 1/2] scsi: ufs: Add DELAY_BEFORE_LPM quirk for Micron devices
Date: Wed, 10 Jun 2020 13:36:44 +0800 [thread overview]
Message-ID: <20200610053645.19975-2-stanley.chu@mediatek.com> (raw)
In-Reply-To: <20200610053645.19975-1-stanley.chu@mediatek.com>
It is confirmed that Micron device needs DELAY_BEFORE_LPM
quirk to have a delay before VCC is powered off. So add Micron
vendor ID and this quirk for Micron devices.
Signed-off-by: Stanley Chu <stanley.chu@mediatek•com>
---
drivers/scsi/ufs/ufs_quirks.h | 1 +
drivers/scsi/ufs/ufshcd.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/scsi/ufs/ufs_quirks.h b/drivers/scsi/ufs/ufs_quirks.h
index e3175a63c676..e80d5f26a442 100644
--- a/drivers/scsi/ufs/ufs_quirks.h
+++ b/drivers/scsi/ufs/ufs_quirks.h
@@ -12,6 +12,7 @@
#define UFS_ANY_VENDOR 0xFFFF
#define UFS_ANY_MODEL "ANY_MODEL"
+#define UFS_VENDOR_MICRON 0x12C
#define UFS_VENDOR_TOSHIBA 0x198
#define UFS_VENDOR_SAMSUNG 0x1CE
#define UFS_VENDOR_SKHYNIX 0x1AD
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 04b79ca66fdf..dea4fddf9332 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -216,6 +216,8 @@ ufs_get_desired_pm_lvl_for_dev_link_state(enum ufs_dev_pwr_mode dev_state,
static struct ufs_dev_fix ufs_fixups[] = {
/* UFS cards deviations table */
+ UFS_FIX(UFS_VENDOR_MICRON, UFS_ANY_MODEL,
+ UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM),
UFS_FIX(UFS_VENDOR_SAMSUNG, UFS_ANY_MODEL,
UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM),
UFS_FIX(UFS_VENDOR_SAMSUNG, UFS_ANY_MODEL,
--
2.18.0
_______________________________________________
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:[~2020-06-10 5:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 5:36 [PATCH v1 0/2] scsi: ufs: Fix and cleanup device quirk Stanley Chu
2020-06-10 5:36 ` Stanley Chu [this message]
2020-06-10 9:06 ` [PATCH v1 1/2] scsi: ufs: Add DELAY_BEFORE_LPM quirk for Micron devices Bean Huo
2020-06-10 5:36 ` [PATCH v1 2/2] scsi: ufs: Cleanup device vendor and quirk definition Stanley Chu
2020-06-11 15:34 ` Alim Akhtar
2020-06-12 1:27 ` Stanley Chu
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=20200610053645.19975-2-stanley.chu@mediatek.com \
--to=stanley.chu@mediatek$(echo .)com \
--cc=alim.akhtar@samsung$(echo .)com \
--cc=andy.teng@mediatek$(echo .)com \
--cc=asutoshd@codeaurora$(echo .)org \
--cc=avri.altman@wdc$(echo .)com \
--cc=beanhuo@micron$(echo .)com \
--cc=bvanassche@acm$(echo .)org \
--cc=cang@codeaurora$(echo .)org \
--cc=cc.chou@mediatek$(echo .)com \
--cc=chaotian.jing@mediatek$(echo .)com \
--cc=chun-hung.wu@mediatek$(echo .)com \
--cc=jejb@linux$(echo .)ibm.com \
--cc=kuohong.wang@mediatek$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mediatek@lists$(echo .)infradead.org \
--cc=linux-scsi@vger$(echo .)kernel.org \
--cc=martin.petersen@oracle$(echo .)com \
--cc=matthias.bgg@gmail$(echo .)com \
--cc=peter.wang@mediatek$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox