Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3275624imm; Mon, 6 Aug 2018 01:38:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc0opGaQaZI9hD5g2euf+mpRkw4FK0MNLHRBTetcCzrjEaq1PHSGsYFgh+TQFxPz6C97AbK X-Received: by 2002:a17:902:7b83:: with SMTP id w3-v6mr13026415pll.192.1533544718424; Mon, 06 Aug 2018 01:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533544718; cv=none; d=google.com; s=arc-20160816; b=Dw1MHqE0c7XsDaaH2SN7AS4jFC0k3wdRfqty3aQQ/6h0GVQXaII9hkiO8MP00aLQZK C++tsGBPauUDU/1VyviA2PxyHQNy+qXf4UxOJRkNq8XHMa2If4CW5JuDVzJJMjxN6fZW i4MO/+plLCM8wELyxhZGKz57I/VT8rsh0YpoCWlJKNUI2HaWW2kR3pfI5HQoym6u0Ed6 TdBeYS747EU8D3+B5vPIq1l0QssNgCDVd3hoTwHEqUsKxv2wI8yC1YD1RQllT65oqFnh H8OiZ4rPWDy3Bvbktu2foszS0pcrW9/AkLOAM4zIT8flI6XiLJ54hh759mPDmvQD1dOP Yt5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=8IPaT0Wobg/0V5tXVnsK2seHVA/CXrBBtwAwP6ULiVc=; b=nhHkANUhFrFXyV8EyhEyFt+zMO+mWUj894wfnwkjkhFD/Iap6SdS2gsRBTfqUKhtvR r73XGlSi0tmRArf6dAW/nTvt7Q1ZbJv1sc92wMIJr2obrU7lC03NgUEwq1k+qRQyC3W2 Dz0m63A6KW263AcTVmY1oiqVGWICUMpXbtZ2cvNhgKw4iE8RWnCYYlvoyS6YA85oTThU ilEAiVrKxZ589ZpFl5SsjRb4yUXRK5yLQptzY8FIbf7Ao0bXvT9YuaIvD8TR3QwpAP1l lPIlN8AUudwophye0PdmLRLezB2jQqgKzn2No6NB5vNYbQA8kxHBO+k3qVdyP63VEsq+ nQsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fR7wB85I; 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 n5-v6si9277179plk.352.2018.08.06.01.38.22; Mon, 06 Aug 2018 01:38:38 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fR7wB85I; 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 S1726865AbeHFKpc (ORCPT + 99 others); Mon, 6 Aug 2018 06:45:32 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:54054 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725951AbeHFKpc (ORCPT ); Mon, 6 Aug 2018 06:45:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8IPaT0Wobg/0V5tXVnsK2seHVA/CXrBBtwAwP6ULiVc=; b=fR7wB85I3NibxjLUJ5r20WaMu U4a8K39NBdZHEQjID6KkWjrdzWUggKEdh94cCvA3k4qfEcSPFLMqEXo9bG43yy/TOs1EYqOpKrAh1 QfcDLoYEGVx8VGSEccv0UofdjCQnicIzMlP2axLXXF67bMjEk6pxWz6AuUFc87jDFn7CCZ0kPv2iR cDBO54eaULaf/zd3sJKEaqpRNEjstv3Ycj2uZhSnCbN5XLvqE8s05Ey9oMPvHdYNWOmXlf/9R8pvZ 7GKahEBYuLBEwVwScN45OKPNkEKWbLLoqvOv7zLVbuvFZTmp15AZclPpCF3zPNk1F3/F/7HgO6Ds8 0KCqxY5YQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fmb18-0003u3-Vj; Mon, 06 Aug 2018 08:37:30 +0000 Date: Mon, 6 Aug 2018 01:37:30 -0700 From: Christoph Hellwig To: Guenter Roeck Cc: Alan Stern , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: OHCI: ohci-sm501: complete URBs in BH context Message-ID: <20180806083730.GA32650@infradead.org> References: <1533355279-26725-1-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1533355279-26725-1-git-send-email-linux@roeck-us.net> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 03, 2018 at 09:01:19PM -0700, Guenter Roeck wrote: > Testing an USB drive connected to ohci-sm501 results in a large number > of runtime warnings. As far as I can tell this driver uses the HCD_LOCAL_MEM feature flag for memory declared using dma_declare_coherent_memory. Unlike the mormal dma mapping interfaces this special case can actually be freed from interrupt context, and we have a fix for this warning queued up in linux-next: http://git.infradead.org/users/hch/dma-mapping.git/commitdiff/d27fb99f62af7b79c542d161aa5155ed57271ddc That being said I'm generally very unhappy how dma_init_coherent_memory turned out. The idea was to allow device local memory to be hidden behind the DMA API, but in general we use it either as a way to declare special uncache system memory (which would really be the plaform codes job), or as a magic bounce buffer like in the USB code. I plan to eventually untangle this, but it is going to take some time.