Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 636d73da authored by Ben Hutchings's avatar Ben Hutchings
Browse files

sfc: Improve test for IOMMU in use



The device::iommu_group field may be set even if no IOMMU is in use.
iommu_present() is still a better indicator, although it doesn't tell
us whether *our* device is affected.

Reported-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
parent 1899c111
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -677,7 +677,7 @@ static void efx_init_rx_recycle_ring(struct efx_nic *efx,
#ifdef CONFIG_PPC64
	bufs_in_recycle_ring = EFX_RECYCLE_RING_SIZE_IOMMU;
#else
	if (efx->pci_dev->dev.iommu_group)
	if (iommu_present(&pci_bus_type))
		bufs_in_recycle_ring = EFX_RECYCLE_RING_SIZE_IOMMU;
	else
		bufs_in_recycle_ring = EFX_RECYCLE_RING_SIZE_NOIOMMU;