Skip to content

sandisk: use common PCI ID lookup helper - #4036

Open
allen4791 wants to merge 1 commit into
linux-nvme:masterfrom
allen4791:fix/sandisk-common-pci-ids
Open

allen4791 wants to merge 1 commit into
linux-nvme:masterfrom
allen4791:fix/sandisk-common-pci-ids

Conversation

@allen4791

Copy link
Copy Markdown

Link: #3663
This PR replaces the sandisk plugin's own PCI ID lookup function with the shared nvme_get_pci_ids() helper that other plugins (e.g. wdc) already use, so sandisk doesn't need to keep a separate copy of the same logic.
Validation
Compared the old and new PCI ID lookup implementations to confirm they resolve to the same sysfs paths and parse values the same way.
I built and ran the full existing test suite on Ubuntu 22.04 to confirm nothing else broke, though none of those tests actually
cover the sandisk plugin.

This is my first PR to nvme-cli, so please let me know if there's anything I'm missing.

Replace all sndk_get_pci_ids() calls with nvme_get_pci_ids(), passing
vendor and device IDs in the order expected by the common helper.
Remove the duplicate sysfs lookup implementation and its declaration.
Keep the existing Identify fallback for NVMe-oF devices.

Link: linux-nvme#3663

Signed-off-by: Allen47 <149938169+allen4791@users.noreply.github.com>
@igaw

igaw commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Looks good. The only thing I would like to change is to drop the 'Link: #3663' reference in the commit message. The commit message should be self contained and only point to external reference on exceptions. This is because we never know when github decides to go evil or so. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants