From 34edf7df1b7fbec3eef5dcf23d8ae6b5a18ceb6b Mon Sep 17 00:00:00 2001 From: zrj Date: Mon, 1 Jan 2018 10:51:48 +0200 Subject: [PATCH] kernel/nata: Add loader hint to disable nata attach. For cases where atapci devices (including cdroms) would fail to attach or have other issues and are not needed for booting(like setup uses CAM, NVME, VIRTIO). We include nata(4) in a X86_64_GENERIC kernel config, probing of ata bus can be disabled by setting: "atapciN.disabled=1" (where N is ata pci unit). --- sys/dev/disk/nata/ata-pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/disk/nata/ata-pci.c b/sys/dev/disk/nata/ata-pci.c index 11f215a5bc..eadeb20c7f 100644 --- a/sys/dev/disk/nata/ata-pci.c +++ b/sys/dev/disk/nata/ata-pci.c @@ -65,6 +65,9 @@ static const struct none_atapci { int ata_pci_probe(device_t dev) { + if (resource_disabled("atapci", device_get_unit(dev))) + return (ENXIO); + if (pci_get_class(dev) != PCIC_STORAGE) return ENXIO; -- 2.11.4.GIT