From: "Krzysztof Wilczyński" <kw@linux.com>
To: Niklas Cassel <cassel@kernel.org>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Rob Herring <robh@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Heiko Stuebner <heiko@sntech.de>,
Damien Le Moal <dlemoal@kernel.org>,
Shawn Lin <shawn.lin@rock-chips.com>,
linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org
Subject: Re: [PATCH 2/2] PCI: dw-rockchip: hide broken ATS capability
Date: Sat, 22 Feb 2025 16:38:29 +0900 [thread overview]
Message-ID: <20250222073829.GA1158377@rocinante> (raw)
In-Reply-To: <20250221202646.395252-4-cassel@kernel.org>
Hello,
> + * ATS does not work on rk3588 when running in EP mode.
Would it be OK if we started to style "rk3588" as "RK3588", unless the
lower-case is preferred? I had a look at Rockchip's own datasheet, and the
product code names seem to be styled with upper-case. That said, I am not
a Rockchip expert. Just curious for the sake of consistency.
> +static void rockchip_pcie_ep_hide_broken_ats_cap_rk3588(struct dw_pcie_ep *ep)
> +{
> + struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
> + struct device *dev = pci->dev;
> + unsigned int spcie_cap_offset, next_cap_offset;
> + u32 spcie_cap_header, next_cap_header;
> +
> + /* only hide the ATS cap for rk3588 running in EP mode */
> + if (!of_device_is_compatible(dev->of_node, "rockchip,rk3588-pcie-ep"))
> + return;
> +
> + spcie_cap_offset = dw_pcie_find_ext_capability(pci, PCI_EXT_CAP_ID_SECPCI);
> + if (!spcie_cap_offset)
> + return;
> +
> + spcie_cap_header = dw_pcie_readl_dbi(pci, spcie_cap_offset);
> + next_cap_offset = PCI_EXT_CAP_NEXT(spcie_cap_header);
> +
> + next_cap_header = dw_pcie_readl_dbi(pci, next_cap_offset);
> + if (PCI_EXT_CAP_ID(next_cap_header) != PCI_EXT_CAP_ID_ATS)
> + return;
> +
> + /* clear next ptr */
> + spcie_cap_header &= ~GENMASK(31, 20);
> +
> + /* set next ptr to next ptr of ATS_CAP */
> + spcie_cap_header |= next_cap_header & GENMASK(31, 20);
> +
> + dw_pcie_dbi_ro_wr_en(pci);
> + dw_pcie_writel_dbi(pci, spcie_cap_offset, spcie_cap_header);
> + dw_pcie_dbi_ro_wr_dis(pci);
> +}
To keep things consistent, it would be nice to capitalise sentences in code
comments, and end them with a full-stop where appropriate (e.g., longer
sentences, etc.). That said, this is something I can after applying, to
save you the hassle of sending another versions.
Thank you!
Krzysztof
next prev parent reply other threads:[~2025-02-22 7:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250221202646.395252-3-cassel@kernel.org>
2025-02-21 20:26 ` [PATCH 2/2] PCI: dw-rockchip: hide broken ATS capability Niklas Cassel
2025-02-22 0:00 ` Bjorn Helgaas
2025-02-22 7:40 ` Krzysztof Wilczyński
2025-02-24 14:18 ` Krzysztof Wilczyński
2025-02-22 7:38 ` Krzysztof Wilczyński [this message]
2025-02-22 16:08 ` Manivannan Sadhasivam
2025-03-07 12:29 ` Niklas Cassel
2025-02-25 1:35 ` Shawn Lin
2025-02-25 12:27 ` Niklas Cassel
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=20250222073829.GA1158377@rocinante \
--to=kw@linux.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=robh@kernel.org \
--cc=shawn.lin@rock-chips.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