Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1285019pxf; Fri, 26 Mar 2021 05:09:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVtL1yZ8gtL6/yv3p27LsxcBxuSot3UFjes3KdoLVrAhChN3U9mA04cra4FLpB5gZCbpJo X-Received: by 2002:a05:6402:2695:: with SMTP id w21mr14618702edd.99.1616760565622; Fri, 26 Mar 2021 05:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616760565; cv=none; d=google.com; s=arc-20160816; b=VlA/8Kex5RwB0u4/NqFBJAEsuvhHiu+NdTC/3652fdHkZ/9hhy2tYcfAKdyY3xhcPh SnZ/1bJlgvEmfZQBHT4MNYxGm2CvmG5MDdqG81IhWhmIkug6RquqgaBoNFdMXdAaAAHH DBuEG+HbCXOrGGpETEK1UEhuNqNbr4uJ+DiF1M1gOLclyMUtQqa9XlzFCrL0h7GQZZgi 0xtlGColM0XvWtGh42dO2HqHFP/8AS8AZoFjX9FyC/KurOeqJsxlqExjhQUzU8fOKw8W 2lBbySzn5ZtPFuglerxRx48kJgZpRUIBp48xBWpxIYwd0IRihEit+eOFwxOxrJghWe33 SQfg== 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=tOMAion5v8QGk+HMHRUMspMsRFgk1C4UUv+LAsqzkds=; b=xcrSMCI6C6lJutFuzlF+5X+BJNQ8dWg0nCKdc6P+isCiG8ER62PqbMyyVzeX3AIBVk eieUcP8HJ5ftPms2bQaeT9VQufECUrbxLjYesKwXrr53hoc7QO0VVN5Vu7zYtc66sDFu QMCDp/MPJr3VSu/Rfhb/O1TGBtyPD2T1C+FPJXPekq//cEnIWE8zPG0uJeCkzT+wdB74 tIOIUGO3Srw9ZN2IfrDLKwGXBv4sxZzY0Xh0bV1sVpPbtMoEeHtpyBmWqXaGRM2kKbTL 4esH2++V6foSTrvMKLrubluQdyM5mUZ6C3cJuyuwTyvkf6UoS9+/V8PYOpXFkVKETzEx w5nQ== 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 f7si2130970edd.239.2021.03.26.05.09.02; Fri, 26 Mar 2021 05:09:25 -0700 (PDT) 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 S230016AbhCZMFp (ORCPT + 99 others); Fri, 26 Mar 2021 08:05:45 -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-kernel@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.