From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: "Claudiu Beznea" <claudiu.beznea.uj@bp.renesas.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
"John Madieu" <john.madieu.xa@bp.renesas.com>,
linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
"Biju Das" <biju.das.jz@bp.renesas.com>,
"Fabrizio Castro" <fabrizio.castro.jz@renesas.com>,
"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH 5/5] PCI: rzg3s-host: Add support for RZ/V2H(P) SoC
Date: Thu, 26 Mar 2026 14:56:07 +0200 [thread overview]
Message-ID: <693acd52-987e-4018-ae02-386dbd430462@tuxon.dev> (raw)
In-Reply-To: <CA+V-a8s_Kv5WwocsKy_qBEtZ=0gzN-YbAz3pYjubf_qZVLhBew@mail.gmail.com>
Hi, Prabhakar,
On 3/25/26 13:53, Lad, Prabhakar wrote:
>> from [1]:
>> "For example, if rzg3s_pcie_resets_prepare_and_get() returns -EPROBE_DEFER,
>> the static variable is never decremented. On subsequent probe retries,
>> the variable will be artificially inflated, eventually causing the bounds
>> check to fail and returning a permanent -EINVAL. This would also prevent
>> driver unbind and rebind from working correctly."
>>
> The other alternative would be the below, where we wouldn't need to
> use the num-lanes property but would need a comparison with the DT
> compatible,
Or move rzv2h_num_total_lanes outside of rzv2h_pcie_setup_lanes() and reset it
on failure path.
>
> + for_each_compatible_node(np, NULL, "renesas,r9a09g057-pcie") {
If it's possible I would avoid spreading compatibles though the file but instead
use driver data where possible.
Thank you,
Claudiu
> + if (of_device_is_available(np))
> + count++;
> + }
> + if (!count)
> + return 0;
> +
> + /* If both PCIe channels are enabled configure the LINK_MASTER
> in x2 lane mode.
> + * If only one channel is enabled check the port index and if
> port1 is enabled
> + * configure the LINK_MASTER in x2 lane mode, otherwise keep
> it in x4 lane mode.
> + */
> + if (count == RZV2H_MAX_PCIE_PORTS ||
> + (count == 1 && host->channel == 1))
> + host->link_mode = RZV2H_PCIE_MODE_DUAL_X2;
> + else
> + host->link_mode = RZV2H_PCIE_MODE_SINGLE_X4;
next prev parent reply other threads:[~2026-03-26 12:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 12:44 [PATCH 0/5] Add PCIe support for RZ/V2N and RZ/V2H(P) SoCs Prabhakar
2026-03-18 12:44 ` [PATCH 1/5] dt-bindings: pci: renesas,r9a08g045-pcie: Add RZ/V2N support Prabhakar
2026-03-18 16:34 ` Bjorn Helgaas
2026-03-18 19:46 ` Lad, Prabhakar
2026-03-18 12:44 ` [PATCH 2/5] dt-bindings: pci: renesas,r9a08g045-pcie: Add RZ/V2H(P) support Prabhakar
2026-03-19 9:34 ` Krzysztof Kozlowski
2026-03-19 21:25 ` Lad, Prabhakar
2026-03-25 10:07 ` Claudiu Beznea
2026-03-18 12:44 ` [PATCH 3/5] PCI: rzg3s-host: Use shared reset controls for power domain resets Prabhakar
2026-03-18 16:30 ` Bjorn Helgaas
2026-03-18 19:48 ` Lad, Prabhakar
2026-03-18 12:44 ` [PATCH 4/5] PCI: rzg3s-host: Prepare System Controller handling for multiple PCIe channels Prabhakar
2026-03-25 10:19 ` Claudiu Beznea
2026-03-25 11:54 ` Lad, Prabhakar
2026-03-18 12:44 ` [PATCH 5/5] PCI: rzg3s-host: Add support for RZ/V2H(P) SoC Prabhakar
2026-03-25 10:18 ` Claudiu Beznea
2026-03-25 11:53 ` Lad, Prabhakar
2026-03-26 12:56 ` Claudiu Beznea [this message]
2026-04-08 18:54 ` Lad, Prabhakar
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=693acd52-987e-4018-ae02-386dbd430462@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=bhelgaas@google.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert+renesas@glider.be \
--cc=john.madieu.xa@bp.renesas.com \
--cc=krzk+dt@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mani@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=prabhakar.csengg@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh@kernel.org \
--cc=wsa+renesas@sang-engineering.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