linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sgruszka@redhat.com (Stanislaw Gruszka)
Subject: MT76x2U crashes XHCI driver on AMD Ryzen system
Date: Tue, 12 Mar 2019 08:13:14 +0100	[thread overview]
Message-ID: <20190312071314.GB2483@redhat.com> (raw)
In-Reply-To: <20190311084319.GA3310@redhat.com>

On Mon, Mar 11, 2019@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 setting SG's.
> >
> > > I think I understand why first change was needed. If we do 2 separate
> > > dma maps of 2 different buffers in single page i.e (PAGE + off=0
> > > and PAGE + off=2048) it causes problem. So either map_sg() return
> > > error which mt76usb does not handle correctly or there is issue
> > > in AMD IOMMU because two dma maps use the same page.
> 
> Any comment on that? Is fine or not to do 2 or more dma mappings
> within the same single page on AMD IOMMU? If not, is there any
> mechanism for drivers to find out about this limitation to prevent
> to prepare wrong SG buffers?

FTR: it was confirmed by Jan (bug reporter) the 2 or more dma mappings
within single page works with AMD IOMMU. Most likely it was needed
previously to workaround this sg->offset problem until proper fix to
AMD IOMMU was applied.

Stanislaw 

      parent reply	other threads:[~2019-03-12  7:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190226100535.GA20740@8bytes.org>
     [not found] ` <20190226103450.GA2989@redhat.com>
     [not found]   ` <20190226104413.GH20740@8bytes.org>
     [not found]     ` <20190226112407.GB2989@redhat.com>
     [not found]       ` <20190228090411.GA24938@redhat.com>
     [not found]         ` <20190228104223.GA2749@redhat.com>
     [not found]           ` <20190228121948.GD6072@redhat.com>
     [not found]             ` <20190228134029.GC1594@8bytes.org>
     [not found]               ` <20190304071037.GA2787@redhat.com>
     [not found]                 ` <CAKxU2N-k-9DCYBv6W3CohL963dr3AeY3VHyt8FrUuo=BfacDsw@mail.gmail.com>
2019-03-11  8:43                   ` MT76x2U crashes XHCI driver on AMD Ryzen system Stanislaw Gruszka
2019-03-11  9:03                     ` [PATCH] iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE Stanislaw Gruszka
2019-03-11 15:47                       ` Alexander Duyck
2019-03-12  7:08                         ` Stanislaw Gruszka
2019-03-12 15:18                           ` Alexander Duyck
2019-03-13  9:03                             ` [PATCH v2] " Stanislaw Gruszka
2019-03-18 10:17                               ` Joerg Roedel
2019-03-12  7:13                     ` Stanislaw Gruszka [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=20190312071314.GB2483@redhat.com \
    --to=sgruszka@redhat.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).