From: "Krzysztof Wilczyński" <kwilczynski@kernel.org>
To: Ravi Kumar Bandi <ravib@amazon.com>
Cc: bhelgaas@google.com, ilpo.jarvinen@linux.intel.com,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI/sysfs: Check IORESOURCE_DISABLED in resource mmap handler
Date: Wed, 13 May 2026 14:07:02 +0900 [thread overview]
Message-ID: <20260513043934.GA4124219@rocinante> (raw)
In-Reply-To: <20260513040401.16035-1-ravib@amazon.com>
Hello,
> Thank you, but as you suggested above, I will update the patch to use
> pci_dev_is_disconnected() instead.
There also exists pci_device_is_present() which would attempt an actual
read of a vendor/device IDs, so if this succeeds, then you have a more
solid assurance that the device should be working. However, this adds
latency, and there might be side-effects, potentially...
I wonder, if for you, you could forfeit setting any flags on a resource,
which drivers don't customarily do, such that we would only rely on
checking pci_dev_is_disconnected() on our side, so to speak.
We won't be setting any precedent here, as the helpers such as
pci_read_config_byte(), perform this check internally already.
Bjorn and Ilpo might have different take on this, though.
Thank you!
Krzysztof
next prev parent reply other threads:[~2026-05-13 5:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 8:43 [PATCH] PCI/sysfs: Check IORESOURCE_DISABLED in resource mmap handler Ravi Kumar Bandi
2026-05-12 9:26 ` Krzysztof Wilczyński
2026-05-12 9:43 ` Ilpo Järvinen
2026-05-12 9:54 ` Krzysztof Wilczyński
2026-05-13 4:04 ` Ravi Kumar Bandi
2026-05-13 5:07 ` Krzysztof Wilczyński [this message]
2026-05-13 6:48 ` Ravi Kumar Bandi
2026-05-13 4:13 ` [PATCH v2] PCI/sysfs: Check if device disabled " Ravi Kumar Bandi
2026-05-14 1:47 ` sashiko-bot
2026-05-13 19:42 ` [PATCH] PCI/sysfs: Check IORESOURCE_DISABLED " 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=20260513043934.GA4124219@rocinante \
--to=kwilczynski@kernel.org \
--cc=bhelgaas@google.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=ravib@amazon.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.