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 A71A240C03; Tue, 29 Apr 2025 18:07:29 +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=1745950049; cv=none; b=PZymUVdYwtQ1QXejg5mRoDjTaqGqGKbk6y/rW/V0YFDliJ7qEOyOwUc0WjPokXZ0VAig5WdE/dO2O81+YsyqdddIa2KnLIA5fMztZV1aYqiZEElI88kcrlnWm48jBOG8IIz02eznO02ELVC3V8TUNLdlMjWYZrV7bqQ3inwRwLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745950049; c=relaxed/simple; bh=3No4+HEVOzxop8r2VsoemUBMqwYHEWo4roGS2cuw7eg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MKzbayrb+dWbJz+Rc+k8VraURx9Z+t90DSlOCTxWtMT4Sgpaq9mDxpkqxQG5wMmuZ+xau1bqW355JRc9hFJ7YOIfVO/mPKIi/xXqXJpUQtkdBKjl5GS4+Yw+Uz5JPrVuwtK/XQ89nTeKQLN18zgf7szT+YeiWzsZjR+SWdP+oTg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oxejFi67; 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="oxejFi67" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16F09C4CEE3; Tue, 29 Apr 2025 18:07:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745950049; bh=3No4+HEVOzxop8r2VsoemUBMqwYHEWo4roGS2cuw7eg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oxejFi67bjUf9kpcFdBoOUtwI5cch1le0eorTrYdBWZoVA4B3PX7m9Wkevwxz/KVw 625AYh+HWwRBDmfQuuAJcQV7tfTklXog4XLGpOIhAaB1Ew3czzPktE5p5Gl3ycAZkm nPF4eh3fZpMNJLUDdUB+4ZN14N1+oGEYnZwyMwwk= 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.1 141/167] scsi: ufs: exynos: Ensure pre_link() executes before exynos_ufs_phy_init() Date: Tue, 29 Apr 2025 18:44:09 +0200 Message-ID: <20250429161057.433699801@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161051.743239894@linuxfoundation.org> References: <20250429161051.743239894@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.1-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 064829640c187..e981f1f8805f2 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -990,9 +990,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)) { @@ -1000,11 +1005,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