Page MenuHomeFreeBSD

D33285.diff
No OneTemporary

D33285.diff

diff --git a/sys/dev/nvme/nvme_ahci.c b/sys/dev/nvme/nvme_ahci.c
--- a/sys/dev/nvme/nvme_ahci.c
+++ b/sys/dev/nvme/nvme_ahci.c
@@ -104,7 +104,14 @@
}
ctrlr->tag = (void *)0x1;
- return nvme_attach(dev);
+ /*
+ * We're attached via this funky mechanism. Flag the controller so that
+ * it avoids things that can't work when we do that, like asking for
+ * PCI config space entries.
+ */
+ ctrlr->quirks |= QUIRK_AHCI;
+
+ return (nvme_attach(dev)); /* Note: failure frees resources */
bad:
if (ctrlr->resource != NULL) {
bus_release_resource(dev, SYS_RES_MEMORY,
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -241,6 +241,7 @@
#define QUIRK_DELAY_B4_CHK_RDY 1 /* Can't touch MMIO on disable */
#define QUIRK_DISABLE_TIMEOUT 2 /* Disable broken completion timeout feature */
#define QUIRK_INTEL_ALIGNMENT 4 /* Pre NVMe 1.3 performance alignment */
+#define QUIRK_AHCI 8 /* Attached via AHCI redirect */
bus_space_tag_t bus_tag;
bus_space_handle_t bus_handle;

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 5, 7:50 AM (16 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13624425
Default Alt Text
D33285.diff (1 KB)

Event Timeline