linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leigh Brown <leigh@solinno.co.uk>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: linux-arm-kernel@lists.infradead.org,
	"Russell King - ARM Linux admin" <linux@armlinux.org.uk>,
	"Luís Mendes" <luis.p.mendes@gmail.com>,
	linux-pci@vger.kernel.org
Subject: Re: Out-of-tree mwlwifi driver crashes
Date: Thu, 31 Jan 2019 16:06:10 +0000	[thread overview]
Message-ID: <3029c89268680e5abe4f073d8247f74d@solinno.co.uk> (raw)
In-Reply-To: <20190131164653.2599d6e7@windsurf>

Hi Thomas,

On 2019-01-31 15:46, Thomas Petazzoni wrote:
> Hello Leigh,
> 
> On Tue, 29 Jan 2019 15:36:56 +0000
> Leigh Brown <leigh@solinno.co.uk> wrote:
> 
>> Apologies, I use webmail.  I have attached two files with the results
>> from running lspci -vvv -xxx
> 
> Thanks, that was very useful. I believe the issue comes from the fact
> that your PCIe device has prefetchable BARs, while none of the 5 PCIe
> devices I have here has prefetchable BARs. The pci-mvebu driver doesn't
> support such BARs, but the change to the common PCI bridge emulation
> logic made the prefetchable memory base / limit register read-write
> while they were read-only before.
> 
> To verify this hypothesis, could you apply the following patch (on top
> of 4.20), and see if it solves the problem ? Thanks!
> 
> This is probably not the right/correct fix, but it will at least allow
> to verify that the problem is understood correctly.
> 
> Thomas
> 
> diff --git a/drivers/pci/pci-bridge-emul.c 
> b/drivers/pci/pci-bridge-emul.c
> index 129738362d90..f99b80c19809 100644
> --- a/drivers/pci/pci-bridge-emul.c
> +++ b/drivers/pci/pci-bridge-emul.c
> @@ -142,11 +142,7 @@ const static struct pci_bridge_reg_behavior
> pci_regs_behavior[] = {
>         },
> 
>         [PCI_PREF_MEMORY_BASE / 4] = {
> -               /* The high 12-bits of pref mem base/limit are RW */
> -               .rw = GENMASK(31, 20) | GENMASK(15, 4),
> -
> -               /* The low four bits of pref mem base/limit are RO */
> -               .ro = GENMASK(19, 16) | GENMASK(3, 0),
> +               .ro = ~0,
>         },
> 
>         [PCI_PREF_BASE_UPPER32 / 4] = {

Thanks for responding. I had to manually apply the patch, but it 
certainly fixes
the issue.

Regards,

Leigh.

  reply	other threads:[~2019-01-31 16:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <01e409217be1c1cb08ac3bab072fccd3@solinno.co.uk>
     [not found] ` <20190129155913.163f1e98@windsurf>
     [not found]   ` <a56827554c95a3bcd8435d72167d35f9@solinno.co.uk>
     [not found]     ` <20190129163117.0af2ebb3@windsurf>
     [not found]       ` <8eb5b2981e6e60e91a3eacbb88a5ee7b@solinno.co.uk>
2019-01-31 15:46         ` Out-of-tree mwlwifi driver crashes Thomas Petazzoni
2019-01-31 16:06           ` Leigh Brown [this message]
2019-01-31 16:10             ` Thomas Petazzoni
2019-02-12 13:41             ` Thomas Petazzoni
2019-02-12 16:10               ` Leigh Brown

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=3029c89268680e5abe4f073d8247f74d@solinno.co.uk \
    --to=leigh@solinno.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=luis.p.mendes@gmail.com \
    --cc=thomas.petazzoni@bootlin.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).