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

Commit 1d3820e5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: fix order of pm_runtime_get_sync and ufshcd_hold_all calls"

parents 5934952d 5201fabc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -913,12 +913,12 @@ static int ufsdbg_host_regs_show(struct seq_file *file, void *data)
{
	struct ufs_hba *hba = (struct ufs_hba *)file->private;

	ufshcd_hold(hba, false);
	pm_runtime_get_sync(hba->dev);
	ufshcd_hold(hba, false);
	ufsdbg_pr_buf_to_std(hba, 0, UFSHCI_REG_SPACE_SIZE / sizeof(u32),
				"host regs", file);
	pm_runtime_put_sync(hba->dev);
	ufshcd_release(hba, false);
	pm_runtime_put_sync(hba->dev);
	return 0;
}

+4 −4
Original line number Diff line number Diff line
@@ -172,11 +172,11 @@ static int ufs_qcom_dbg_testbus_bus_read(void *data, u64 *attr_val)
	if (!host)
		return -EINVAL;

	ufshcd_hold(host->hba, false);
	pm_runtime_get_sync(host->hba->dev);
	ufshcd_hold(host->hba, false);
	*attr_val = (u64)ufshcd_readl(host->hba, UFS_TEST_BUS);
	pm_runtime_put_sync(host->hba->dev);
	ufshcd_release(host->hba, false);
	pm_runtime_put_sync(host->hba->dev);
	return 0;
}

@@ -191,8 +191,8 @@ static int ufs_qcom_dbg_dbg_regs_show(struct seq_file *file, void *data)
	bool dbg_print_reg = !!(host->dbg_print_en &
				UFS_QCOM_DBG_PRINT_REGS_EN);

	ufshcd_hold(host->hba, false);
	pm_runtime_get_sync(host->hba->dev);
	ufshcd_hold(host->hba, false);

	/* Temporarily override the debug print enable */
	host->dbg_print_en |= UFS_QCOM_DBG_PRINT_REGS_EN;
@@ -201,8 +201,8 @@ static int ufs_qcom_dbg_dbg_regs_show(struct seq_file *file, void *data)
	if (!dbg_print_reg)
		host->dbg_print_en &= ~UFS_QCOM_DBG_PRINT_REGS_EN;

	pm_runtime_put_sync(host->hba->dev);
	ufshcd_release(host->hba, false);
	pm_runtime_put_sync(host->hba->dev);

	return 0;
}
+2 −3
Original line number Diff line number Diff line
@@ -1752,9 +1752,9 @@ int ufs_qcom_testbus_config(struct ufs_qcom_host *host)
	 */
	}
	mask <<= offset;
	ufshcd_hold(host->hba, false);

	pm_runtime_get_sync(host->hba->dev);
	ufshcd_hold(host->hba, false);
	ufshcd_rmwl(host->hba, TEST_BUS_SEL,
		    (u32)host->testbus.select_major << 19,
		    REG_UFS_CFG1);
@@ -1762,9 +1762,8 @@ int ufs_qcom_testbus_config(struct ufs_qcom_host *host)
		    (u32)host->testbus.select_minor << offset,
		    reg);
	ufs_qcom_enable_test_bus(host);

	pm_runtime_put_sync(host->hba->dev);
	ufshcd_release(host->hba, false);
	pm_runtime_put_sync(host->hba->dev);

	return 0;
}