Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alex Elder" <elder@riscstar.com>
Cc: robh@kernel.org, linux-pci@vger.kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] misc: tc9564: introduce base PCI driver
Date: Fri, 14 Aug 2026 01:59:23 +0000	[thread overview]
Message-ID: <20260814015923.8E7E21F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260813222943.1655453-3-elder@riscstar.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Missing PCI IRQ vector allocation prevents MSI/MSI-X usage for high-speed child devices.
--

--- Patch [2]: [PATCH 2/2] misc: tc9564: introduce base PCI driver ---
commit e66bfe4041c21f48829a22eb54cde73756806870
Author: Alex Elder <elder@riscstar.com>
misc: tc9564: introduce base PCI driver

This commit introduces a base PCI driver for the Toshiba TC9564 SoC which
implements a PCIe switch and Ethernet AVB/TSN bridge. The driver binds to the
embedded PCI endpoint functions, performs basic PCI initialization, and uses
devicetree to populate any endpoint bus children.

[ ... ]

> diff --git a/drivers/misc/tc9564-pci.c b/drivers/misc/tc9564-pci.c
> new file mode 100644
> index 0000000000000..d3ffcac1c522f
> --- /dev/null
> +++ b/drivers/misc/tc9564-pci.c

[ ... ]

> +static int
> +tc9564_function_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct device_node *np;
> +	int ret;
> +
> +	/* Despite being a PCI device, we require devicetree */
> +	np = dev_of_node(dev);
> +	if (!np)
> +		return dev_err_probe(dev, -EINVAL, "no devicetree node\n");
> +
> +	ret = pcim_enable_device(pdev);
> +	if (ret)
> +		return ret;
> +
> +	pci_set_master(pdev);
> +
> +	/* Scan for pci-ep-bus nodes and probe their sub-devices */

[Severity: High]
Does this setup sequence omit PCI IRQ vector allocation? 

Without calling pci_alloc_irq_vectors() in tc9564_function_probe() before
populating the child devices, the Linux PCI core won't configure the device's
MSI/MSI-X capabilities with host addresses and data payloads. 

Since child platform drivers cannot safely allocate PCI IRQ vectors on behalf
of their parent PCI device, will the high-speed child devices (like the 10Gbps
Ethernet XGMACs) be forced to share a single legacy INTx interrupt, or fail
entirely if the host platform does not support legacy PCI interrupts?

> +	ret = of_platform_default_populate(np, NULL, dev);
> +	if (ret)
> +		goto err_clear_master;
> +
> +	return 0;
> +
> +err_clear_master:
> +	pci_clear_master(pdev);
> +
> +	return dev_err_probe(dev, ret, "failed to populate platform bus\n");
> +}

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260813222943.1655453-1-elder@riscstar.com?part=2

      parent reply	other threads:[~2026-08-14  1:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 22:29 [PATCH 0/2] PCI: introduce TC9564 misc driver Alex Elder
2026-08-13 22:29 ` [PATCH 1/2] dt-bindings: misc: introduce pci1179,0220.yaml Alex Elder
2026-08-14  1:45   ` sashiko-bot
2026-08-13 22:29 ` [PATCH 2/2] misc: tc9564: introduce base PCI driver Alex Elder
2026-08-14  1:11   ` Greg KH
2026-08-14  1:59   ` sashiko-bot [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=20260814015923.8E7E21F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=elder@riscstar.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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