lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <DU2PR04MB8840B5B71AC253D0CEC316468C8DA@DU2PR04MB8840.eurprd04.prod.outlook.com>
Date: Fri, 16 Jan 2026 01:36:20 +0000
From: Hongxing Zhu <hongxing.zhu@....com>
To: "manivannan.sadhasivam@....qualcomm.com"
	<manivannan.sadhasivam@....qualcomm.com>, Jingoo Han <jingoohan1@...il.com>,
	Manivannan Sadhasivam <mani@...nel.org>, Lorenzo Pieralisi
	<lpieralisi@...nel.org>, Krzysztof Wilczy��ski
	<kwilczynski@...nel.org>, Rob Herring <robh@...nel.org>, Bjorn Helgaas
	<bhelgaas@...gle.com>
CC: "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
	"zhangsenchuan@...incomputing.com" <zhangsenchuan@...incomputing.com>, Shawn
 Lin <shawn.lin@...k-chips.com>, Frank Li <frank.li@....com>
Subject: RE: [PATCH v4 0/6] PCI: dwc: Rework the error handling of
 dw_pcie_wait_for_link() API

> -----Original Message-----
> From: Manivannan Sadhasivam via B4 Relay
> <devnull+manivannan.sadhasivam.oss.qualcomm.com@...nel.org>
> Sent: 2026年1月7日 16:12
> To: Jingoo Han <jingoohan1@...il.com>; Manivannan Sadhasivam
> <mani@...nel.org>; Lorenzo Pieralisi <lpieralisi@...nel.org>; Krzysztof
> Wilczy��ski <kwilczynski@...nel.org>; Rob Herring <robh@...nel.org>; Bjorn
> Helgaas <bhelgaas@...gle.com>
> Cc: linux-pci@...r.kernel.org; linux-kernel@...r.kernel.org;
> vincent.guittot@...aro.org; zhangsenchuan@...incomputing.com; Shawn
> Lin <shawn.lin@...k-chips.com>; Hongxing Zhu <hongxing.zhu@....com>;
> Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>;
> Frank Li <frank.li@....com>
> Subject: [PATCH v4 0/6] PCI: dwc: Rework the error handling of
> dw_pcie_wait_for_link() API
>
> Hi,
>
> This series reworks the dw_pcie_wait_for_link() API to allow the callers to
> detect the absence of the device on the bus and skip the failure.
>
> Compared to v2, I've reworked the patch 2 to improve the API further and
> dropped the patch 1 that got applied (hence changed the subject). I've also
> modified the error code based on the feedback in v2 to return -ENODEV if
> device is not detected on the bus and -ETIMEDOUT otherwise. This allows
> the callers to skip the failure if device is not detected and handle error for
> other failure.
>
> Testing
> =======
>
> Tested this series on Rb3Gen2 board without powering on the PCIe switch.
> Now the
> dw_pcie_wait_for_link() API prints:
>
>       qcom-pcie 1c08000.pcie: Device not found
>
> Instead of the previous log:
>
>       qcom-pcie 1c08000.pcie: Phy link never came up
>
> Signed-off-by: Manivannan Sadhasivam
> <manivannan.sadhasivam@....qualcomm.com>
Hi Mani:
Tested on i.MX platforms, no error return anymore. Only "Device not found" is
dumped out when no endpoint device is connected. Thanks.
Tested-by: Richard Zhu <hongxing.zhu@....com>

Best Regards
Richard Zhu

> ---
> Changes in v4:
> - Skipped returning failure during resume as well if no device is found
> - Link to v3:
> https://lore.ke/
> rnel.org%2Fr%2F20251230-pci-dwc-suspend-rework-v3-0-40cd485714f5%40o
> ss.qualcomm.com&data=05%7C02%7Chongxing.zhu%40nxp.com%7C21e8caa
> 708ac4b1e2b4c08de4dc46fd8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0
> %7C0%7C639033703253415993%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU
> 1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIl
> dUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=ZYKBkrUCWKi7hraUSORtiDHwslQ
> Av0kdzyULONMJ7mI%3D&reserved=0
>
> Changes in v3:
> - Dropped patch 1 that got appplied
> - Reworked the error handling of dw_pcie_wait_for_link() API further
> - Link to v2:
> https://lore.ke/
> rnel.org%2Fr%2F20251218-pci-dwc-suspend-rework-v2-0-5a7778c6094a%40o
> ss.qualcomm.com&data=05%7C02%7Chongxing.zhu%40nxp.com%7C21e8caa
> 708ac4b1e2b4c08de4dc46fd8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0
> %7C0%7C639033703253445304%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU
> 1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIl
> dUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=drliZMCiwPAb2nJCKTXPcsRgLa4ex
> sCKGzc2tcK8HSA%3D&reserved=0
>
> Changes in v2:
> - Changed the logic to check for Detect.Quiet/Active states
> - Collected tags and rebased on top of v6.19-rc1
> - Link to v1:
> https://lore.ke/
> rnel.org%2Fr%2F20251119-pci-dwc-suspend-rework-v1-0-aad104828562%40o
> ss.qualcomm.com&data=05%7C02%7Chongxing.zhu%40nxp.com%7C21e8caa
> 708ac4b1e2b4c08de4dc46fd8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0
> %7C0%7C639033703253464634%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU
> 1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIl
> dUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=atzlRIAvDCuQJnIRFaJyYaRA3OQ1n
> d4epPJBNeff6hU%3D&reserved=0
>
> ---
> Manivannan Sadhasivam (6):
>       PCI: dwc: Return -ENODEV from dw_pcie_wait_for_link() if device is
> not found
>       PCI: dwc: Rename and move ltssm_status_string() to
> pcie-designware.c
>       PCI: dwc: Rework the error print of dw_pcie_wait_for_link()
>       PCI: dwc: Only skip the dw_pcie_wait_for_link() failure if it returns
> -ENODEV
>       PCI: host-common: Add an API to check for any device under the Root
> Ports
>       PCI: dwc: Skip failure during dw_pcie_resume_noirq() if no device is
> available
>
>  .../pci/controller/dwc/pcie-designware-debugfs.c   | 54 +---------------
>  drivers/pci/controller/dwc/pcie-designware-host.c  | 23 +++++--
>  drivers/pci/controller/dwc/pcie-designware.c       | 75
> +++++++++++++++++++++-
>  drivers/pci/controller/dwc/pcie-designware.h       |  2 +
>  drivers/pci/controller/pci-host-common.c           | 21 ++++++
>  drivers/pci/controller/pci-host-common.h           |  2 +
>  6 files changed, 115 insertions(+), 62 deletions(-)
> ---
> base-commit: 68ac85fb42cfeb081cf029acdd8aace55ed375a2
> change-id: 20251119-pci-dwc-suspend-rework-8b0515a38679
>
> Best regards,
> --
> Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ