diff mbox series

[v2,4/4] scsi: ufs-mediatek: customize WriteBooster flush policy

Message ID 20200509093716.21010-5-stanley.chu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series scsi: ufs: allow customizable WriteBooster flush policy | expand

Commit Message

Stanley Chu May 9, 2020, 9:37 a.m. UTC
Change the WriteBooster policy to keep VCC on during
runtime suspend if available WriteBooster buffer is less
than 80%.

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
---
 drivers/scsi/ufs/ufs-mediatek.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Asutosh Das (asd) May 12, 2020, 2:19 a.m. UTC | #1
On 5/9/2020 2:37 AM, Stanley Chu wrote:
> Change the WriteBooster policy to keep VCC on during
> runtime suspend if available WriteBooster buffer is less
> than 80%.
> 
> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
> ---
>   drivers/scsi/ufs/ufs-mediatek.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
> index 56620f7d88ce..94e97701f456 100644
> --- a/drivers/scsi/ufs/ufs-mediatek.c
> +++ b/drivers/scsi/ufs/ufs-mediatek.c
> @@ -271,6 +271,7 @@ static int ufs_mtk_init(struct ufs_hba *hba)
>   
>   	/* Enable WriteBooster */
>   	hba->caps |= UFSHCD_CAP_WB_EN;
> +	hba->vps->wb_flush_threshold = UFS_WB_BUF_REMAIN_PERCENT(80);
>   
>   	/*
>   	 * ufshcd_vops_init() is invoked after
> 

Patchset looks good to me.

Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Martin K. Petersen May 12, 2020, 4:21 p.m. UTC | #2
Hi Asutosh!

> Patchset looks good to me.
>
> Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>

When you want to approve an entire series, please respond to the cover
letter email. Otherwise the kernel.org tooling will only record the tag
for the individual patch you are responding to. In this case only patch
4 got tagged as reviewed in patchwork.
Asutosh Das (asd) May 12, 2020, 6:10 p.m. UTC | #3
On 5/12/2020 9:21 AM, Martin K. Petersen wrote:
> 
> Hi Asutosh!
> 
>> Patchset looks good to me.
>>
>> Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
> 
> When you want to approve an entire series, please respond to the cover
> letter email. Otherwise the kernel.org tooling will only record the tag
> for the individual patch you are responding to. In this case only patch
> 4 got tagged as reviewed in patchwork.
> 

Hi Martin
Sure - I'll keep this in mind.

Thanks,
Asutosh
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index 56620f7d88ce..94e97701f456 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -271,6 +271,7 @@  static int ufs_mtk_init(struct ufs_hba *hba)
 
 	/* Enable WriteBooster */
 	hba->caps |= UFSHCD_CAP_WB_EN;
+	hba->vps->wb_flush_threshold = UFS_WB_BUF_REMAIN_PERCENT(80);
 
 	/*
 	 * ufshcd_vops_init() is invoked after