Linux-MIPS Archive mirror
 help / color / mirror / Atom feed
From: Caleb James DeLisle <cjd@cjdns.fr>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org, linux-mips@vger.kernel.org,
	naseefkm@gmail.com, ryder.lee@mediatek.com,
	lpieralisi@kernel.org, kwilczynski@kernel.org, mani@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
	ansuelsmth@gmail.com, linux-mediatek@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/2] PCI: mediatek: Add support for EcoNet EN7528 SoC
Date: Thu, 14 May 2026 00:17:28 +0200	[thread overview]
Message-ID: <64d29cc5-8021-402c-b6c4-47bcf4c4f814@cjdns.fr> (raw)
In-Reply-To: <20260513220610.GA341225@bhelgaas>


On 14/05/2026 00:06, Bjorn Helgaas wrote:
> On Wed, May 13, 2026 at 11:39:25PM +0200, Caleb James DeLisle wrote:
>> On 13/05/2026 23:07, Bjorn Helgaas wrote:
>>> On Wed, May 13, 2026 at 07:16:52PM +0000, Caleb James DeLisle wrote:
>>>> Add support for the PCIe present on the EcoNet EN7528 (and EN751221) SoCs.
>>>>
>>>> These SoCs have a mix of Gen1 and Gen2 capable ports, but the Gen2 ports
>>>> require re-training after startup.
>>>> +found_port:
>>>> +	if (!IS_BUILTIN(CONFIG_PCIE_MEDIATEK)) {
>>>> +		/* Let it go because the device will work as Gen1 */
>>>> +		dev_warn(dev, "module must be built-in to retrain to Gen2\n");
>>> I suppose this will cause a warning even in cases where Gen2 is
>>> impossible, e.g., the endpoint only supports Gen1?
>> Correct indeed.
>>
>> I imagine in most cases, if the port is Gen1 only then board integrator uses
>> a Gen1 card as well, so I could try being fancy and probe the card to see if
>> it supports Gen2. In OpenWrt the PCI driver is always built-in so I didn't
>> really consider this something to worry about.
> Probing the downstream device sounds like overkill because it hasn't
> been enumerated yet and there's no good place to check after it is
> enumerated.  I would consider just logging one message as "info"
> instead of "warn", maybe in mtk_pcie_startup_port_en7528()?


Works for me, worth noting if anybody adds a startup for another device 
which has this quirk, they'll also need to copy the log line - but it's 
highly likely that no other such device exists, and duplicating 3 lines 
of code is not the end of the world.


Thanks,

Caleb


      reply	other threads:[~2026-05-13 22:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 19:16 [PATCH v6 0/2] Add EcoNet EN7528 (and EN751221) PCIe support Caleb James DeLisle
2026-05-13 19:16 ` [PATCH v6 1/2] dt-bindings: PCI: mediatek: Add support for EcoNet EN7528 Caleb James DeLisle
2026-05-13 19:16 ` [PATCH v6 2/2] PCI: mediatek: Add support for EcoNet EN7528 SoC Caleb James DeLisle
2026-05-13 21:07   ` Bjorn Helgaas
2026-05-13 21:39     ` Caleb James DeLisle
2026-05-13 22:06       ` Bjorn Helgaas
2026-05-13 22:17         ` Caleb James DeLisle [this message]

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=64d29cc5-8021-402c-b6c4-47bcf4c4f814@cjdns.fr \
    --to=cjd@cjdns.fr \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=ansuelsmth@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=helgaas@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=naseefkm@gmail.com \
    --cc=robh@kernel.org \
    --cc=ryder.lee@mediatek.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).