[bug report] nvme removing after probe failed with pci rescan after nvme sysfs removal

Yi Zhang yi.zhang at redhat.com
Tue Sep 21 18:56:47 PDT 2021


Hello

I found this issue during the nvme removal test, I did some debug code
found it was failed during nvme "CSTS – Controller Status" read, could
anyone help check if this is one HW or SW issue?


# nvme list
Node                  SN                   Model
             Namespace Usage                      Format           FW
Rev
--------------------- --------------------
---------------------------------------- ---------
-------------------------- ---------------- --------
/dev/nvme0n1          S48CNC0N400972B      Samsung SSD 983 DCT 960GB
             1           4.10  kB / 960.20  GB    512   B +  0 B
EDA5302Q
# lspci -s 87:00.0 -v
87:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd
NVMe SSD Controller SM981/PM981/PM983 (prog-if 02 [NVM Express])
DeviceName: PCIe SSD in Slot 23 Bay 1
Subsystem: Samsung Electronics Co Ltd Device a801
Physical Slot: 7
Flags: bus master, fast devsel, latency 0, IRQ 46, NUMA node 1
Memory at c8600000 (64-bit, non-prefetchable) [size=16K]
Expansion ROM at c8610000 [disabled] [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [b0] MSI-X: Enable+ Count=33 Masked-
Capabilities: [100] Advanced Error Reporting
Capabilities: [148] Device Serial Number 00-00-00-00-00-00-00-00
Capabilities: [158] Power Budgeting <?>
Capabilities: [168] Secondary PCI Express
Capabilities: [188] Latency Tolerance Reporting
Capabilities: [190] L1 PM Substates
Kernel driver in use: nvme
Kernel modules: nvme

# echo 1 >/sys/bus/pci/devices/0000\:87\:00.0/remove
# echo 1 >/sys/bus/pci/rescan
# dmesg
[  251.864254] pci 0000:87:00.0: [144d:a808] type 00 class 0x010802
[  251.864286] pci 0000:87:00.0: reg 0x10: [mem 0xc8600000-0xc8603fff 64bit]
[  251.864337] pci 0000:87:00.0: reg 0x30: [mem 0xffff0000-0xffffffff pref]
[  251.889196] pci 0000:87:00.0: BAR 6: assigned [mem
0xc8600000-0xc860ffff pref]
[  251.889206] pci 0000:87:00.0: BAR 0: assigned [mem
0xc8610000-0xc8613fff 64bit]
[  251.889777] nvme nvme0: pci function 0000:87:00.0
[  251.889888] nvme nvme0: readl(dev->bar + NVME_REG_CSTS) == -1,
return - ENODEV
[  251.898057] nvme nvme0: nvme_pci_enable: -19
[  251.902821] nvme nvme0: Removing after probe failure status: -19


-- 
Best Regards,
  Yi Zhang




More information about the Linux-nvme mailing list