From: Joerg Roedel jroedel@suse.de
mainline inclusion from mainline-v4.20-rc1 commit 05afde1a7ef3ddde5e7657b9faeb6347423a9acb category:feature bugzilla:NA CVE:NA
-------------------
Replace the dev->iommu_group check with a proper function call that better reprensents its purpose.
Cc: Mathias Nyman mathias.nyman@intel.com Acked-by: Robin Murphy robin.murphy@arm.com Acked-by: Mathias Nyman mathias.nyman@linux.intel.com Signed-off-by: Joerg Roedel jroedel@suse.de Signed-off-by: Chen Jun chenjun102@huawei.com Reviewed-by: Hanjun Guo guohanjun@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 24d465cdf05c..9364b8283000 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -242,7 +242,7 @@ static void xhci_zero_64b_regs(struct xhci_hcd *xhci) * an iommu. Doing anything when there is no iommu is definitely * unsafe... */ - if (!(xhci->quirks & XHCI_ZERO_64B_REGS) || !dev->iommu_group) + if (!(xhci->quirks & XHCI_ZERO_64B_REGS) || !device_iommu_mapped(dev)) return;
xhci_info(xhci, "Zeroing 64bit base registers, expecting fault\n");