diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2013-06-12 13:09:08 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-06-24 15:02:53 -0400 |
commit | 636d73da27e83ce4882f8823f79063bb37980961 (patch) | |
tree | fd3824416e3d16191822ad22bd1cd564537479d1 /drivers/net/ethernet/sfc | |
parent | 1899c111a535e43046b14ae13639747d9d2544d6 (diff) |
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: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r-- | drivers/net/ethernet/sfc/rx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c index 5c45118cc03a..65646cd7af8e 100644 --- a/drivers/net/ethernet/sfc/rx.c +++ b/drivers/net/ethernet/sfc/rx.c | |||
@@ -677,7 +677,7 @@ static void efx_init_rx_recycle_ring(struct efx_nic *efx, | |||
677 | #ifdef CONFIG_PPC64 | 677 | #ifdef CONFIG_PPC64 |
678 | bufs_in_recycle_ring = EFX_RECYCLE_RING_SIZE_IOMMU; | 678 | bufs_in_recycle_ring = EFX_RECYCLE_RING_SIZE_IOMMU; |
679 | #else | 679 | #else |
680 | if (efx->pci_dev->dev.iommu_group) | 680 | if (iommu_present(&pci_bus_type)) |
681 | bufs_in_recycle_ring = EFX_RECYCLE_RING_SIZE_IOMMU; | 681 | bufs_in_recycle_ring = EFX_RECYCLE_RING_SIZE_IOMMU; |
682 | else | 682 | else |
683 | bufs_in_recycle_ring = EFX_RECYCLE_RING_SIZE_NOIOMMU; | 683 | bufs_in_recycle_ring = EFX_RECYCLE_RING_SIZE_NOIOMMU; |