diff options
Diffstat (limited to 'sys/dev/iommu')
| -rw-r--r-- | sys/dev/iommu/busdma_iommu.c | 7 | ||||
| -rw-r--r-- | sys/dev/iommu/iommu_gas.c | 2 | 
2 files changed, 6 insertions, 3 deletions
| diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c index 668ccf056463..82f73d469585 100644 --- a/sys/dev/iommu/busdma_iommu.c +++ b/sys/dev/iommu/busdma_iommu.c @@ -295,7 +295,6 @@ iommu_instantiate_ctx(struct iommu_unit *unit, device_t dev, bool rmrr)  		} else {  			iommu_free_ctx_locked(unit, ctx);  		} -		ctx = NULL;  	}  	return (ctx);  } @@ -303,6 +302,7 @@ iommu_instantiate_ctx(struct iommu_unit *unit, device_t dev, bool rmrr)  struct iommu_ctx *  iommu_get_dev_ctx(device_t dev)  { +	struct iommu_ctx *ctx;  	struct iommu_unit *unit;  	unit = iommu_find(dev, bootverbose); @@ -313,7 +313,10 @@ iommu_get_dev_ctx(device_t dev)  		return (NULL);  	iommu_unit_pre_instantiate_ctx(unit); -	return (iommu_instantiate_ctx(unit, dev, false)); +	ctx = iommu_instantiate_ctx(unit, dev, false); +	if (ctx != NULL && (ctx->flags & IOMMU_CTX_DISABLED) != 0) +		ctx = NULL; +	return (ctx);  }  bus_dma_tag_t diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index ffa8dc096adc..80e37341b3dc 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -77,7 +77,7 @@ static int iommu_check_free;  #endif  static void -intel_gas_init(void) +intel_gas_init(void *dummy __unused)  {  	iommu_map_entry_zone = uma_zcreate("IOMMU_MAP_ENTRY", | 
