From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBE55C35240 for ; Thu, 30 Jan 2020 16:42:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 955372082E for ; Thu, 30 Jan 2020 16:42:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727241AbgA3Qmh (ORCPT ); Thu, 30 Jan 2020 11:42:37 -0500 Received: from verein.lst.de ([213.95.11.211]:40977 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727224AbgA3Qmh (ORCPT ); Thu, 30 Jan 2020 11:42:37 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id B46FF68B20; Thu, 30 Jan 2020 17:42:35 +0100 (CET) Date: Thu, 30 Jan 2020 17:42:35 +0100 From: Christoph Hellwig To: Kishon Vijay Abraham I Cc: Christoph Hellwig , "linux-pci@vger.kernel.org" Subject: Re: pci-usb/pci-sata broken with LPAE config after "reduce use of block bounce buffers" Message-ID: <20200130164235.GA6705@lst.de> References: <120f7c3e-363d-deb0-a347-782ac869ee0d@ti.com> <20200130075833.GC30735@lst.de> <4a41bd0d-6491-3822-172a-fbca8a6abba5@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4a41bd0d-6491-3822-172a-fbca8a6abba5@ti.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Thu, Jan 30, 2020 at 01:39:58PM +0530, Kishon Vijay Abraham I wrote: > Hi Christoph, > > On 30/01/20 1:28 pm, Christoph Hellwig wrote: > > On Fri, Nov 15, 2019 at 04:29:31PM +0530, Kishon Vijay Abraham I wrote: > >> Hi Christoph, > >> > >> I think we are encountering a case where the connected PCIe card (like PCIe USB > >> card) supports 64-bit addressing and the ARM core supports 64-bit addressing > >> but the PCIe controller in the SoC to which PCIe card is connected supports > >> only 32-bits. > >> > >> Here dma APIs can provide an address above the 32 bit region to the PCIe card. > >> However this will fail when the card tries to access the provided address via > >> the PCIe controller. > > > > What kernel version do you test? The classic arm version of dma_capable > > doesn't take the bus dma mask into account. In Linux 5.5 I switched > > ARM to use the generic version in > > > > 130c1ccbf55 ("dma-direct: unify the dma_capable definitions") > > > > so with that this case is supposed to work, without that it doesn't > > have much of a chance. > > I got into a new issue in 5.5 kernel with NVMe card wherein I get the > below warn dump. This is different from the issue I initially posted > seen with USB and SATA cards (I was getting a data mismatch then). With > 5.5 kernel I don't see those issues anymore in USB card. I only see the > below warn dump with NVMe card. Can you throw in a little debug printk if this comes from dma_direct_possible or swiotlb_map?