[PATCH v2] iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE

2019-03-13 Thread Stanislaw Gruszka
xa9 Cc: sta...@vger.kernel.org Reported-and-tested-by: Jan Viktorin Reviewed-by: Alexander Duyck Signed-off-by: Stanislaw Gruszka --- v2: add comment drivers/iommu/amd_iommu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-03-12 Thread Stanislaw Gruszka
On Mon, Mar 11, 2019 at 09:43:19AM +0100, Stanislaw Gruszka wrote: > > > However after fixing that mt76usb still did not work. To make things > > > work we had to change rx frag size from 2048 to PAGE_SIZE and change > > > virt_to_head_page() to virt_to_page() when sett

Re: [PATCH] iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE

2019-03-12 Thread Stanislaw Gruszka
On Mon, Mar 11, 2019 at 08:47:44AM -0700, Alexander Duyck wrote: > > drivers/iommu/amd_iommu.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c > > index 6b0760dafb3e..949621f33624 100644 > > ---

[PATCH] iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE

2019-03-11 Thread Stanislaw Gruszka
r.kernel.org Reported-and-tested-by: jan.vikto...@gmail.com Signed-off-by: Stanislaw Gruszka --- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 6b0760dafb3e..949621f33624 100644 --- a/d

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-03-11 Thread Stanislaw Gruszka
On Sun, Mar 03, 2019 at 11:20:45PM -0800, Rosen Penev wrote: > On Sun, Mar 3, 2019 at 11:10 PM Stanislaw Gruszka wrote: > > > > On Thu, Feb 28, 2019 at 02:40:29PM +0100, Joerg Roedel wrote: > > > On Thu, Feb 28, 2019 at 01:19:48PM +0100, Stanislaw Gruszka wrote: >

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-03-03 Thread Stanislaw Gruszka
On Thu, Feb 28, 2019 at 02:40:29PM +0100, Joerg Roedel wrote: > On Thu, Feb 28, 2019 at 01:19:48PM +0100, Stanislaw Gruszka wrote: > > Nevermind, the patch is wrong, s->dma_address is initalized in > > sg_num_pages(). > > Yes, it is. In sg_num_pages() the offse

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-02-28 Thread Stanislaw Gruszka
On Thu, Feb 28, 2019 at 11:42:24AM +0100, Stanislaw Gruszka wrote: > On Thu, Feb 28, 2019 at 10:04:12AM +0100, Stanislaw Gruszka wrote: > > On Tue, Feb 26, 2019 at 12:24:08PM +0100, Stanislaw Gruszka wrote: > > > On Tue, Feb 26, 2019 at 11:44:13AM +0100, Joerg Roedel wrote: >

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-02-28 Thread Stanislaw Gruszka
On Thu, Feb 28, 2019 at 10:04:12AM +0100, Stanislaw Gruszka wrote: > On Tue, Feb 26, 2019 at 12:24:08PM +0100, Stanislaw Gruszka wrote: > > On Tue, Feb 26, 2019 at 11:44:13AM +0100, Joerg Roedel wrote: > > > On Tue, Feb 26, 2019 at 11:34:51AM +0100, Stanislaw Gruszka wrote: >

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-02-28 Thread Stanislaw Gruszka
On Tue, Feb 26, 2019 at 12:24:08PM +0100, Stanislaw Gruszka wrote: > On Tue, Feb 26, 2019 at 11:44:13AM +0100, Joerg Roedel wrote: > > On Tue, Feb 26, 2019 at 11:34:51AM +0100, Stanislaw Gruszka wrote: > > > On Tue, Feb 26, 2019 at 11:05:36AM +0100, Joerg Roedel wrote: &

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-02-26 Thread Stanislaw Gruszka
On Tue, Feb 26, 2019 at 11:44:13AM +0100, Joerg Roedel wrote: > On Tue, Feb 26, 2019 at 11:34:51AM +0100, Stanislaw Gruszka wrote: > > On Tue, Feb 26, 2019 at 11:05:36AM +0100, Joerg Roedel wrote: > > If sg->offset > PAGE_SIZE is fine then most likely we have probl

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-02-26 Thread Stanislaw Gruszka
On Tue, Feb 26, 2019 at 11:05:36AM +0100, Joerg Roedel wrote: > On Mon, Feb 18, 2019 at 03:37:48PM +0100, Stanislaw Gruszka wrote: > > 0001-mt76x02u-use-usb_bulk_msg-to-upload-firmware.patch > > 0002-mt76usb-do-not-use-compound-head-page-for-SG-I-O.patch > > > > Or pr

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-02-19 Thread Stanislaw Gruszka
On Mon, Feb 18, 2019 at 05:01:59PM +, Robin Murphy wrote: > On 18/02/2019 14:37, Stanislaw Gruszka wrote: > [...] > >Another issue is that dma_map_sg() & dma_map_page() may require some > >constraints. I'm not sure about that and I want to clarify that with > >CCed

Re: MT76x2U crashes XHCI driver on AMD Ryzen system

2019-02-18 Thread Stanislaw Gruszka
(cc: IOMMU & page_frag_alloc maintainers) On Tue, Jan 15, 2019 at 10:04:01AM +0100, Lorenzo Bianconi wrote: > > On Mon, Jan 14, 2019 at 1:18 AM Lorenzo Bianconi > > wrote: > > > > > > > On Sun, Jan 13, 2019 at 11:00 AM Lorenzo Bianconi > > > > wrote: > > > > > > > > > > > > > > > > > > > > > >