linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	Jingoo Han <jingoohan1@gmail.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	patchwork-lst@pengutronix.de
Subject: Re: [PATCH] PCI: dwc: fall back to legacy IRQs when multiple devices are attached
Date: Thu, 11 May 2017 07:08:41 -0700	[thread overview]
Message-ID: <CAJ+vNU2iPDRELO7Ce8=ZRNqVtYMO1d3YF-HE7PoBho0Am1mZhg@mail.gmail.com> (raw)
In-Reply-To: <1494490587.15454.9.camel@pengutronix.de>

On Thu, May 11, 2017 at 1:16 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Hi Tim,
>
> Am Mittwoch, den 10.05.2017, 14:44 -0700 schrieb Tim Harvey:
>> On Thu, Apr 27, 2017 at 8:32 AM, Tim Harvey <tharvey@gateworks.com> wrote:
>> > On Thu, Apr 27, 2017 at 1:43 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
>> >> Am Mittwoch, den 26.04.2017, 14:11 -0700 schrieb Tim Harvey:
>> >>> On Wed, Apr 26, 2017 at 11:15 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
>> >>> > The DWC host does not support legacy PCI IRQs and MSIs at the same time,
>> >>> > so we need to fall back to using only legacy IRQs if there is a chance
>> >>> > that multiple devices with differing MSI capabilities are connected to
>> >>> > the host. The only configuration where MSIs can be safely used is when
>> >>> > the device below the host bridge is not a bridge, i.e. the only device
>> >>> > connected to this host.
>> >>> >
>> >>> > By disallowing MSI allocation when multiple devices might be attached
>> >>> > we get those configurations in a working state. The only configurations
>> >>> > that depend on MSIs being available, that I am aware of, are some
>> >>> > embedded devices with a PCIe attached FPGA, that is incapable of
>> >>> > generating PCI legacy IRQs. Those are kept working by allowing MSIs
>> >>> > when only a single device is attached to the host.
>> >>> >
>> >>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> >>> > ---
> [...]
>> Lucas,
>>
>> Are you not able to repeat my findings?
>
> Yes, I see what's going on.
>
>> Since Linux 4.8 IMX PCIe is completely broken for PCIe devices that do
>> not support MSI interrupts (and there are a whole lot of 802.11n
>> radios that fall into this category) as you can no longer disable MSI
>> because the IMX PCIe driver depends on it.
>>
>> It seems like your patch is the right approach but something must
>> still be getting set that causes the legacy interrupts to not fire.
>
> The issue here are the port-services, which are using MSI when
> available, which might conflict with the device requirements, even if
> only a single device is attached.
>
> Probably we need to disable MSI on all systems, unless we know that we
> absolutely need them (EP devices, which don't support legacy IRQs). I'll
> send a patch to do this, but other issues have been higher priority
> again.
>
> Regards,
> Lucas
>

Lucas,

Thanks, this fix is something that's beyond my experience or I would
be glad to do it. The PCIe driver has been changing very rapidly in
recent kernel versions and there is no single patch that can be
reverted to 'fix' this long-standing issue. I'm really surprised
others haven't chimed in with reports of it being broken as its been
an issue since 4.8.

Is it worth removing the 'depends on PCI_MSI_IRQ_DOMAIN' from
PCIE_DW_HOST and PCI_IMX6 and defaulting MSI off until your proposed
fix is ready and working? That is precisely what I have to do on 4.8+
kernels to get them working for our IMX6 users using ath9k radios
(making distro's like Ubuntu a problem as they run a fairly standard
4.8 kernel).

Tim

  reply	other threads:[~2017-05-11 14:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 18:15 [PATCH] PCI: dwc: fall back to legacy IRQs when multiple devices are attached Lucas Stach
2017-04-26 21:11 ` Tim Harvey
2017-04-27  8:43   ` Lucas Stach
2017-04-27 15:32     ` Tim Harvey
2017-05-10 21:44       ` Tim Harvey
2017-05-11  8:16         ` Lucas Stach
2017-05-11 14:08           ` Tim Harvey [this message]
2017-06-08 15:48             ` Tim Harvey
2017-08-24 15:51               ` Tim Harvey

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='CAJ+vNU2iPDRELO7Ce8=ZRNqVtYMO1d3YF-HE7PoBho0Am1mZhg@mail.gmail.com' \
    --to=tharvey@gateworks.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=bhelgaas@google.com \
    --cc=jingoohan1@gmail.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-pci@vger.kernel.org \
    --cc=patchwork-lst@pengutronix.de \
    /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).