From: Icenowy Zheng <zhengxingda@iscas.ac.cn>
To: Lukas Wunner <lukas@wunner.de>
Cc: "Manivannan Sadhasivam" <mani@kernel.org>,
"Han Gao" <gaohan@iscas.ac.cn>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Jonathan Cameron" <jonathan.cameron@huawei.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Kees Cook" <kees@kernel.org>,
"Chen Wang" <unicorn_wang@outlook.com>,
linux-pci@vger.kernel.org, sophgo@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
"Han Gao" <rabenda.cn@gmail.com>,
"Inochi Amaoto" <inochiama@gmail.com>,
"Vivian Wang" <wangruikang@iscas.ac.cn>, "Yao Zi" <me@ziyao.cc>,
stable@vger.kernel.org
Subject: Re: [PATCH 2/2] PCI: Add quirk to disable PCIe port services on Sophgo SG2042
Date: Sun, 03 May 2026 15:10:58 +0800 [thread overview]
Message-ID: <68d4a49bf1df785ae906fbc2dd16e64b667ca5f0.camel@iscas.ac.cn> (raw)
In-Reply-To: <afZUxYhkCQ0wG0Uu@wunner.de>
在 2026-05-02六的 21:47 +0200,Lukas Wunner写道:
> On Sat, May 02, 2026 at 09:58:04PM +0800, Icenowy Zheng wrote:
> > The problem is that the MSI controller has only 16 MSIs usable
> > (it's
> > wrongly described as 32 previously, a fix to this is pending[1]),
> > and
> > the failing device have an onboard PCIe switch, which created many
> > PCIe
> > ports (and corresponding pcieport devices).
>
> Is the SG2042 only used in that single product? If it is used in
> other
> products which do not have an on-board PCIe switch, why do you want
> to
> disable MSIs on those other products as well?
It's used in multiple products, but only one of them (EVBv1, which is
just an early EVB available for a few people including me) lacks an
onboard switch, because SG2042 is short on on-chip peripherals. All
other devices (including two mainlined ones, EVBv2 and Milk-V Pioneer,
and unmainlined dual socket rack servers; Milk-V Pioneer should be the
most popular device because it was on shelf) have an onboard switch to
mitigate the lack of on-chip peripherals in SG2042.
>
> My point is, you want to constrain this to a specific product, not to
> the SoC. Can you maybe solve this by not specifying interrupts in
> the
> devicetree for the PCIe switch?
The PCIe switches are not described in the device tree at all, because
they're all just discoverable; can we describe them in the DT and
redirect their interrupts to void?
>
> > With pcieport devices activated, 11 MSIs are requested by the
> > pcieport
> > drivers -- 3 SoC PCIe ports and 8 switch downstream ports. Then
> > only 5
> > MSIs are available, but there're still 10 downstream-facing PCIe
> > ports
> > now (and 5 of them are hardwired to onboard peripherals).
>
> pcieport can make do with a single MSI vector because all port
> services
> support a shared interrupt. But I assume your point is that this
> particular product has so many PCIe ports that you're still close
> to the 16 MSIs limit?
Yes, different services of the same port are now sharing a single MSI
(the 3 native ports have PME, aerdrv, bwctrl sharing the same IRQ while
the only service available for switch downstream ports is bwctrl).
However there're 11 ports (3 native ports + 8 switch downstream ports),
so this still leaves too few room for other cards.
Thanks,
Icenowy
>
> Thanks,
>
> Lukas
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-05-03 7:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260331175658.1015829-1-gaohan@iscas.ac.cn>
2026-03-31 17:56 ` [PATCH 1/2] PCI: Add per-device flag to disable native PCIe port services Han Gao
2026-03-31 17:56 ` [PATCH 2/2] PCI: Add quirk to disable PCIe port services on Sophgo SG2042 Han Gao
2026-05-01 16:53 ` Manivannan Sadhasivam
2026-05-02 13:58 ` Icenowy Zheng
2026-05-02 19:47 ` Lukas Wunner
2026-05-03 7:10 ` Icenowy Zheng [this message]
2026-05-03 8:52 ` Lukas Wunner
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=68d4a49bf1df785ae906fbc2dd16e64b667ca5f0.camel@iscas.ac.cn \
--to=zhengxingda@iscas.ac.cn \
--cc=bhelgaas@google.com \
--cc=gaohan@iscas.ac.cn \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=inochiama@gmail.com \
--cc=jonathan.cameron@huawei.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lukas@wunner.de \
--cc=mani@kernel.org \
--cc=me@ziyao.cc \
--cc=rabenda.cn@gmail.com \
--cc=sophgo@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
--cc=unicorn_wang@outlook.com \
--cc=wangruikang@iscas.ac.cn \
/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