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=-8.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 D5FE3C64E8A for ; Mon, 30 Nov 2020 18:20:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85DE620789 for ; Mon, 30 Nov 2020 18:20:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="h3k08Jvw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729636AbgK3SUe (ORCPT ); Mon, 30 Nov 2020 13:20:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21387 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729603AbgK3SUe (ORCPT ); Mon, 30 Nov 2020 13:20:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606760347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vpk6I40VopO59OgCMYgesz1THx7bQXJvIwP+xEc7HEQ=; b=h3k08JvwLZunGGFGNPjsnbRenBLbom/wjIZmjz8+DYFVrrNYB7b0vbvUiV4cBZAb+Uhz+C AEUCviMWb7ofpU88fQFVw2KrphVXCrEoz+rbEBOeh98ffS/ZKS9F6odxjeUgnw6uLLNiaR X7FdBea05PIQKTDE6nK2UepDxFhjyJ0= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-383-I4Hohb0GOBKQnPKqYjBmiQ-1; Mon, 30 Nov 2020 13:19:02 -0500 X-MC-Unique: I4Hohb0GOBKQnPKqYjBmiQ-1 Received: by mail-ed1-f69.google.com with SMTP id s7so7198383eds.17 for ; Mon, 30 Nov 2020 10:19:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vpk6I40VopO59OgCMYgesz1THx7bQXJvIwP+xEc7HEQ=; b=CQWojsICEbfbOIV0axpk+GNiGcxq/XZrCrRN+5c7pqqEIss985zOdEVRdZASorFsqO hUUUYXzWPSQc0tguIXuEZdKycXSUMF+QCXe7dzXO2v+v8EFq6afgtUOC2p8TlHpRz0K2 5+Ss67IX4+Pesa8ZX6lYN9bOoyvUsDRNdbcX9h5aqKnE3Xkij9IHzakVLMUsP1XWJuxx eVSacPooMlpbdxmQYQeNNfdgecZknW9x1Vj5FRErDieSpcqCCVVsgxRxrcFYupYEGALU G4sLJ71KqJPbLoEevlVa6v0OchzV8aWIUmGLNCD5EgGsvv0B6J4eIO7GEjtWanMFDS+3 dX8A== X-Gm-Message-State: AOAM531zddAd8D1dy7++VuG4qoa5t1YKjjdom2JRLnD1n62nW75HhQ3W 0xznyQL7N+ENsNZlrU5yYCfMkUrzv0au1c+6EupO1QzEdiaBsnn3npOqbp+ZzqsNazNf3PEAonU NisLZJYmUBB/mldwwzqbP X-Received: by 2002:a50:da84:: with SMTP id q4mr22690812edj.377.1606760339860; Mon, 30 Nov 2020 10:18:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7e7Ny+dw3Vzt5jfmMjutla+i8r+BmbQoRbN9bFKPNsr2tG0kTRoVsYpfwnF7+UlTe+2pGXg== X-Received: by 2002:a50:da84:: with SMTP id q4mr22690625edj.377.1606760337762; Mon, 30 Nov 2020 10:18:57 -0800 (PST) Received: from x1.localdomain (2001-1c00-0c0c-fe00-d2ea-f29d-118b-24dc.cable.dynamic.v6.ziggo.nl. [2001:1c00:c0c:fe00:d2ea:f29d:118b:24dc]) by smtp.gmail.com with ESMTPSA id pj5sm6029636ejb.60.2020.11.30.10.18.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2020 10:18:56 -0800 (PST) Subject: Re: [PATCH 2/2] usb-storage: revert from scsi_add_host_with_dma() to scsi_add_host() To: Alan Stern Cc: Greg KH , Tom Yan , Christoph Hellwig , linux-usb , Mathias Nyman , Linux Kernel Mailing List , linux-pci@vger.kernel.org, Lu Baolu 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> From: Hans de Goede Message-ID: Date: Mon, 30 Nov 2020 19:18:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201130172004.GA966032@rowland.harvard.edu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi, On 11/30/20 6:20 PM, Alan Stern wrote: > On Mon, Nov 30, 2020 at 02:36:38PM +0100, Hans de Goede wrote: >> Hi, >> >> On 11/30/20 2:30 PM, Greg KH wrote: >>> On Mon, Nov 30, 2020 at 02:23:48PM +0100, Hans de Goede wrote: >>>> Hi, >>>> >>>> On 11/30/20 1:58 PM, Tom Yan wrote: >>>>> It's merely a moving of comment moving for/and a no-behavioral-change >>>>> adaptation for the reversion.> >>>> >>>> IMHO the revert of the troublesome commit and the other/new changes really >>>> should be 2 separate commits. But I will let Alan and Greg have the final >>>> verdict on this. >>> >>> I would prefer to just revert the commits and not do anything >>> different/special here so late in the release cycle. >>> >>> So, if Alan agrees, I'll be glad to do them on my end, I just need the >>> commit ids for them. >> >> The troublesome commit are (in reverse, so revert, order): >> >> 5df7ef7d32fe ("uas: bump hw_max_sectors to 2048 blocks for SS or faster drives") >> 558033c2828f ("uas: fix sdev->host->dma_dev") >> 0154012f8018 ("usb-storage: fix sdev->host->dma_dev") >> >> Alan, the reason for reverting these is that using scsi_add_host_with_dma() as the >> last 2 patches do, with the dmadev argument of that call pointing to the device >> for the XHCI controller is causing changes to the DMA settings of the XHCI controller >> itself which is causing regressions in 5.10, see this email thread: >> >> 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? Its not just dev vs sysdev, its iface->dev vs bus->sysdev, and I assume that the latter is actually the XHCI controller. my vote goes to reverting to avoid the regression for 5.10, esp. since this is a clean revert of 3 patches with nothing depending / building on top of the reverted commits. Then for 5.11 we can retry to introduce similar changes. I would be happy to try a new patch-set for 5.11. > 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. I'm not very familiar with all the DMA mapping / mask code, but AFAIK making changes to the DMA settings of a child will not influence the parent. Where as when passing bus->sysdev, then changes are made to a device which is shared with other devices on the bus, which is why we see a regression in an USB NIC driver being triggered by the UAS driver binding to a device (on the same bus). At least that is my interpretation of this. I bisected the regression and that pointed at the UAS DMA change and reverting it fixes things, confirming that I did not make any mistakes during the bisect. Regards, Hans