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=-5.3 required=3.0 tests=BAYES_00, 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 A1029C63777 for ; Mon, 30 Nov 2020 17:25:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4ED6D207F7 for ; Mon, 30 Nov 2020 17:25:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387502AbgK3RYo (ORCPT ); Mon, 30 Nov 2020 12:24:44 -0500 Received: from verein.lst.de ([213.95.11.211]:45231 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387484AbgK3RYo (ORCPT ); Mon, 30 Nov 2020 12:24:44 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id BA34C6736F; Mon, 30 Nov 2020 18:24:01 +0100 (CET) Date: Mon, 30 Nov 2020 18:24:01 +0100 From: Christoph Hellwig To: Alan Stern Cc: Hans de Goede , Greg KH , Tom Yan , Christoph Hellwig , linux-usb , Mathias Nyman , Linux Kernel Mailing List , linux-pci@vger.kernel.org, Lu Baolu Subject: Re: [PATCH 2/2] usb-storage: revert from scsi_add_host_with_dma() to scsi_add_host() Message-ID: <20201130172401.GA1735@lst.de> References: <09992cec-65e4-2757-aae6-8fb02a42f961@redhat.com> <20201128154849.3193-1-tom.ty89@gmail.com> <20201128154849.3193-2-tom.ty89@gmail.com> <5e62c383-22ea-6df6-5acc-5e9f381d4632@redhat.com> <186eb035-4bc4-ff72-ee41-aeb6d81888e3@redhat.com> <20201130172004.GA966032@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201130172004.GA966032@rowland.harvard.edu> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Nov 30, 2020 at 12:20:04PM -0500, Alan Stern wrote: > > https://lore.kernel.org/linux-usb/fde7e11f-5dfc-8348-c134-a21cb1116285@redhat.com/T/#t > > It's hard to go wrong with reverting, so it's okay with me. > > Still, Hans, have you checked out the difference between the > scsi_add_host() and scsi_add_host_with_dma() calls? It's just a matter > of using dev vs. sysdev. In particular, have you checked to see what > those two devices are on your system? > > It seems likely that if one of those calls messes up some DMA settings, > the other one does too -- just maybe not settings that matter much. The effects from scsi_add_host_with_dma should be: (1) picking which device is used for the SCSI dma map helpers (2) use dma_max_mapping_size() to limite the I/O size The helpers affected by (1) are not used by UAS (or usb-storage for that matter), while we do have a real bug in the intel-iommu with bounce buffering implementation used in the bug report. So my clear bet is on (2) not limiting the size, but the patch that would have fixed this did not make a different for Hans, which leaves me a little confused.