Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Hans Zhang <18255117159@163.com>
Cc: jingoohan1@gmail.com, manivannan.sadhasivam@linaro.org,
	lpieralisi@kernel.org, kw@linux.com, robh@kernel.org,
	bhelgaas@google.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, rockswang7@gmail.com
Subject: Re: [PATCH] PCI: dwc: Add the sysfs property to provide the LTSSM status of the PCIe link
Date: Thu, 23 Jan 2025 10:49:44 -0600	[thread overview]
Message-ID: <20250123164944.GA1223935@bhelgaas> (raw)
In-Reply-To: <20250123071326.1810751-1-18255117159@163.com>

On Thu, Jan 23, 2025 at 03:13:26PM +0800, Hans Zhang wrote:
> Add the sysfs property to provide a view of the current link's LTSSM
> status from the root port device.
> 
>   /sys/bus/pci/devices/<dev>/ltssm_status

Would need a rationale, i.e., what benefit this provides.  Obviously
this is currently only implemented for DWC-based controllers and
probably not ever available for ACPI or other generic host bridges.

Also documentation somewhere in
Documentation/ABI/testing/sysfs-bus-pci*.

LTSSM is applicable to all Downstream Ports, including both Root Ports
and Switch Downstream Ports, but in general I doubt this information
is available for Switches in any generic way.

> +++ b/drivers/pci/pci-sysfs.c
> @@ -1696,6 +1696,9 @@ const struct attribute_group *pci_dev_attr_groups[] = {
>  #endif
>  #ifdef CONFIG_PCIEASPM
>  	&aspm_ctrl_attr_group,
> +#endif
> +#ifdef CONFIG_PCIE_DW_HOST
> +	&dw_ltssm_status_attr_group,
>  #endif

I'm not convinced of the value of potentially dozens of device- or
vendor-specific additions like this.

Bjorn

  parent reply	other threads:[~2025-01-23 16:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-23  7:13 [PATCH] PCI: dwc: Add the sysfs property to provide the LTSSM status of the PCIe link Hans Zhang
2025-01-23 16:16 ` Frank Li
2025-01-24 13:12   ` Hans Zhang
2025-01-24 16:01     ` Frank Li
2025-01-26 14:30       ` Hans Zhang
2025-01-23 16:49 ` Bjorn Helgaas [this message]
2025-01-26 14:06   ` Hans Zhang
2025-01-24 13:29 ` Manivannan Sadhasivam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250123164944.GA1223935@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=18255117159@163.com \
    --cc=bhelgaas@google.com \
    --cc=jingoohan1@gmail.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=robh@kernel.org \
    --cc=rockswang7@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox