Fix build: only set iommu buswide flag if IOMMU code is included.

Sponsored by:	Innovate DSbD
This commit is contained in:
Ruslan Bukin 2020-10-19 22:32:36 +00:00
parent c489ab6141
commit bce74ff0ce

View File

@ -27,6 +27,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_iommu.h"
#include <sys/param.h>
#include <sys/module.h>
#include <sys/systm.h>
@ -499,6 +501,7 @@ ahci_pci_attach(device_t dev)
i++;
ctlr->quirks = ahci_ids[i].quirks;
#ifdef IOMMU
if (ctlr->quirks & AHCI_Q_IOMMU_BUSWIDE) {
/*
* The controller issues DMA requests from PCI function 1,
@ -507,6 +510,7 @@ ahci_pci_attach(device_t dev)
*/
bus_dma_iommu_set_buswide(dev);
}
#endif
/* Limit speed for my onboard JMicron external port.
* It is not eSATA really, limit to SATA 1 */