* [PATCH] PCI: designware: reject MSI-X irqs
@ 2015-01-26 10:54 Lucas Stach
2015-01-26 11:19 ` Jingoo Han
2015-01-26 18:12 ` Bjorn Helgaas
0 siblings, 2 replies; 5+ messages in thread
From: Lucas Stach @ 2015-01-26 10:54 UTC (permalink / raw)
To: Bjorn Helgaas, Jingoo Han, Mohit Kumar; +Cc: linux-pci
The DW PCIe MSI hardware does not support MSI-X irqs. Setting those up
failed as a side effect of a bug which was fixed by 91f8ae823f2b
(PCI: designware: Setup and clear exactly one MSI at a time).
Now that this bug is fixed MSI-X irqs need to be rejected explicitly,
otherwise devices trying to use them may end up with incorrectly working
interrupts.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Cc: <stable@vger.kernel.org> # 3.18
---
drivers/pci/host/pcie-designware.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index df781cdf13c1..17ca98657a28 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -283,6 +283,9 @@ static int dw_msi_setup_irq(struct msi_controller *chip, struct pci_dev *pdev,
struct msi_msg msg;
struct pcie_port *pp = sys_to_pcie(pdev->bus->sysdata);
+ if (desc->msi_attrib.is_msix)
+ return -EINVAL;
+
irq = assign_irq(1, desc, &pos);
if (irq < 0)
return irq;
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: designware: reject MSI-X irqs
2015-01-26 10:54 [PATCH] PCI: designware: reject MSI-X irqs Lucas Stach
@ 2015-01-26 11:19 ` Jingoo Han
2015-01-26 18:12 ` Bjorn Helgaas
1 sibling, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2015-01-26 11:19 UTC (permalink / raw)
To: 'Lucas Stach'
Cc: 'Bjorn Helgaas', 'Mohit Kumar',
linux-pci, 'Jingoo Han'
On Monday, January 26, 2015 7:55 PM, Lucas Stach wrote:
>
> The DW PCIe MSI hardware does not support MSI-X irqs. Setting those up
> failed as a side effect of a bug which was fixed by 91f8ae823f2b
> (PCI: designware: Setup and clear exactly one MSI at a time).
>
> Now that this bug is fixed MSI-X irqs need to be rejected explicitly,
> otherwise devices trying to use them may end up with incorrectly working
> interrupts.
Right.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Cc: <stable@vger.kernel.org> # 3.18
Acked-by: Jingoo Han <jg1.han@samsung.com>
Best regards,
Jingoo Han
> ---
> drivers/pci/host/pcie-designware.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index df781cdf13c1..17ca98657a28 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -283,6 +283,9 @@ static int dw_msi_setup_irq(struct msi_controller *chip, struct pci_dev *pdev,
> struct msi_msg msg;
> struct pcie_port *pp = sys_to_pcie(pdev->bus->sysdata);
>
> + if (desc->msi_attrib.is_msix)
> + return -EINVAL;
> +
> irq = assign_irq(1, desc, &pos);
> if (irq < 0)
> return irq;
> --
> 2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: designware: reject MSI-X irqs
2015-01-26 10:54 [PATCH] PCI: designware: reject MSI-X irqs Lucas Stach
2015-01-26 11:19 ` Jingoo Han
@ 2015-01-26 18:12 ` Bjorn Helgaas
2015-01-27 9:22 ` Lucas Stach
1 sibling, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2015-01-26 18:12 UTC (permalink / raw)
To: Lucas Stach; +Cc: Jingoo Han, Mohit Kumar, linux-pci
On Mon, Jan 26, 2015 at 11:54:44AM +0100, Lucas Stach wrote:
> The DW PCIe MSI hardware does not support MSI-X irqs. Setting those up
> failed as a side effect of a bug which was fixed by 91f8ae823f2b
> (PCI: designware: Setup and clear exactly one MSI at a time).
>
> Now that this bug is fixed MSI-X irqs need to be rejected explicitly,
> otherwise devices trying to use them may end up with incorrectly working
> interrupts.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Applied with Jingoo's ack to pci/host-designware for v3.20, thanks!
> Cc: <stable@vger.kernel.org> # 3.18
> ---
> drivers/pci/host/pcie-designware.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index df781cdf13c1..17ca98657a28 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -283,6 +283,9 @@ static int dw_msi_setup_irq(struct msi_controller *chip, struct pci_dev *pdev,
> struct msi_msg msg;
> struct pcie_port *pp = sys_to_pcie(pdev->bus->sysdata);
>
> + if (desc->msi_attrib.is_msix)
> + return -EINVAL;
> +
> irq = assign_irq(1, desc, &pos);
> if (irq < 0)
> return irq;
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: designware: reject MSI-X irqs
2015-01-26 18:12 ` Bjorn Helgaas
@ 2015-01-27 9:22 ` Lucas Stach
2015-01-27 16:38 ` Bjorn Helgaas
0 siblings, 1 reply; 5+ messages in thread
From: Lucas Stach @ 2015-01-27 9:22 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Jingoo Han, Mohit Kumar, linux-pci
Hi Bjorn,
Am Montag, den 26.01.2015, 12:12 -0600 schrieb Bjorn Helgaas:
> On Mon, Jan 26, 2015 at 11:54:44AM +0100, Lucas Stach wrote:
> > The DW PCIe MSI hardware does not support MSI-X irqs. Setting those up
> > failed as a side effect of a bug which was fixed by 91f8ae823f2b
> > (PCI: designware: Setup and clear exactly one MSI at a time).
> >
> > Now that this bug is fixed MSI-X irqs need to be rejected explicitly,
> > otherwise devices trying to use them may end up with incorrectly working
> > interrupts.
> >
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>
> Applied with Jingoo's ack to pci/host-designware for v3.20, thanks!
>
I would be happier if this could still find its way into v3.19 if you
are going to send another fixes pull, as this is clearly a regression
even if it was already introduced with v3.18.
> > Cc: <stable@vger.kernel.org> # 3.18
> > ---
> > drivers/pci/host/pcie-designware.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> > index df781cdf13c1..17ca98657a28 100644
> > --- a/drivers/pci/host/pcie-designware.c
> > +++ b/drivers/pci/host/pcie-designware.c
> > @@ -283,6 +283,9 @@ static int dw_msi_setup_irq(struct msi_controller *chip, struct pci_dev *pdev,
> > struct msi_msg msg;
> > struct pcie_port *pp = sys_to_pcie(pdev->bus->sysdata);
> >
> > + if (desc->msi_attrib.is_msix)
> > + return -EINVAL;
> > +
> > irq = assign_irq(1, desc, &pos);
> > if (irq < 0)
> > return irq;
> > --
> > 2.1.4
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: designware: reject MSI-X irqs
2015-01-27 9:22 ` Lucas Stach
@ 2015-01-27 16:38 ` Bjorn Helgaas
0 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2015-01-27 16:38 UTC (permalink / raw)
To: Lucas Stach; +Cc: Jingoo Han, Mohit Kumar, linux-pci
On Tue, Jan 27, 2015 at 3:22 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Hi Bjorn,
>
> Am Montag, den 26.01.2015, 12:12 -0600 schrieb Bjorn Helgaas:
>> On Mon, Jan 26, 2015 at 11:54:44AM +0100, Lucas Stach wrote:
>> > The DW PCIe MSI hardware does not support MSI-X irqs. Setting those up
>> > failed as a side effect of a bug which was fixed by 91f8ae823f2b
>> > (PCI: designware: Setup and clear exactly one MSI at a time).
>> >
>> > Now that this bug is fixed MSI-X irqs need to be rejected explicitly,
>> > otherwise devices trying to use them may end up with incorrectly working
>> > interrupts.
>> >
>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>>
>> Applied with Jingoo's ack to pci/host-designware for v3.20, thanks!
>>
> I would be happier if this could still find its way into v3.19 if you
> are going to send another fixes pull, as this is clearly a regression
> even if it was already introduced with v3.18.
Added to for-linus for v3.19 and dropped from pci/host-designware.
In general, I apply changes for the next release unless it's clear
that they need to be in the current release. In this case, I couldn't
tell from the changelog whether this was a theoretical issue or a
"device X worked on v3.17 but stopped working on v3.18 and this patch
fixes it" issue.
>> > Cc: <stable@vger.kernel.org> # 3.18
>> > ---
>> > drivers/pci/host/pcie-designware.c | 3 +++
>> > 1 file changed, 3 insertions(+)
>> >
>> > diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
>> > index df781cdf13c1..17ca98657a28 100644
>> > --- a/drivers/pci/host/pcie-designware.c
>> > +++ b/drivers/pci/host/pcie-designware.c
>> > @@ -283,6 +283,9 @@ static int dw_msi_setup_irq(struct msi_controller *chip, struct pci_dev *pdev,
>> > struct msi_msg msg;
>> > struct pcie_port *pp = sys_to_pcie(pdev->bus->sysdata);
>> >
>> > + if (desc->msi_attrib.is_msix)
>> > + return -EINVAL;
>> > +
>> > irq = assign_irq(1, desc, &pos);
>> > if (irq < 0)
>> > return irq;
>> > --
>> > 2.1.4
>> >
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-27 16:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 10:54 [PATCH] PCI: designware: reject MSI-X irqs Lucas Stach
2015-01-26 11:19 ` Jingoo Han
2015-01-26 18:12 ` Bjorn Helgaas
2015-01-27 9:22 ` Lucas Stach
2015-01-27 16:38 ` Bjorn Helgaas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.