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 31469C433E0 for ; Fri, 26 Mar 2021 12:06:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F224161A4A for ; Fri, 26 Mar 2021 12:06:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230046AbhCZMFo (ORCPT ); Fri, 26 Mar 2021 08:05:44 -0400 Received: from verein.lst.de ([213.95.11.211]:45429 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230027AbhCZMFb (ORCPT ); Fri, 26 Mar 2021 08:05:31 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id C381C67373; Fri, 26 Mar 2021 13:05:26 +0100 (CET) Date: Fri, 26 Mar 2021 13:05:26 +0100 From: Christoph Hellwig To: Robin Murphy Cc: rentao.bupt@gmail.com, Felipe Balbi , Greg Kroah-Hartman , Joel Stanley , Andrew Jeffery , kernel test robot , Masahiro Yamada , Sasha Levin , Ryan Chen , Thomas Tai , Konrad Rzeszutek Wilk , Christoph Hellwig , Benjamin Herrenschmidt , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, Tao Ren Subject: Re: [PATCH] usb: gadget: aspeed: set port_dev dma mask Message-ID: <20210326120526.GA14169@lst.de> References: <20210326070214.6719-1-rentao.bupt@gmail.com> <10920f34-289c-feac-79b6-71bff2aea67d@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10920f34-289c-feac-79b6-71bff2aea67d@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Fri, Mar 26, 2021 at 12:03:03PM +0000, Robin Murphy wrote: > This might happen to work out, but is far from correct. Just wait until you > try it on a platform where the USB controller is behind an IOMMU... > > It looks like something is more fundamentally wrong here - the device > passed to DMA API calls must be the actual hardware device performing the > DMA, which in USB-land I believe means the controller's sysdev. The shiny new usb_intf_get_dma_device API provides the device to use.