Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3748711pxu; Mon, 30 Nov 2020 09:28:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoH9s9Y05TZXToluKauJiMb/tmgpuG4ll27Un7O+6KdveI/4/I1DT6kSNAprf1Z44TLYyb X-Received: by 2002:a17:906:3294:: with SMTP id 20mr22167753ejw.239.1606757311770; Mon, 30 Nov 2020 09:28:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606757311; cv=none; d=google.com; s=arc-20160816; b=o8k1UetRxXmPEbMKicMbNGpIlo5cGQo71bnDNOmGq1xzhH+D+MNHanVXoI4iqDmgtH z3tNIgsDds6NObOzN3I1n1jdvjxnCooZmnid3WX1MHHWG+nhoBrhLos/Sh3bqUJ1+2Lz rCAskdfgsxoIFua28dI130kRoj5A/0PjHm7GqXzA58U+l0fq+YYbdFIncc9jWt/dSOh4 RnpF9AU2l4Aq6AAdWP9C8uQSfxb5HmEGON4ZvmdMcZHiUnz7LeeYD5CPvv0Bb3J1LEOx ZjDWBqZji92GwtbNBi+l8soxMhpiUuKAGhKr4cyomD8hkJNn/ClBfqMLrENi4w3ONZ1D P2FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=H8m01iKUjGBIRkbwSiJJlIDMN/ThzvsDw73rC1AMzb8=; b=o7nqFP97KWxI2e2mpAFrb7jG+zmioYfU9vI+Ij823GxEQ8fptRFkuFeoyo7lyP5IxA Ck3k6PvUAgQ5aW6O/SlGUMU7lIA8NoALiXx0DmK26LwANcyt8LRRW4QBJpSTb6ueuELX nAzy5vf96eByPxoLr2rRF0/R1OoL6nUXMSoDyfODGX0j+timx0qurmEUzcA0Y/FfTmB2 4goM9iJBpG+QFMf4lXzj7uDER/CwvUw2af+EMQtkTWEHux7bmotlAHr4JrT5bw57jGxe y0jVTMszK1H9tttHT4Er6G7CD9kHBoHYeYtVE8mSQ4YhaFqlHQDslq2nzv2boanjVxAS FScw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq11si11512621edb.332.2020.11.30.09.28.09; Mon, 30 Nov 2020 09:28:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387504AbgK3RYp (ORCPT + 99 others); Mon, 30 Nov 2020 12:24:45 -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-kernel@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.