All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Matthew Wood" <thepacketgeek@gmail.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 4/5] PCI/sysfs: Use user config accessors for link attributes
Date: Thu, 29 Oct 2026 19:24:36 +0000	[thread overview]
Message-ID: <sashiko-outbox-189872@kernel.org> (raw)
In-Reply-To: <20261029192032.1325629-5-thepacketgeek@gmail.com>

> max_link_width, current_link_speed and current_link_width read the PCIe
> Link Capabilities and Link Status registers with the kernel config
> accessors. Those don't check block_cfg_access so a read that races
> with a reset goes to the device mid-reset and can fail or return a bogus
> value.
> 
> Use pcie_capability_user_read_{word,dword}() instead so the read waits for
> any pci_cfg_access_lock() holder (e.g. pci_reset_function()) to finish. For
> max_link_width, this means inlining the pcie_get_width_cap() logic
> instead of creating an additional helper with this single calling location.
> 
> Signed-off-by: Matthew Wood <thepacketgeek@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261029192032.1325629-1-thepacketgeek@gmail.com?part=4


  reply	other threads:[~2026-10-29 19:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 19:20 [PATCH v2 0/5] PCI/sysfs: Wait for config access lock in sysfs attributes Matthew Wood
2026-10-29 19:20 ` [PATCH v2 1/5] PCI: Add disconnected device checks to user config reads Matthew Wood
2026-10-29 19:24   ` sashiko-bot
2026-10-29 19:20 ` [PATCH v2 2/5] PCI/sysfs: Use user config accessors for bus number attributes Matthew Wood
2026-10-29 19:23   ` sashiko-bot
2026-10-29 19:20 ` [PATCH v2 3/5] PCI: Add pcie_capability_user_read_{word,dword}() Matthew Wood
2026-10-29 19:26   ` sashiko-bot
2026-10-29 19:20 ` [PATCH v2 4/5] PCI/sysfs: Use user config accessors for link attributes Matthew Wood
2026-10-29 19:24   ` sashiko-bot [this message]
2026-10-29 19:20 ` [PATCH v2 5/5] PCI/sysfs: Use user config accessors for serial_number Matthew Wood
2026-10-29 19:24   ` 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-189872@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.