Re: [PATCH] usb: gadget: aspeed: set port_dev dma mask

2021-03-30 Thread Tao Ren
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 +, Robin Murphy wrote: > > > > This might happen to work

Re: [PATCH] usb: gadget: aspeed: set port_dev dma mask

2021-03-28 Thread Christoph Hellwig
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 +, Robin Murphy wrote: > > > This might happen to work out, but is far from correct. Just wait until > > > you > > > try it on a

Re: [PATCH] usb: gadget: aspeed: set port_dev dma mask

2021-03-27 Thread Tao Ren
On Fri, Mar 26, 2021 at 01:05:26PM +0100, Christoph Hellwig wrote: > On Fri, Mar 26, 2021 at 12:03:03PM +, 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 look

Re: [PATCH] usb: gadget: aspeed: set port_dev dma mask

2021-03-26 Thread Christoph Hellwig
On Fri, Mar 26, 2021 at 12:03:03PM +, 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 D

Re: [PATCH] usb: gadget: aspeed: set port_dev dma mask

2021-03-26 Thread Robin Murphy
On 2021-03-26 07:02, rentao.b...@gmail.com wrote: From: Tao Ren Set aspeed-usb vhub port_dev's dma mask to pass the dma_mask test in "dma_map_page_attrs" function, and the dma_mask test was added in 'commit f959dcd6ddfd ("dma-direct: Fix potential NULL pointer dereference")'. Below is the back

[PATCH] usb: gadget: aspeed: set port_dev dma mask

2021-03-26 Thread rentao . bupt
From: Tao Ren Set aspeed-usb vhub port_dev's dma mask to pass the dma_mask test in "dma_map_page_attrs" function, and the dma_mask test was added in 'commit f959dcd6ddfd ("dma-direct: Fix potential NULL pointer dereference")'. Below is the backtrace without the patch: [<80106550>] show_stack+0x2