openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tao Ren <rentao.bupt@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Sasha Levin <sashal@kernel.org>, Felipe Balbi <balbi@kernel.org>,
	Ryan Chen <ryan_chen@aspeedtech.com>,
	kernel test robot <lkp@intel.com>,
	linux-aspeed@lists.ozlabs.org,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Andrew Jeffery <andrew@aj.id.au>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	linux-usb@vger.kernel.org, Tao Ren <taoren@fb.com>,
	linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org,
	Robin Murphy <robin.murphy@arm.com>,
	Thomas Tai <thomas.tai@oracle.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] usb: gadget: aspeed: set port_dev dma mask
Date: Tue, 30 Mar 2021 20:47:02 -0700	[thread overview]
Message-ID: <20210331034701.GA3185@taoren-ubuntu-R90MNF91> (raw)
In-Reply-To: <20210329061735.GA27510@lst.de>

On Mon, Mar 29, 2021 at 08:17:35AM +0200, Christoph Hellwig wrote:
> On Sat, Mar 27, 2021 at 03:17:59PM -0700, Tao Ren wrote:
> > On Fri, Mar 26, 2021 at 01:05:26PM +0100, Christoph Hellwig wrote:
> > > 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.
> > 
> > Thanks Robin and Christoph for the feedback.
> > 
> > If I understand correctly, usb_intf_get_dma_device API is mainly for usb
> > host drivers? I just found usb_gadget_map_request_by_dev API: does it
> > make sense to replace usb_gadget_map_request with
> > usb_gadget_map_request_by_dev so we can pass the actual DMA-capable
> > hardware device (aspeed-vhub platform device) to the API?
> 
> Oh, right you're dealing with a gadget side driver.  Not sure about
> the API there, I'll let the relevant maintainers chime in.

Given this is not the right path, I will drop the patch and work out a
new fix soon (by calling usb_gadget_map_request_by_dev, and with
modified subject).


Cheers,

Tao

      reply	other threads:[~2021-03-31  3:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26  7:02 [PATCH] usb: gadget: aspeed: set port_dev dma mask rentao.bupt
2021-03-26 12:03 ` Robin Murphy
2021-03-26 12:05   ` Christoph Hellwig
2021-03-27 22:17     ` Tao Ren
2021-03-29  6:17       ` Christoph Hellwig
2021-03-31  3:47         ` Tao Ren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210331034701.GA3185@taoren-ubuntu-R90MNF91 \
    --to=rentao.bupt@gmail.com \
    --cc=andrew@aj.id.au \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=masahiroy@kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=robin.murphy@arm.com \
    --cc=ryan_chen@aspeedtech.com \
    --cc=sashal@kernel.org \
    --cc=taoren@fb.com \
    --cc=thomas.tai@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).