Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp168718ima; Fri, 1 Feb 2019 01:15:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN6H17FQtHqohBq7LzSDH/pdn5lHNrvBqtsUtbNmzLWVO5RZ4PxJ7x6lwzhjNEsk1Egy0pDd X-Received: by 2002:a62:6303:: with SMTP id x3mr39466758pfb.110.1549012548710; Fri, 01 Feb 2019 01:15:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549012548; cv=none; d=google.com; s=arc-20160816; b=DxZbt8qnOxTAL6eI/WRIMZrMSdoO5DYfjyB8UYk/Bq4VqvekSdp0tJevn0D41SbvnJ P2MHGiX9ZKd00Juc4j7BMgX4IT7Gd2sVK43S7b7C+HG/jM/ueEqqow3zkIwcPXHW0hIx zYeq3DrHMZwaYn5jLKTdo46+fhHrGL1ZO4Fbwn9qewdI8mbQSrW1gnX174zWuOk1BQcd 8o3uPxLRfkYzg8hx6XUX5Og1PBMVyyFbUQRLanre4NNk36wmq529cR9fBgYV9tKz0DIy 27jACuHz/DCGj+VSnGA7lB3LoOXSeYY3xh9pxGnvuKwI/VGVNk2v86fPavT4+mjaWeyd LNFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=x9jp2/6MoFttI9o26xPFXkowarBIFVfLgDRszMUeC1M=; b=hSctrO3D6oRSyfUhIcUSnU/4T1vb64YYtUdhxrtyhhRMkE5b4a50R6czZsDXO4Ezas t8Oc2wWUqAvisqzuU80/cY6+LZMJ2zKtWnVoPj5W4fDCI/eqi9yQYMMxuX7H0EOJqL+S VCtylFb9iWGePjiJbc2u6Jct/zippKu49MUavCyDFIWQ/9kZVGieUdw9owrDHr8uO4fP E+6XLthD7FKXgU+P0gXl4wHsXK8eGgBqcrwzQSkf950ApqmlBQleysFn98VCF56a41zA NzgqN2dHVbFXgA8qBX+FpA7xvJxHOUj5qHfcIqS6VCQGjFjewy38Uv5HYgK5h9rfWJox ICDA== 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 i17si6959991pgk.233.2019.02.01.01.15.32; Fri, 01 Feb 2019 01:15:48 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729211AbfBAJOy (ORCPT + 99 others); Fri, 1 Feb 2019 04:14:54 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:36692 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726428AbfBAJOy (ORCPT ); Fri, 1 Feb 2019 04:14:54 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 558F7E56BC4368A1FF86; Fri, 1 Feb 2019 17:14:51 +0800 (CST) Received: from [127.0.0.1] (10.177.223.23) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.408.0; Fri, 1 Feb 2019 17:14:40 +0800 Subject: Re: [RFC PATCH] USB: PCI: set 32bit DMA mask for PCI based USB controllers From: Hanjun Guo To: John Garry , Greg Kroah-Hartman , Robin Murphy , "Lorenzo Pieralisi" , "Rafael J. Wysocki" , Bjorn Helgaas , Christoph Hellwig CC: , , , , , Jonathan Cameron , , Hanjun Guo References: <1548831714-3706-1-git-send-email-guohanjun@huawei.com> Message-ID: Date: Fri, 1 Feb 2019 17:13:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.223.23] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/2/1 13:55, Hanjun Guo wrote: > Hi John, > > On 2019/1/31 17:54, John Garry wrote: >> On 30/01/2019 07:01, Hanjun Guo wrote: >>> From: Hanjun Guo > [...] >>> >>> ?drivers/usb/core/hcd-pci.c | 4 ++++ >>> ?1 file changed, 4 insertions(+) >>> >>> diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c >>> index 0343246..a9c33e6 100644 >>> --- a/drivers/usb/core/hcd-pci.c >>> +++ b/drivers/usb/core/hcd-pci.c >>> @@ -188,6 +188,10 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) >>> ???? if (pci_enable_device(dev) < 0) >>> ???????? return -ENODEV; >>> >>> +??? retval = dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32)); >>> +??? if (retval) >>> +??????? return retval; >> >> Hi Hanjun, >> >> You're missing tidy-up upon failure. > > Good catch, needs to disable pci for failure, I will send > a updated version to address the comments from you and Christoph. There is a _DMA method which was introduced in ACPI 6.2 to cover this, I will try that solution then report back. Thanks Hanjun