From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F294419D07B; Tue, 22 Apr 2025 02:15:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745288155; cv=none; b=m92UziP32I9egMDqFM7/gq3O5/4oaxeHc7J3SncXfyDMTFRVh/eiuMh0TyGa6f7EfjohsSmPuggcy2r/jYzw+sR0PuGnyZ/1C9KIQj8BgF2ijVRwwg8KeTqfMyjK9vbZyKIr4OGmLzGDG91ryu7TJb/E1NNvz/NM4B7Hr5o+VFk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745288155; c=relaxed/simple; bh=xuHqTLQebAAopWVn5AUK4tRlpH7mCDuNmspy6Gj3EgQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=M1dIR0LmQCcvrhAOMXY74OpapAw87IwP4Pe8fafh2gX51UFSz2gW1uFl2pxq3wMUucNmV6pj8HIHLQlmwRa5N8XZgA9RluD7MAD59B/qsIxPSJVN1gjbTEyvrVwOviWnUaHztbVWYn8xsvMER6hHYU44OsYq5uulTtVT7UvnZdo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=e6h0Hqb3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="e6h0Hqb3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28F8DC4CEED; Tue, 22 Apr 2025 02:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745288154; bh=xuHqTLQebAAopWVn5AUK4tRlpH7mCDuNmspy6Gj3EgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e6h0Hqb3FDIuv4ZRd+24yCxARKd6x8tTmK8LMVTXJ3DeGsX1D7rbxbLYkKKdIVH+O cENIjaTKJsyH28KwG18xA4X1n2tGSBw9d9FXyDKQK74zCi8fOLxxIWwuZnAl9G8Ogb mhwI48YomlyW1XXVEftU+9cHP2KuhK4HUBAZuD5bcNaVtrbLV9xz4YwlyrWQqQh2yW QDvcUT2SPVTUheUzNOfdJIT/xUydZz0jH6dW44pEk++kCR94fX6cTWtBvu4mPUX3Xv uqPNwG4zirQryDIfGagIxlsNyazgZJf9f+DEtMyGRcAV6GRSrNT14VyzlU8Vk1Hy73 oITtUuOptNd9Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Peter Griffin , Bart Van Assche , "Martin K . Petersen" , Sasha Levin , alim.akhtar@samsung.com, James.Bottomley@HansenPartnership.com, krzk@kernel.org, linux-scsi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 6.14 02/30] scsi: ufs: exynos: Ensure pre_link() executes before exynos_ufs_phy_init() Date: Mon, 21 Apr 2025 22:15:22 -0400 Message-Id: <20250422021550.1940809-2-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250422021550.1940809-1-sashal@kernel.org> References: <20250422021550.1940809-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.14.3 Content-Transfer-Encoding: 8bit From: Peter Griffin [ Upstream commit 3d101165e72316775947d71321d97194f03dfef3 ] Ensure clocks are enabled before configuring unipro. Additionally move the pre_link() hook before the exynos_ufs_phy_init() calls. This means the register write sequence more closely resembles the ordering of the downstream driver. Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20250319-exynos-ufs-stability-fixes-v2-1-96722cc2ba1b@linaro.org Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/ufs/host/ufs-exynos.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 13dd5dfc03eb3..cd750786187cd 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1049,9 +1049,14 @@ static int exynos_ufs_pre_link(struct ufs_hba *hba) exynos_ufs_config_intr(ufs, DFES_DEF_L4_ERRS, UNIPRO_L4); exynos_ufs_set_unipro_pclk_div(ufs); + exynos_ufs_setup_clocks(hba, true, PRE_CHANGE); + /* unipro */ exynos_ufs_config_unipro(ufs); + if (ufs->drv_data->pre_link) + ufs->drv_data->pre_link(ufs); + /* m-phy */ exynos_ufs_phy_init(ufs); if (!(ufs->opts & EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR)) { @@ -1059,11 +1064,6 @@ static int exynos_ufs_pre_link(struct ufs_hba *hba) exynos_ufs_config_phy_cap_attr(ufs); } - exynos_ufs_setup_clocks(hba, true, PRE_CHANGE); - - if (ufs->drv_data->pre_link) - ufs->drv_data->pre_link(ufs); - return 0; } -- 2.39.5