public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org, netdev@vger.kernel.org,
	Bjorn Helgaas <bhelgaas@google.com>,
	Rob Herring <robh@kernel.org>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Michael Walle <michael@walle.cc>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH pci] PCI: don't skip probing entire device if first fn OF node has status = "disabled"
Date: Wed, 31 May 2023 01:04:36 +0300	[thread overview]
Message-ID: <20230530220436.fooxifm47irxqlrj@skbuf> (raw)
In-Reply-To: <ZHZxn0a3/EJbthYO@bhelgaas>

On Tue, May 30, 2023 at 04:58:55PM -0500, Bjorn Helgaas wrote:
> Can you write this description in terms of PCI topology?  The
> nitty-gritty SERDES details are not relevant at this level, except to
> say that Function 0 is present in some cases but not others, and when
> it is not present, *other* functions may be present.

No. It is to say that within the device, all PCIe functions (including 0)
are always available and have the same number, but depending on SERDES
configuration, their PCIe presence might be practically useful or not.
So that's how function 0 may end having status = "disabled" in the
device tree.

> Sigh.  Per spec (PCIe r6.0, sec 7.5.1.1.9), software is not permitted
> to probe for Functions other than 0 unless "explicitly indicated by
> another mechanism, such as an ARI or SR-IOV Capability."
> 
> Does it "work" to probe when the spec prohibits it?  Probably.  Does
> it lead to some breakage elsewhere eventually?  Quite possibly.  They
> didn't put "software must not probe" in the spec just to make
> enumeration faster.
> 
> So I'm a little grumpy about further complicating this already messy
> path just to accommodate a new non-compliant SoC.  Everybody pays the
> price of understanding all this stuff, and it doesn't seem in balance.
> 
> Can you take advantage of some existing mechanism like
> PCI_SCAN_ALL_PCIE_DEVS or hypervisor_isolated_pci_functions() (which
> could be renamed and made more general)?

Not responding yet to the rest of the email since it's not clear to me
that you've understood function 0 is absolutely present and responds
to all config space accesses - it's just disabled in the device tree
because the user doesn't have something useful to do with it.

  reply	other threads:[~2023-05-30 22:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-21 11:51 [PATCH pci] PCI: don't skip probing entire device if first fn OF node has status = "disabled" Vladimir Oltean
2023-05-29 20:48 ` Vladimir Oltean
2023-05-30 21:58 ` Bjorn Helgaas
2023-05-30 22:04   ` Vladimir Oltean [this message]
2023-05-30 22:27     ` Bjorn Helgaas
2023-05-30 23:15       ` Vladimir Oltean
2023-05-31 16:56         ` Bjorn Helgaas
2023-05-31 16:58           ` Vladimir Oltean
2023-05-31 20:24             ` Bjorn Helgaas
2023-06-01  8:11               ` Vladimir Oltean
2023-06-01 15:44                 ` Bjorn Helgaas
2023-06-01 16:33                   ` Vladimir Oltean
2023-06-01 17:51                     ` Bjorn Helgaas
2023-06-01 22:15                       ` Vladimir Oltean
2023-06-02  4:06                         ` 陈华才
2023-06-02  7:21                         ` Liu Peibao
2023-06-02  7:36                           ` Jianmin Lv
2023-06-02 10:16                             ` Vladimir Oltean
2023-06-03  2:35                               ` Jianmin Lv
2023-06-04  8:55                                 ` Vladimir Oltean
2023-06-05  0:59                                   ` Jianmin Lv
2023-06-05  9:34                                     ` Vladimir Oltean
2023-06-16  2:12                                       ` Jianmin Lv
2023-06-16 17:57                                   ` Rob Herring
2023-08-03 10:39                                     ` Vladimir Oltean
2023-08-03 11:34                                       ` Vladimir Oltean

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=20230530220436.fooxifm47irxqlrj@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=netdev@vger.kernel.org \
    --cc=robh@kernel.org \
    /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