From: Oliver Neukum <oneukum@suse.com>
To: Oliver Neukum <oneukum@suse.com>,
Alexander Stein <alexander.stein@ew.tq-group.com>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: Korneliusz Osmenda <korneliuszo@gmail.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] Guard pci_create_sysfs_dev_files with atomic value
Date: Tue, 21 Mar 2023 10:09:22 +0100 [thread overview]
Message-ID: <a1cca367-52b6-a6b1-fb01-890cad39fd29@suse.com> (raw)
In-Reply-To: <ced8713f-69de-e48a-37eb-4f844e651b6b@suse.com>
Am Donnerstag, 16. März 2023, 15:01:25 CET schrieb Oliver Neukum:
> I'm not sure if I can follow you here. Can you elaborate?
There are far better reasons to leave the setup of a PCI bus as the firmware
has done it than to leave a USB as is.
> How is it necessary? How do these PCI devices get attaches to the pci_bus_type
> bus without calling pci_bus_add_device?
AFAICT they don't. But somebody has to call it.
> Okay, so which dependency is provided by pci_sysfs_init, which are required by
> drivers then?
It isn't. It is missing from the code. But it exists in reality. That is the point.
You have a race condition between two probes. We cannot have that.
Hence IMHO the dependency would be best expressed by waiting for pci_sysfs_init()
to finish in the init sequence before you add any PCI bridges or devices to the system.
Regards
Oliver
prev parent reply other threads:[~2023-03-21 9:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 9:15 [PATCH v2 1/1] Guard pci_create_sysfs_dev_files with atomic value Alexander Stein
2023-03-16 9:18 ` Alexander Stein
2023-03-16 9:23 ` Oliver Neukum
2023-03-16 9:33 ` Alexander Stein
2023-03-16 11:17 ` Oliver Neukum
2023-03-16 11:58 ` Alexander Stein
2023-03-16 12:23 ` Oliver Neukum
2023-03-16 13:16 ` Alexander Stein
2023-03-16 14:01 ` Oliver Neukum
2023-03-16 15:00 ` Alexander Stein
2023-03-21 9:09 ` Oliver Neukum [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=a1cca367-52b6-a6b1-fb01-890cad39fd29@suse.com \
--to=oneukum@suse.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=bhelgaas@google.com \
--cc=korneliuszo@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.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