Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30632c34 authored by Can Guo's avatar Can Guo
Browse files

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.

Change-Id: I27e1ce00acc171c7c111dc3073ecdb23bd509851
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 0070b55b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 *
 * This code is based on drivers/scsi/ufs/ufshcd.c
 * Copyright (C) 2011-2013 Samsung India Software Operations
 * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
 *
 * Authors:
 *	Santosh Yaraganavi <santosh.sy@samsung.com>
@@ -5267,7 +5267,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;
}