From nobody Mon Feb 9 19:53:04 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 C1B1A2EC0B2 for ; Fri, 9 Jan 2026 07:21:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767943295; cv=none; b=I/TIM3I4jM4bxe/lL7KPnsUxZp9gXlDEr/k/DTXPVc2IzgdjoK3VicuwTi2tf745GRbi156U1x3Axv9nzAGTLgDSC64OnY+8H1wNTAq8CZZpeDbdxyzi9vUBxB8Gi1IJ2fmPoWd1QUPL71hqoWgd8hQa7diPf1yuUyeAkaSHxF4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767943295; c=relaxed/simple; bh=vinmZfaj1r+n5Dx0UgKPAqqqJqXxuE6TZN5VPmabgjo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Y14uNmW4pxlP1KgHJSfNIx1n4jedzRT7iFHRTCW3zKEw2YdB2ArQOgsuxuQ+WG399/eiDv+VS3kV0ee9Yrqi6aQdpthGhqtpRb+k5ucyrqy99MU7NfC4cS4uCQfkxXmFKDWtjrYyUh0pinaOHwzbcA6e/7JQpCFHRQvxcrNf+iY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=oSqF8QgM; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=IcxRMuEb; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="oSqF8QgM"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="IcxRMuEb" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 608MpZs42328141 for ; Fri, 9 Jan 2026 07:21:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= bATFQdgkSJQNtrjTPNUlAQXLkiJbzJjL5+F3AAAsVSE=; b=oSqF8QgMtNDLGz4+ XwJrZs+Kv4Kg79Qp9FJMAvFRCHRvU6o8kDFAs3e9TuZAEzaArrSFZXzRVyfSOrOq 7hYRlhcLNxHO4QZx5EH7zxrKBRxw/zn+GJuhvdCqwuYvrLn71GvnPcGyModHd8VI PtVRvg3LWAbBiR3uSUKVEWmIRKy9OMxYnLCkN9Wqi8ieunynauGtpyi4FV/Zw7kC WrQ5MeT4F+fsEt6rdxmJYP6lqBuppgYjdlgsR+m6YnkLZOoFW3+8OhWgwtxHz9BY yh1pg54w4rKINHc02bMl27pMu/0QznERgFiJFwkzAekMh3spnE4vNBzQqND9XF98 09B7+g== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bjfdaadkh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 09 Jan 2026 07:21:24 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-7b89c1ce9cfso3716517b3a.2 for ; Thu, 08 Jan 2026 23:21:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1767943283; x=1768548083; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=bATFQdgkSJQNtrjTPNUlAQXLkiJbzJjL5+F3AAAsVSE=; b=IcxRMuEbe/ZDPXJXMzswhRP/cqYPNCQYtlE8zsqA5GbTExA2wYPqv5vbgcmRr5BCoD g3zJqMG6bSh/FkwATMas7l11R8WUEwYor+YzXqVp9hukDUS+qMi72sG3jkieMUF7VeYx cQa9ssSu7omxAm8EfXVkhpLKuSRpIYqZForN7y+T9mG+slP2ib+vLK5SXTKRAOL6chHi +LHktGLSN2m1K7PZbwWF+LUgAp9kC+JvkEKmKXE34fjqv1U0faGgocKjKlIetkZ3GlL6 Wk/9AwMWB6AlXoK7eUyGq6buWx502PhK+gAi3BDT7/oS5q8bKWu0UYu8CO2GmtnSMr4U hOIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767943283; x=1768548083; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=bATFQdgkSJQNtrjTPNUlAQXLkiJbzJjL5+F3AAAsVSE=; b=NzP4SBdDcsTmXST+BXCG0YbSM76wDuLg5Pr13WyR1K2WW2HpzEuhXvqh5tmUNgbNAR f32J1DPMQxYsr2On4xG4Q6VOZrBDJNXCVYWTqGqhRX2+K7UJ3aNHzWd7mW2MZQbtPinl xY37vDjbIw8/8NeXZIVXlCgUBAPDXy0uXwgi3duAIq976/JvLS1Lob43iAFd+ywoYij/ 8v+n+3ckFtdhjHH87eEJzz+Ctvde3CM9L9Hu5Uh6pJFc/O9dNdfmlqYphRRBs58k2btN BlZLdGTmRB8eUYazZXEPfQwnom5yezu1Raave2NV05Firksw05HNcUjuI6oojb0Kfvap zhWg== X-Forwarded-Encrypted: i=1; AJvYcCVhB/cucI6Dq/zmeUAeXY4qj7g60hu5cEY9d32vlkuSYODz77GdtzJZcsL1OqOO6X7RcRcxJI685WPVeHw=@vger.kernel.org X-Gm-Message-State: AOJu0Yw+T/+DgtK8pcDP6voaABVkOTI4fbRtaba4uz8BBf/9DXOq0vNh Yk6ENnvsAK1UqN3NCSrkdZs2zWaSkdGnQP8TU1CeXoe0Su8PCdXg2zWGIOW+GsQ+9IDXC/obUeN bAMax2J8cm3si+hzlELN8RLw+IKNJBs/rJ1wOtwdMR23eQWdkvgSlzMqek1KDqImnnYs= X-Gm-Gg: AY/fxX6ztvK+emSRlP6pJrm4GS5Ae7IIT+4cxUndE5aqcYSdg7YGj99uVhsPZHhmtL3 5ORZq9IDpLQnvKM0YRl1P2ugQg6CaHNHDrMf0LSqwIRZaf5p+qR4Mo0kxYcU9dw8ZQZdqr46tIG +fDIvAvnX65vBPsRvCVbWCEjhuccp35ohiA7oeoZ3rO5yYhr1+TrEKi+6kilbJV5cDz7G0cCR6H CdsbbGrWtCc5+erpbUXXKFGVoJO2+DFxzZWYcyZFGJRr4qsRKXAHm7EqtV9XWhIGGn4rZ8VC0Eo 8e/oKls9sbEQpsdpbEXv4rklCBmgT6t6YKm4TR1P2383CVvOpKWQ1WUY+D0QrFbDTIPVl2/XFVm 5j/vbmMy/TeKqDKVfCjBPgwTQWccviafIrrc213ATG+Wg X-Received: by 2002:a05:6a00:32cf:b0:7fb:e662:5c8 with SMTP id d2e1a72fcca58-81b7f6e3a8cmr8329192b3a.30.1767943283381; Thu, 08 Jan 2026 23:21:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnlV0I7WmCaNsCQSf5sgFNBK7QoW3YQzRGNWGVyGJy0Kc/9qDvIlm+MyH3UrATitJaDgV/Lg== X-Received: by 2002:a05:6a00:32cf:b0:7fb:e662:5c8 with SMTP id d2e1a72fcca58-81b7f6e3a8cmr8329155b3a.30.1767943282856; Thu, 08 Jan 2026 23:21:22 -0800 (PST) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-819bb4c85bfsm9510369b3a.30.2026.01.08.23.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jan 2026 23:21:22 -0800 (PST) From: Krishna Chaitanya Chundru Date: Fri, 09 Jan 2026 12:51:07 +0530 Subject: [PATCH 2/5] PCI: dwc: Add support for retaining link during host init Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260109-link_retain-v1-2-7e6782230f4b@oss.qualcomm.com> References: <20260109-link_retain-v1-0-7e6782230f4b@oss.qualcomm.com> In-Reply-To: <20260109-link_retain-v1-0-7e6782230f4b@oss.qualcomm.com> To: Vinod Koul , Neil Armstrong , Philipp Zabel , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Krishna Chaitanya Chundru X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1767943270; l=1912; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=vinmZfaj1r+n5Dx0UgKPAqqqJqXxuE6TZN5VPmabgjo=; b=31EkDX2BCydzu3cUHMOBpwb+Vozz0SRCXZY35FhypsrEw2cStV6ElJ16tG5VtEjEcfOtRSzhF doiP34NClqoBN8WcG5MNDF8pK50+/PopXJJ4iwhUG+DWtH9V8MgRTna X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Authority-Analysis: v=2.4 cv=Ue1ciaSN c=1 sm=1 tr=0 ts=6960ac74 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=Py5lcOcq67Lbq8UMOfUA:9 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 X-Proofpoint-ORIG-GUID: QDWhcY84LiW2Q2jf2RlHiGlT9Hs2UXF4 X-Proofpoint-GUID: QDWhcY84LiW2Q2jf2RlHiGlT9Hs2UXF4 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTA5MDA1MCBTYWx0ZWRfX4PIKznP8ZgM2 ENLZehqzMkwhjUg2TiYv32Z6Eyu+QP+a9QbQg1+Xzw00HJqPYqtH4uYQ8AcNKG3ZEe2Qtl/Tqtg FCoj+HzEtjjwd6Y0YlBJ9udo7qs22BhUsuElhHNp9I4UTCsPtKaTBTf1eC5zSD7C6//PeUILs+X P35utKeiyWvuRtYVCndyrUnWVm/SJ2hUFd4E+miU0fb7dgZ5hC7h23OMXG710hwL0MxzFpKyM0i O1s06+Br0t/KAv14tm4gQ6eGCkqvddcSw3FsQW2aICYhS3gn8njMLfSefzv04C2ZKYyGrtRdZ2E VVX4TeDqjz5C+3NLST5FNcOU8IDRZrYb7gaxQ6OCGTYipDIZbTPQteSJTXzQSByCYNt3RDIT2iL U7tG9q+zKp802/1XF065rygyiu9x7uYtCQD8G8bXywKKE68TIZ1gZEtUCpN6UHAWPWXBW4hxLMg vctQNmpP332xkhG4oaA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-09_02,2026-01-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 suspectscore=0 phishscore=0 spamscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601090050 Some platforms keep the PCIe link up across bootloader and kernel handoff. In such cases, reinitializing the root complex is unnecessary if the DWC glue drivers wants to retain the PCIe link. Introduce a link_retain flag in struct dw_pcie_rp to indicate that the link should be preserved. When this flag is set by DWC glue drivers, skip dw_pcie_setup_rc() and only initialize MSI, avoiding redundant configuration steps. Signed-off-by: Krishna Chaitanya Chundru --- drivers/pci/controller/dwc/pcie-designware-host.c | 11 ++++++++--- drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pc= i/controller/dwc/pcie-designware-host.c index 372207c33a857b4c98572bb1e9b61fa0080bc871..d050df3f22e9507749a8f2fedd4= c24fca43fb410 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -655,9 +655,14 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp) if (ret) goto err_free_msi; =20 - ret =3D dw_pcie_setup_rc(pp); - if (ret) - goto err_remove_edma; + if (!pp->link_retain) { + ret =3D dw_pcie_setup_rc(pp); + if (ret) + goto err_remove_edma; + } else { + dw_pcie_msi_init(pp); + } + =20 if (!dw_pcie_link_up(pci)) { ret =3D dw_pcie_start_link(pci); diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/con= troller/dwc/pcie-designware.h index 31685951a080456b8834aab2bf79a36c78f46639..8acab751b66a06e8322e027ab55= dc0ecfdcf634c 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -439,6 +439,7 @@ struct dw_pcie_rp { struct pci_config_window *cfg; bool ecam_enabled; bool native_ecam; + bool link_retain; }; =20 struct dw_pcie_ep_ops { --=20 2.34.1