lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 18 Apr 2021 10:21:50 +0300
From:   Avri Altman <avri.altman@....com>
To:     "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, Adrian Hunter <adrian.hunter@...el.com>
Cc:     linux-kernel@...r.kernel.org, Avri Altman <avri.altman@....com>,
        Alex Lemberg <alex.lemberg@....com>
Subject: [PATCH] scsi: ufs: Check for bkops in runtime suspend

The UFS driver allowed BKOPS and WB Flush operations to be completed on
Runtime suspend. Adding the DeepSleep support, this is no longer true:
the driver will ignore BKOPS and WB Flush states, and force a link state
transition to UIC_LINK_OFF_STATE.

Do not ignore BKOPS and WB Flush on runtme suspend flow.

fixes: fe1d4c2ebcae (scsi: ufs: Add DeepSleep feature)

Suggested-by: Alex Lemberg <alex.lemberg@....com>
Signed-off-by: Avri Altman <avri.altman@....com>
---
 drivers/scsi/ufs/ufshcd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 58d7f264c664..1a0cac670aba 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -8755,7 +8755,8 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
 	 * In the case of DeepSleep, the device is expected to remain powered
 	 * with the link off, so do not check for bkops.
 	 */
-	check_for_bkops = !ufshcd_is_ufs_dev_deepsleep(hba);
+	check_for_bkops = !ufshcd_is_ufs_dev_deepsleep(hba) ||
+			  hba->dev_info.b_rpm_dev_flush_capable;
 	ret = ufshcd_link_state_transition(hba, req_link_state, check_for_bkops);
 	if (ret)
 		goto set_dev_active;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ