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 4F4241C6B4; Tue, 29 Apr 2025 17:37:19 +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=1745948239; cv=none; b=ipgmNSH70eouqDgieSToOhbJZ4iuS4eL/Mx5+OSn6lxZnOdWC8zJYvczb3VbMBYa4TT6ymcuVfm/JDnYK2wU3dZXI4C8gfctc+beg93UAruC2RMUlTuOsht4Uy299XOxlbq7U+0Fwk7iuE8c9bXG7DSoRxytA21Iv1CQrsfYWeg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745948239; c=relaxed/simple; bh=HdxEU6Qe3xApl1z4Aki58f7GGo+TboiCD7KHt0wBc6s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H+86pfqN2rQZN05inJW6GYXc4qdmDFYIIAQZJrNn7NoFfx4OLse9hXeYMIdozc0KnYhCPN5PbRGjffqBClIXsxwgrK3AmI8qm7f7Bh7qQkmpZyZe9ojkoM0A/nwKUSENpWH5hZYf+hL92exg4ptJ58c/lkAPzfcqU6LDZtzusU4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2mej8j+Y; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="2mej8j+Y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C82A4C4CEE3; Tue, 29 Apr 2025 17:37:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745948239; bh=HdxEU6Qe3xApl1z4Aki58f7GGo+TboiCD7KHt0wBc6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2mej8j+YwJqniZzE7BBOcrK//q3oYCK86Hwr6PPhplajsgRgPG94sKKKBaF1/5LyW ywZFSfoKRD7GIPBsdQDar2ZmPrtc8H2AH7AcYMmd5e02CRY2zUT2bvbGgXPw1CbGVf hEY6DR6Rku4LT9dXtmSUZh+0JnjnddKyiBzpch9g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Peter Griffin , Bart Van Assche , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 6.12 229/280] scsi: ufs: exynos: Ensure pre_link() executes before exynos_ufs_phy_init() Date: Tue, 29 Apr 2025 18:42:50 +0200 Message-ID: <20250429161124.492441398@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161115.008747050@linuxfoundation.org> References: <20250429161115.008747050@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ 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 fd1ebb4fcd96c..75bb0ff07b07e 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1028,9 +1028,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)) { @@ -1038,11 +1043,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