Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp666471imu; Tue, 11 Dec 2018 05:45:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/VzQiDSReEeG+PYqnX1w1NMeb/I2sibAD9kCtlGOTp4GN3iuNjdjlJ7JjdmN+0x9T4fver/ X-Received: by 2002:a63:451a:: with SMTP id s26mr14757567pga.150.1544535937132; Tue, 11 Dec 2018 05:45:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544535937; cv=none; d=google.com; s=arc-20160816; b=Mkx67ezq+5/PVgiaVhTLeQ87QH7DHKpifEQomJShIN+vXBXWrHYlDUHNgABiskUVZc +PqqVcyGkFFRZOY26ub1VsMxYX2vpUzIzySBDKe9951+YMTy01llCfqe3NJ/Enit5baD gHT3fixxzgzUSQISxMHFm7XNAUqP8b5N+xS+HTsYTyRS5UoJYEjvnDLhYWEwV/ZHJdkd YrUFjJLkA7JGkqhJ90pUPt4GgeEKDyWgneq48xi71mWbu4Oc6BYW+hiHxoCYja7U7JQM uN1igWfn/zTgIuWuHoZ9yuMbdpZLZ4lL4meLSkd54P133sYW1nCXZVDwBS6RHDM9sQbX akIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=a78Kd8jTUd/2Wz6aXJROX1ZADQwmHrVe2ufsfCBogGs=; b=gWnefMxNiXpbirE6GoUdwkLw35vX97ioRRgkY7ixfCptaCSdYxMvIR6heghrH27Ae6 /88SBvEzVjxKhaGakM+tK0XFkrCBTzTuIh5uJm1dQSLaGwtt82IAUIoSO0xEtwKkmhmo F06PWty7/IzvWti7+MoenSHK1n7DLIKhxd7HOpFgRHxRtOA5UAjcaV6cW6DQRIKFkOhp HaDiiQvsIOkuPExS9Ch0nmJfhNp4ieoHSyXQUqvDykK3gZNR165AGW/DzjowgbxNYg1C wjNZy2pZ22lOWqH1zcunJMJglrGpvd/yiHUz1zFDZunHVeUA+9fQ1d4OD4GEE2xZ6dhe JJWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c65si13503708pfa.148.2018.12.11.05.44.59; Tue, 11 Dec 2018 05:45:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726620AbeLKNnz (ORCPT + 99 others); Tue, 11 Dec 2018 08:43:55 -0500 Received: from 8bytes.org ([81.169.241.247]:53380 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726578AbeLKNnu (ORCPT ); Tue, 11 Dec 2018 08:43:50 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id 54DCC5D8; Tue, 11 Dec 2018 14:43:47 +0100 (CET) From: Joerg Roedel To: iommu@lists.linux-foundation.org Cc: Russell Currey , Sam Bobroff , oohall@gmail.com, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Dan Williams , Vinod Koul , Joerg Roedel , jroedel@suse.de, Mathias Nyman , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, dmaengine@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH 5/6] xhci: Use device_iommu_mapped() Date: Tue, 11 Dec 2018 14:43:42 +0100 Message-Id: <20181211134343.10664-6-joro@8bytes.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181211134343.10664-1-joro@8bytes.org> References: <20181211134343.10664-1-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel Replace the dev->iommu_group check with a proper function call that better reprensents its purpose. Cc: Mathias Nyman Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- 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"); -- 2.17.1