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 9B0EC211A0B; Tue, 29 Apr 2025 17:07:28 +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=1745946448; cv=none; b=On2xY0NPrE06Bta+70vaT7HrOqKYRdOUYvI54DRMBylWhxrRY84XPbJCLidWUZR5ORujr8S/lWMgcsFJBesFT/ctgeJkV/6Oo4wYs00mAMMXDallfjRIbSpJ+MzpaJTJChFNJuY9GZ19RllKOWH+pD3PSX0GVYzAaYCubFkMvIU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745946448; c=relaxed/simple; bh=Y21z6VkR9fCw4LN9kCQeS8E6KlGBC9PcPC4vjduyXs0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CRLg/pLLMKWqpvsvNDjLr+9qgifWoiC5S5cpw/HGcNmNYdCHvPOr5Mu/uydDdYTFfeEw9r2tZfJgwscRBPU1r1KOMMwOTFtcfUUv4KLOS58YkjdVsQF8rHbgH3jsH9UnXWA2lA+Q1DxEIADizsVLUpf16x8Xc3PJT5+2Hk0ahDE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=W6d5kC9R; 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="W6d5kC9R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22765C4CEE3; Tue, 29 Apr 2025 17:07:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745946448; bh=Y21z6VkR9fCw4LN9kCQeS8E6KlGBC9PcPC4vjduyXs0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W6d5kC9RuwTAS8FKGFxumFR93c7P2dcPl4SxTpuzXPwMYQwVX9db0O1bM9AU0jW+A K4V+2IHO5o7Lj5Til0iDN4qkQS7GwNYfNWBzJ0gIThwqnDSEyR+EkoyXMzPC7zbrXb y6zkfV3Gs3rL92pM+DT6KkemMNaMmOvk2Jmi+aMU= 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.14 270/311] scsi: ufs: exynos: Ensure pre_link() executes before exynos_ufs_phy_init() Date: Tue, 29 Apr 2025 18:41:47 +0200 Message-ID: <20250429161132.084723021@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161121.011111832@linuxfoundation.org> References: <20250429161121.011111832@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-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 5ea3f9beb1bd9..e77b3c63e6981 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1060,9 +1060,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)) { @@ -1070,11 +1075,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