]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nvme: don't reject probe due to duplicate IDs for single-ported PCIe devices
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Jul 2023 13:30:42 +0000 (15:30 +0200)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:20:22 +0000 (17:20 +0200)
commit7f4416eac60db28e3fa9e39faa98891872344728
tree3043b8961e51cae96911f54bca3446e3df9ecb0e
parentc107111e8d92ea90cd3a298b92bdf5f1e3904972
nvme: don't reject probe due to duplicate IDs for single-ported PCIe devices

BugLink: https://bugs.launchpad.net/bugs/2036075
commit ac522fc6c3165fd0daa2f8da7e07d5f800586daa upstream.

While duplicate IDs are still very harmful, including the potential to easily
see changing devices in /dev/disk/by-id, it turn out they are extremely
common for cheap end user NVMe devices.

Relax our check for them for so that it doesn't reject the probe on
single-ported PCIe devices, but prints a big warning instead.  In doubt
we'd still like to see quirk entries to disable the potential for
changing supposed stable device identifier links, but this will at least
allow users how have two (or more) of these devices to use them without
having to manually add a new PCI ID entry with the quirk through sysfs or
by patching the kernel.

Fixes: 2079f41ec6ff ("nvme: check that EUI/GUID/UUID are globally unique")
Cc: stable@vger.kernel.org # 6.0+
Co-developed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/nvme/host/core.c