diff mbox series

[5/6] xhci: Use device_iommu_mapped()

Message ID 20181211134343.10664-6-joro@8bytes.org (mailing list archive)
State Not Applicable
Headers show
Series Introduce device_iommu_mapped() function | expand

Commit Message

Joerg Roedel Dec. 11, 2018, 1:43 p.m. UTC
From: Joerg Roedel <jroedel@suse.de>

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>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/usb/host/xhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mathias Nyman Dec. 17, 2018, 11:21 a.m. UTC | #1
On 11.12.2018 15:43, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> 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>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
>   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 dae3be1b9c8f..8eacd2ed412b 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -244,7 +244,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");
> 

Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
diff mbox series

Patch

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index dae3be1b9c8f..8eacd2ed412b 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -244,7 +244,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");