linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] scsi: ufs: Don't update urgent bkops level when toggle auto bkops
@ 2020-05-28  2:24 Can Guo
  2020-05-28  6:32 ` Stanley Chu
  2020-06-03  2:31 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Can Guo @ 2020-05-28  2:24 UTC (permalink / raw)
  To: asutoshd, nguyenb, hongwus, rnayak, linux-scsi, kernel-team,
	saravanak, salyzyn, cang
  Cc: Alim Akhtar, Avri Altman, James E.J. Bottomley,
	Martin K. Petersen, Stanley Chu, Bean Huo, Bart Van Assche,
	Tomas Winkler, open list

Urgent bkops level is used to compare against actual bkops status read
from UFS device. Urgent bkops level is set during initialization and might
be updated in exception event handler during runtime, but it should not be
updated to the actual bkops status every time when auto bkops is toggled.
Otherwise, if urgent bkops level is updated to 0, auto bkops shall always
be kept enabled.

Fixes: 24366c2afbb0 ("scsi: ufs: Recheck bkops level if bkops is disabled")
Signed-off-by: Can Guo <cang@codeaurora.org>
---
 drivers/scsi/ufs/ufshcd.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 1827b57..178322e 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -5133,7 +5133,6 @@ static int ufshcd_bkops_ctrl(struct ufs_hba *hba,
 		err = ufshcd_enable_auto_bkops(hba);
 	else
 		err = ufshcd_disable_auto_bkops(hba);
-	hba->urgent_bkops_lvl = curr_status;
 out:
 	return err;
 }
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] scsi: ufs: Don't update urgent bkops level when toggle auto bkops
  2020-05-28  2:24 [PATCH v1 1/1] scsi: ufs: Don't update urgent bkops level when toggle auto bkops Can Guo
@ 2020-05-28  6:32 ` Stanley Chu
  2020-06-03  2:31 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Stanley Chu @ 2020-05-28  6:32 UTC (permalink / raw)
  To: Can Guo
  Cc: stanley.chu, asutoshd, nguyenb, hongwus, rnayak, linux-scsi,
	kernel-team, saravanak, salyzyn, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, Bean Huo,
	Bart Van Assche, Tomas Winkler, open list

On Wed, 2020-05-27 at 19:24 -0700, Can Guo wrote:
> Urgent bkops level is used to compare against actual bkops status read
> from UFS device. Urgent bkops level is set during initialization and might
> be updated in exception event handler during runtime, but it should not be
> updated to the actual bkops status every time when auto bkops is toggled.
> Otherwise, if urgent bkops level is updated to 0, auto bkops shall always
> be kept enabled.
> 
> Fixes: 24366c2afbb0 ("scsi: ufs: Recheck bkops level if bkops is disabled")
> Signed-off-by: Can Guo <cang@codeaurora.org>
> ---
>  drivers/scsi/ufs/ufshcd.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 1827b57..178322e 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -5133,7 +5133,6 @@ static int ufshcd_bkops_ctrl(struct ufs_hba *hba,
>  		err = ufshcd_enable_auto_bkops(hba);
>  	else
>  		err = ufshcd_disable_auto_bkops(hba);
> -	hba->urgent_bkops_lvl = curr_status;
>  out:
>  	return err;
>  }

Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] scsi: ufs: Don't update urgent bkops level when toggle auto bkops
  2020-05-28  2:24 [PATCH v1 1/1] scsi: ufs: Don't update urgent bkops level when toggle auto bkops Can Guo
  2020-05-28  6:32 ` Stanley Chu
@ 2020-06-03  2:31 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-06-03  2:31 UTC (permalink / raw)
  To: hongwus, saravanak, rnayak, kernel-team, linux-scsi, nguyenb,
	asutoshd, salyzyn, Can Guo
  Cc: Martin K . Petersen, Bean Huo, open list, James E.J. Bottomley,
	Alim Akhtar, Avri Altman, Bart Van Assche, Tomas Winkler,
	Stanley Chu

On Wed, 27 May 2020 19:24:42 -0700, Can Guo wrote:

> Urgent bkops level is used to compare against actual bkops status read
> from UFS device. Urgent bkops level is set during initialization and might
> be updated in exception event handler during runtime, but it should not be
> updated to the actual bkops status every time when auto bkops is toggled.
> Otherwise, if urgent bkops level is updated to 0, auto bkops shall always
> be kept enabled.

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: ufs: Don't update urgent bkops level when toggling auto bkops
      https://git.kernel.org/mkp/scsi/c/be32acff4380

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-03  2:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28  2:24 [PATCH v1 1/1] scsi: ufs: Don't update urgent bkops level when toggle auto bkops Can Guo
2020-05-28  6:32 ` Stanley Chu
2020-06-03  2:31 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).