From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796379998; b=1LA/8qQLxLgOVV747M+74lmhy2oQhF6qjxGTNmTX9hhm7DWqgMYYhte93tPw4rZI150H 4eGbihASQSb1joLK2Jl1hxOl27tS2BChclWsfyiyks6Bb8ZywPEUrZsItbNKQ3a2v5SOb pWGjAZ7K+xAFGrkJUj6NbVXalmzEL9Yafm+LlsXsxjMUyhWDKdaYg0RD09qKx6f/tqyp0 vFEGOLFdwOZX7KAilA79TBb2xH9VXH85WOeFGt8gyBdJ91MV8e8hAcX26446VE0tAmAYV OMDN7OWMLYksqHZ+FIaajfTSDajPt7PGvJtDA22lXvbUhuZ03EMmSk92fecueJaaOTg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796379998; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=fvPzeEq1MgwI4fZcmRgndiYyV1vBrtOufLYHjv5YSEk=; b=Q7+Zn6/QMG29fZ0uHuTlWTLEYBSaaOVtqQGvC3liS0Yv/Q4X6dNq1IcUwNcN/r9Oufbf hyRtbWSGqGkBO7lUo4qukUj7I0ryIQUCNDV++3ITIon6mnBpWQ6HUsor1KG5OtNWPl+oY mzk3YxfnDB+uUnIgMTfsl3Z4Oy0oYYPbydvafn51WHvDDt5vKLlnQL3OUH7uBE432nDpT HydT4NEw/sg5lR/Mt3g1fIMPwTPqBm/AlSHWhWr2m/ukja53Ac+Ktm8YsOzdA0Pr7TLZt wOcIgsl7uc708kRoZAo2ypitrMrk3UZkNxDUgfFIoJopSWcsugAVcmbEPj1CYJwRvUQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=akv+1rrC; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CD08606A322; Fri, 4 Dec 2026 10:26:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=akv+1rrC Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97DE51F000CE; Fri, 4 Dec 2026 10:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796379998; bh=fvPzeEq1MgwI4fZcmRgndiYyV1vBrtOufLYHjv5YSEk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=akv+1rrCfp+iDfVoMlWfzFkkQYCzwB4Gn42qiApMmsXyyOC39V9FOlnMxVWzy3g2q PABJkAr4HsybKi6r3zZOdHQ2c7JyxUc4eClz6JlG7g6zg1ZiGoIE0Ho/l3qwiZS6xm tUfo9D7bBbeGSCt4LBEr9BblbdzPcs2FQ4E1G0KA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Michael Burch , Manivannan Sadhasivam , Vinod Koul , Sasha Levin Subject: [PATCH 7.3 083/742] Revert "phy: qcom: qmp-pcie: Skip PHY reset if already up" Date: Fri, 4 Dec 2026 18:59:07 +0900 Message-ID: <20261204100637.315302498@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Burch [ Upstream commit 9a07dfa7f6fe34e230de183c02a8180529091649 ] This reverts commit 910b828b22b7b91054b3bd4be676a017444b0e00. That commit skips the no-csr reset assert/deassert (and the 200-300us settle) whenever the bootloader already brought the PCIe QMP PHY up: skip_reset = qmp->skip_init && !qphy_checkbits(pcs, cfg->regs[QPHY_PCS_STATUS], cfg->phy_status); and states its own assumption explicitly: "This relies on the assumption that when skip_init is enabled and the PHY is reported as up, the bootloader has already configured the PHY correctly and the link is in a usable state." That assumption does not hold on the Dell XPS 13 9345 (X1E80100). UEFI boots from the NVMe behind pcie6a, so the PHY is always already started when Linux takes over, skip_init is true, and the reset is skipped. The link then never retrains and the root port comes up with no endpoint: qcom-pcie 1bf8000.pcie: Device found, but not active pci 0006:00:00.0: [17cb:0111] type 01 class 0x060400 PCIe Root Port (no 0006:01:00.0, no nvme at all) "Device found, but not active" is dw_pcie_wait_for_link() reporting LTSSM stuck in POLL.Active/POLL.Compliance -- receiver detected, training never completes -- so the machine cannot find its root filesystem and drops to a dracut emergency shell. v7.2 is unaffected because it always performed the reset. The commit was applied on its own as patch 1/4 of "PCI: qcom: Add link retention support"; 2/4-4/4 have not landed. Without them, qcom_pcie_host_init() still asserts PERST# and resets the controller before qcom_pcie_phy_power_on(), so the link is down while QPHY_PCS_STATUS still reports the bootloader's state, and the skip's precondition never holds. Revert it until the rest of the series lands. Fixes: 910b828b22b7 ("phy: qcom: qmp-pcie: Skip PHY reset if already up") Signed-off-by: Michael Burch Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20261013-qmp-pcie-skip-reset-revert-v1@michaelburch.net Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 31 ++++++++---------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index da83358c97ead..17c53ae62fac7 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -5677,7 +5677,6 @@ static int qmp_pcie_init(struct phy *phy) struct qmp_pcie *qmp = phy_get_drvdata(phy); const struct qmp_phy_cfg *cfg = qmp->cfg; void __iomem *pcs = qmp->pcs; - bool skip_reset; int ret; /* @@ -5693,9 +5692,6 @@ static int qmp_pcie_init(struct phy *phy) qphy_checkbits(pcs, cfg->regs[QPHY_START_CTRL], SERDES_START | PCS_START) && qphy_checkbits(pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], cfg->pwrdn_ctrl); - skip_reset = qmp->skip_init && !qphy_checkbits(pcs, cfg->regs[QPHY_PCS_STATUS], - cfg->phy_status); - if (!qmp->skip_init && !cfg->tbls.serdes_num) { dev_err(qmp->dev, "Init sequence not available\n"); return -ENODATA; @@ -5719,16 +5715,14 @@ static int qmp_pcie_init(struct phy *phy) } } - if (!skip_reset) { - ret = reset_control_assert(qmp->nocsr_reset); - if (ret) { - dev_err(qmp->dev, "no-csr reset assert failed\n"); - goto err_assert_reset; - } - - usleep_range(200, 300); + ret = reset_control_assert(qmp->nocsr_reset); + if (ret) { + dev_err(qmp->dev, "no-csr reset assert failed\n"); + goto err_assert_reset; } + usleep_range(200, 300); + if (!qmp->skip_init) { ret = reset_control_bulk_deassert(cfg->num_resets, qmp->resets); if (ret) { @@ -5777,11 +5771,8 @@ static int qmp_pcie_power_on(struct phy *phy) void __iomem *pcs = qmp->pcs; void __iomem *status; unsigned int mask, val; - bool skip_reset; int ret; - skip_reset = qmp->skip_init && !qphy_checkbits(pcs, cfg->regs[QPHY_PCS_STATUS], - cfg->phy_status); /* * Write CSR register for PHY that doesn't support no_csr reset or has not * been initialized. @@ -5805,12 +5796,10 @@ static int qmp_pcie_power_on(struct phy *phy) if (ret) return ret; - if (!skip_reset) { - ret = reset_control_deassert(qmp->nocsr_reset); - if (ret) { - dev_err(qmp->dev, "no-csr reset deassert failed\n"); - goto err_disable_pipe_clk; - } + ret = reset_control_deassert(qmp->nocsr_reset); + if (ret) { + dev_err(qmp->dev, "no-csr reset deassert failed\n"); + goto err_disable_pipe_clk; } if (qmp->skip_init) -- 2.53.0