Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3966820ybp; Mon, 7 Oct 2019 00:36:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyntipbQ4HVPqZLWpZz1T2gN2wejXkPZ/iHndbBDD7CO0/Xocib+QYJW5j0p0d5JaVbOmCg X-Received: by 2002:a17:906:7d10:: with SMTP id u16mr22716216ejo.194.1570433775566; Mon, 07 Oct 2019 00:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570433775; cv=none; d=google.com; s=arc-20160816; b=pOd9XJu8XPQRfJSphhaxnXqrzvd44rKSzD2xTP1tgUqZG1/8uCFOdQQZcBzRzZYZyM b/7PWKq0e/3dDe/Qa8t0ceM9Nnv/ym9CxpzhQiUkLxjP6C7nzTWaB7QqtNyk6PKwT5Lg P0psujTT0v9BLMhMl9wTkI+deRYCorzzHJ5ZdFy4DzkN11QY94jZBQIZ77Y3ZYDmmnkW IWI2OG/MxgsihE8aqOVg0HsrI/tH4Cq9STWsqVNpMvnQrlVJfUcj/+yR+aK5BGBYLAgK yjbb+XqEBiriuqEdh1Ulwhx+GnruJxsW6yNNpLTPpiev7/oXWmASojYox/w8JhcOxGcp 86vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JqL9PLzbvazAPecdkL0AxBQU96dirY9fQtTs88fHrt0=; b=GAe73vK17ZdMJeXuofowzhcj9oY1IXEHdxvXyLdUN0UiG5MQ8Pvxtd9gJELzS0B6ns TcH1t7nxtTYpPMMoO+8wGPpgUzxWWWZqJt3Ah2h6CCGm0K5vIOqsSDn/pBNMbcFtVopf t6Tsk9JeV0C0qX/HXgiacTEqhLXXKaBTsDKFfycZ69f5wM03S1o3jwp53q0uhFSrRbhf hkKf4opisHpoBYBmxFyz4NumyR1cIbEoTUi858Z6uLWfSRuCwtKi9s9URGSdBBMOBtxC PT836RG1NAGIACvXpqcEQlIMK+NzKxIPAWHzlzFyt1+L1G9kR0T3f8e9bBfgPXQOKzdd loSw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d25si7772326eds.40.2019.10.07.00.35.52; Mon, 07 Oct 2019 00:36:15 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727331AbfJGHex (ORCPT + 99 others); Mon, 7 Oct 2019 03:34:53 -0400 Received: from verein.lst.de ([213.95.11.211]:35373 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726960AbfJGHex (ORCPT ); Mon, 7 Oct 2019 03:34:53 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id D08CD68B20; Mon, 7 Oct 2019 09:34:48 +0200 (CEST) Date: Mon, 7 Oct 2019 09:34:48 +0200 From: Christoph Hellwig To: Arvind Sankar Cc: linux-kernel@vger.kernel.org, Christoph Hellwig Subject: Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2 Message-ID: <20191007073448.GA882@lst.de> References: <20191007022454.GA5270@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191007022454.GA5270@rani.riverdale.lan> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arvind, can you try the patch below? diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 3f974919d3bd..52b709bf2b55 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3775,6 +3775,13 @@ static int intel_map_sg(struct device *dev, struct scatterlist *sglist, int nele return nelems; } +static u64 intel_get_required_mask(struct device *dev) +{ + if (!iommu_need_mapping(dev)) + return dma_direct_get_required_mask(dev); + return DMA_BIT_MASK(32); +} + static const struct dma_map_ops intel_dma_ops = { .alloc = intel_alloc_coherent, .free = intel_free_coherent, @@ -3787,6 +3794,7 @@ static const struct dma_map_ops intel_dma_ops = { .dma_supported = dma_direct_supported, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, + .get_required_mask = intel_get_required_mask, }; static void