Skip to contentSkip to conversation

scsi: ufs: Don't update urgent bkops level when toggle auto bkops

PATCH Applied Can Guo 3 participants 3 messages May 28, 2020 – Jun 3, 2020 SCSI

lore
Share & tools
lore

Can Guo

author
#0 lore raw

PATCH 1/1 scsi: ufs: Don't update urgent bkops level when toggle auto bkops

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")
---
 drivers/scsi/ufs/ufshcd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/ufs/ufshcd.c +0 -1
index 1827b57..178322e 100644
@@ -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;
 }
Signature · 1 line
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Can Guo

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")
---
 drivers/scsi/ufs/ufshcd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/ufs/ufshcd.c +0 -0
index 1827b57..178322e 100644

drivers/scsi/ufs/ufshcd.c static int ufshcd_bkops_ctrl(struct ufs_hba *hba, · line 5138

Quoted 7 lines
drivers/scsi/ufs/ufshcd.c +0 -1
@@ -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;
 }
#2 lore raw
In reply to Can Guo
Quoted 6 lines · Can Guo

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
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering