From: sashiko-bot@kernel.org
To: "Matthew Wood" <thepacketgeek@gmail.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/5] PCI: Add disconnected device checks to user config reads
Date: Sun, 25 Oct 2026 00:53:40 +0000 [thread overview]
Message-ID: <sashiko-outbox-183962@kernel.org> (raw)
In-Reply-To: <20261025000836.58294-2-thepacketgeek@gmail.com>
> Since commit 4b1038834739 ("PCI: Don't attempt config access to
> disconnected devices") the kernel config read accessors skip devices
> marked disconnected, returning PCIBIOS_DEVICE_NOT_FOUND and ~0 data.
> The user config read accessors still issue the read, and if the host
> bridge completes it with ~0 data and no error, they report success.
>
> Check pci_dev_is_disconnected() in pci_user_read_config_*() as well,
> failing with -ENODEV and ~0 data. Do the check after waiting for any
> pci_cfg_access_lock() holder so a reader blocked behind a reset also
> sees a device that was disconnected while it waited.
>
> This prepares for converting sysfs attributes from the kernel
> accessors to the user accessors so they keep skipping disconnected
> devices.
>
> On a disconnected device, existing callers of the user read accessors
> now behave as follows:
>
> - The sysfs "config" file and /proc/bus/pci ignore the return value
> and return the same ~0 data as before
> - pciconfig_read() fails with -EIO
> - VPD reads and VFIO config reads fail with -ENODEV instead of
> returning ~0 data
> - VPD writes fail with -ENODEV instead of timing out with a
> "firmware bug" warning
> - VFIO writes to PCI_COMMAND fail with -ENODEV, since VFIO reads the
> current value first
>
> Signed-off-by: Matthew Wood <thepacketgeek@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261025000836.58294-1-thepacketgeek@gmail.com?part=1
next prev parent reply other threads:[~2026-10-25 0:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 0:08 [PATCH 0/5] PCI/sysfs: Wait for config access lock in sysfs attributes Matthew Wood
2026-10-25 0:08 ` [PATCH 1/5] PCI: Add disconnected device checks to user config reads Matthew Wood
2026-10-25 0:53 ` sashiko-bot [this message]
2026-10-25 0:08 ` [PATCH 2/5] PCI/sysfs: Use user config accessors for bus number attributes Matthew Wood
2026-10-25 0:52 ` sashiko-bot
2026-10-26 15:00 ` Keith Busch
2026-10-25 0:08 ` [PATCH 3/5] PCI: Add pcie_capability_user_read_{word,dword}() Matthew Wood
2026-10-25 0:51 ` sashiko-bot
2026-10-26 15:20 ` Keith Busch
2026-10-25 0:08 ` [PATCH 4/5] PCI/sysfs: Use user config accessors for link attributes Matthew Wood
2026-10-25 0:52 ` sashiko-bot
2026-10-26 15:21 ` Keith Busch
2026-10-25 0:08 ` [PATCH 5/5] PCI/sysfs: Use user config accessors for serial_number Matthew Wood
2026-10-25 0:57 ` sashiko-bot
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=sashiko-outbox-183962@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=thepacketgeek@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.