Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157533233
D56994.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
930 B
Referenced Files
None
Subscribers
None
D56994.id.diff
View Options
diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c
--- a/sys/dev/nvme/nvme_sim.c
+++ b/sys/dev/nvme/nvme_sim.c
@@ -312,13 +312,20 @@
static int
nvme_sim_probe(device_t dev)
{
+ device_t nvmedev;
+
if (nvme_use_nvd)
return (ENXIO);
/*
* Only do storage devices with CAM. NVMHCI 1.0 interfaces are the only
- * ones that have namespaces with LBA ranges on them.
+ * ones that have namespaces with LBA ranges on them. But to ask the
+ * question, we need to ask the nvme device iif it's attached to the PCI
+ * bus. Otherwise, we assume it's storage (ahci attached nvme devices are,
+ * and any future weird bus topology devices will be).
*/
- if (pci_get_progif(device_get_parent(dev)) !=
+ nvmedev = device_get_parent(dev);
+ if (strcmp(device_get_name(device_get_parent(nvmedev)), "pci") == 0 &&
+ pci_get_progif(nvmedev) !=
PCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0)
return (ENXIO);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 23, 12:40 PM (6 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33055362
Default Alt Text
D56994.id.diff (930 B)
Attached To
Mode
D56994: nvme: Fix broken ahci attachment
Attached
Detach File
Event Timeline
Log In to Comment