[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230809153706.GA340945@bhelgaas>
Date: Wed, 9 Aug 2023 10:37:06 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: linux-pci@...r.kernel.org, netdev@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Rob Herring <robh@...nel.org>,
Claudiu Manoil <claudiu.manoil@....com>,
Michael Walle <michael@...le.cc>, linux-kernel@...r.kernel.org,
Jianmin Lv <lvjianmin@...ngson.cn>,
Liu Peibao <liupeibao@...ngson.cn>,
Binbin Zhou <zhoubinbin@...ngson.cn>,
Huacai Chen <chenhuacai@...ngson.cn>
Subject: Re: [PATCH v2 pci/net 1/3] PCI: move OF status = "disabled"
detection to dev->match_driver
On Wed, Aug 09, 2023 at 05:45:49PM +0300, Vladimir Oltean wrote:
> Hi Bjorn,
>
> On Tue, Aug 08, 2023 at 05:21:07PM -0500, Bjorn Helgaas wrote:
> > I think this makes good sense, but let me make sure I understand how
> > this works.
> >
> > I *think* what's happening is that this Function 0 responds to config
> > reads, so PCI enumeration starts by discovering it normally. But
> > after 6fffbc7ae137 ("PCI: Honor firmware's device disabled status"),
> > we abort in pci_setup_device() if the DT or ACPI status is "disabled,"
> > which means there's no struct pci_dev for it, no quirks can run on it,
> > and no driver can bind to it. And, since PCI multi-function devices
> > must have a Function 0, we don't enumerate the other functions of this
> > device.
> >
> > That's a problem because (1) you need to do some initialization on
> > Function 0 even though you don't want a driver to claim it, and
> > (2) this is a multi-function device and you need to enumerate the
> > other functions.
>
> Correction: on functions 0, 1, 2 and 6 (all have
> PCI_VENDOR_ID_FREESCALE, ENETC_DEV_ID_PF), and not just on function
> 0. The particular nature of a hardware IP bug/afterthought makes
> this necessary.
Thanks, so (2) is only relevant to function 0, but (1) applies to
other functions as well.
> You may have given the netdev maintainers some mixed signals with the
> rewording suggestion plus the ack for my wording, and now we have commit
> 1a8c251cff20 ("PCI: move OF status = "disabled" detection to
> dev->match_driver") in the net.git tree.
>
> I think we are mostly on the same page about what is changing, it's just
> that we are focusing on different aspects of it in the description.
>
> I hope you're ok if we close the topic the way things are now? :)
Yep, my fault for forgetting how netdev works. Thanks for your
patience.
Bjorn
Powered by blists - more mailing lists