All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: imx6: remove config space from PCIe controller ranges property
@ 2015-11-30 17:00 Lucas Stach
  2015-11-30 17:00 ` [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI Lucas Stach
  2015-12-02  8:01 ` [PATCH 1/2] ARM: imx6: remove config space from PCIe controller ranges property Shawn Guo
  0 siblings, 2 replies; 19+ messages in thread
From: Lucas Stach @ 2015-11-30 17:00 UTC (permalink / raw)
  To: linux-arm-kernel

This has been moved to the reg property where it belongs for quite some
time. The range has been unused by the kernel since then and with kernel
4.4 it's flagged as an unparsable range, as it does not comply to the
PCI ranges DT binding. Fix this by removing the superfluous range.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/boot/dts/imx6qdl.dtsi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index 2b6cc8bf3c5c..a5a731519d9e 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -173,8 +173,7 @@
 			#address-cells = <3>;
 			#size-cells = <2>;
 			device_type = "pci";
-			ranges = <0x00000800 0 0x01f00000 0x01f00000 0 0x00080000 /* configuration space */
-				  0x81000000 0 0          0x01f80000 0 0x00010000 /* downstream I/O */
+			ranges = <0x81000000 0 0          0x01f80000 0 0x00010000 /* downstream I/O */
 				  0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; /* non-prefetchable memory */
 			num-lanes = <1>;
 			interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2015-11-30 17:00 [PATCH 1/2] ARM: imx6: remove config space from PCIe controller ranges property Lucas Stach
@ 2015-11-30 17:00 ` Lucas Stach
  2015-12-02  8:03   ` Shawn Guo
  2016-04-14 15:13   ` Tim Harvey
  2015-12-02  8:01 ` [PATCH 1/2] ARM: imx6: remove config space from PCIe controller ranges property Shawn Guo
  1 sibling, 2 replies; 19+ messages in thread
From: Lucas Stach @ 2015-11-30 17:00 UTC (permalink / raw)
  To: linux-arm-kernel

This has been stable on i.MX6 for a good while now and there is no
reason to keep it disabled, as it allows to allocate non-shared
IRQs if several PCIe devices are connected to a single host.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/configs/imx_v6_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index 4187f69f6630..e2ce60d00e8a 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -45,6 +45,7 @@ CONFIG_SOC_IMX7D=y
 CONFIG_SOC_LS1021A=y
 CONFIG_SOC_VF610=y
 CONFIG_PCI=y
+CONFIG_PCI_MSI=y
 CONFIG_PCI_IMX6=y
 CONFIG_SMP=y
 CONFIG_PREEMPT_VOLUNTARY=y
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 1/2] ARM: imx6: remove config space from PCIe controller ranges property
  2015-11-30 17:00 [PATCH 1/2] ARM: imx6: remove config space from PCIe controller ranges property Lucas Stach
  2015-11-30 17:00 ` [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI Lucas Stach
@ 2015-12-02  8:01 ` Shawn Guo
  1 sibling, 0 replies; 19+ messages in thread
From: Shawn Guo @ 2015-12-02  8:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 30, 2015 at 06:00:10PM +0100, Lucas Stach wrote:
> This has been moved to the reg property where it belongs for quite some
> time. The range has been unused by the kernel since then and with kernel
> 4.4 it's flagged as an unparsable range, as it does not comply to the
> PCI ranges DT binding. Fix this by removing the superfluous range.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Changed patch prefix to 'ARM: dts: imx6: ...', and applied.

Shawn

> ---
>  arch/arm/boot/dts/imx6qdl.dtsi | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
> index 2b6cc8bf3c5c..a5a731519d9e 100644
> --- a/arch/arm/boot/dts/imx6qdl.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl.dtsi
> @@ -173,8 +173,7 @@
>  			#address-cells = <3>;
>  			#size-cells = <2>;
>  			device_type = "pci";
> -			ranges = <0x00000800 0 0x01f00000 0x01f00000 0 0x00080000 /* configuration space */
> -				  0x81000000 0 0          0x01f80000 0 0x00010000 /* downstream I/O */
> +			ranges = <0x81000000 0 0          0x01f80000 0 0x00010000 /* downstream I/O */
>  				  0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; /* non-prefetchable memory */
>  			num-lanes = <1>;
>  			interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
> -- 
> 2.6.2
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2015-11-30 17:00 ` [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI Lucas Stach
@ 2015-12-02  8:03   ` Shawn Guo
  2016-04-14 15:13   ` Tim Harvey
  1 sibling, 0 replies; 19+ messages in thread
From: Shawn Guo @ 2015-12-02  8:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 30, 2015 at 06:00:11PM +0100, Lucas Stach wrote:
> This has been stable on i.MX6 for a good while now and there is no
> reason to keep it disabled, as it allows to allocate non-shared
> IRQs if several PCIe devices are connected to a single host.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Applied, thanks.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2015-11-30 17:00 ` [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI Lucas Stach
  2015-12-02  8:03   ` Shawn Guo
@ 2016-04-14 15:13   ` Tim Harvey
  2016-04-15  8:21     ` Lucas Stach
  1 sibling, 1 reply; 19+ messages in thread
From: Tim Harvey @ 2016-04-14 15:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 30, 2015 at 9:00 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> This has been stable on i.MX6 for a good while now and there is no
> reason to keep it disabled, as it allows to allocate non-shared
> IRQs if several PCIe devices are connected to a single host.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  arch/arm/configs/imx_v6_v7_defconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
> index 4187f69f6630..e2ce60d00e8a 100644
> --- a/arch/arm/configs/imx_v6_v7_defconfig
> +++ b/arch/arm/configs/imx_v6_v7_defconfig
> @@ -45,6 +45,7 @@ CONFIG_SOC_IMX7D=y
>  CONFIG_SOC_LS1021A=y
>  CONFIG_SOC_VF610=y
>  CONFIG_PCI=y
> +CONFIG_PCI_MSI=y
>  CONFIG_PCI_IMX6=y
>  CONFIG_SMP=y
>  CONFIG_PREEMPT_VOLUNTARY=y
> --
> 2.6.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Lucas,

Any thoughts on why enabling MSI on IMX6 breaks legacy interrupts?

Again, many PCI devices/drivers don't support MSI and thus enabling
MSI as this patch does makes this config break many PCI devices on
IMX6.

I have found that MSI does indeed work on the IMX6 for cards/drivers
that use MSI, but for those that don't the legacy interrupts never
fire regardless of going through a bridge or directly hanging off the
IMX6. I assume you can confirm this on your boards/devices as well?

Regards,

Tim

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2016-04-14 15:13   ` Tim Harvey
@ 2016-04-15  8:21     ` Lucas Stach
  2017-03-30 23:42       ` Tim Harvey
  0 siblings, 1 reply; 19+ messages in thread
From: Lucas Stach @ 2016-04-15  8:21 UTC (permalink / raw)
  To: linux-arm-kernel

Am Donnerstag, den 14.04.2016, 08:13 -0700 schrieb Tim Harvey:
> On Mon, Nov 30, 2015 at 9:00 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> > This has been stable on i.MX6 for a good while now and there is no
> > reason to keep it disabled, as it allows to allocate non-shared
> > IRQs if several PCIe devices are connected to a single host.
> >
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> >  arch/arm/configs/imx_v6_v7_defconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
> > index 4187f69f6630..e2ce60d00e8a 100644
> > --- a/arch/arm/configs/imx_v6_v7_defconfig
> > +++ b/arch/arm/configs/imx_v6_v7_defconfig
> > @@ -45,6 +45,7 @@ CONFIG_SOC_IMX7D=y
> >  CONFIG_SOC_LS1021A=y
> >  CONFIG_SOC_VF610=y
> >  CONFIG_PCI=y
> > +CONFIG_PCI_MSI=y
> >  CONFIG_PCI_IMX6=y
> >  CONFIG_SMP=y
> >  CONFIG_PREEMPT_VOLUNTARY=y
> > --
> > 2.6.2
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
> Lucas,
> 
> Any thoughts on why enabling MSI on IMX6 breaks legacy interrupts?
> 
> Again, many PCI devices/drivers don't support MSI and thus enabling
> MSI as this patch does makes this config break many PCI devices on
> IMX6.
> 
> I have found that MSI does indeed work on the IMX6 for cards/drivers
> that use MSI, but for those that don't the legacy interrupts never
> fire regardless of going through a bridge or directly hanging off the
> IMX6. I assume you can confirm this on your boards/devices as well?
> 
No, this seems to be an errata in the DW PCIe core. The manual states
that legacy IRQs and MSIs can't be used together, but I thought this
only applies to the EP part of the core.

We can probably fix the simple configuration by not enabling MSI support
until someone actually requests to set up an MSI IRQ, so both IRQ types
work when only one EP is connected.
I don't have any idea yet how to fix setups with a PCIe switch where
some connected EPs might like to use MSIs while some others can't use
them.

Regards,
Lucas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2016-04-15  8:21     ` Lucas Stach
@ 2017-03-30 23:42       ` Tim Harvey
  2017-03-31 16:05           ` Tim Harvey
  0 siblings, 1 reply; 19+ messages in thread
From: Tim Harvey @ 2017-03-30 23:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 15, 2016 at 1:21 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Am Donnerstag, den 14.04.2016, 08:13 -0700 schrieb Tim Harvey:
>> On Mon, Nov 30, 2015 at 9:00 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
>> > This has been stable on i.MX6 for a good while now and there is no
>> > reason to keep it disabled, as it allows to allocate non-shared
>> > IRQs if several PCIe devices are connected to a single host.
>> >
>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> > ---
>> >  arch/arm/configs/imx_v6_v7_defconfig | 1 +
>> >  1 file changed, 1 insertion(+)
>> >
>> > diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
>> > index 4187f69f6630..e2ce60d00e8a 100644
>> > --- a/arch/arm/configs/imx_v6_v7_defconfig
>> > +++ b/arch/arm/configs/imx_v6_v7_defconfig
>> > @@ -45,6 +45,7 @@ CONFIG_SOC_IMX7D=y
>> >  CONFIG_SOC_LS1021A=y
>> >  CONFIG_SOC_VF610=y
>> >  CONFIG_PCI=y
>> > +CONFIG_PCI_MSI=y
>> >  CONFIG_PCI_IMX6=y
>> >  CONFIG_SMP=y
>> >  CONFIG_PREEMPT_VOLUNTARY=y
>> > --
>> > 2.6.2
>> >
>> >
>> > _______________________________________________
>> > linux-arm-kernel mailing list
>> > linux-arm-kernel at lists.infradead.org
>> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>> Lucas,
>>
>> Any thoughts on why enabling MSI on IMX6 breaks legacy interrupts?
>>
>> Again, many PCI devices/drivers don't support MSI and thus enabling
>> MSI as this patch does makes this config break many PCI devices on
>> IMX6.
>>
>> I have found that MSI does indeed work on the IMX6 for cards/drivers
>> that use MSI, but for those that don't the legacy interrupts never
>> fire regardless of going through a bridge or directly hanging off the
>> IMX6. I assume you can confirm this on your boards/devices as well?
>>
> No, this seems to be an errata in the DW PCIe core. The manual states
> that legacy IRQs and MSIs can't be used together, but I thought this
> only applies to the EP part of the core.
>
> We can probably fix the simple configuration by not enabling MSI support
> until someone actually requests to set up an MSI IRQ, so both IRQ types
> work when only one EP is connected.
> I don't have any idea yet how to fix setups with a PCIe switch where
> some connected EPs might like to use MSIs while some others can't use
> them.
>
> Regards,
> Lucas
>

Lucas,

I feel a bit dumb here for forgetting about this issue and letting it
drop, but I've just spent a day debugging an issue with the ath9k
wireless driver only to realize it was that the ath9k card and/or
driver doesn't support MSI interrupts and thus no longer work on
mainline kernels that have MSI enabled. To be honest I'm not sure how
many PCIe devices out there can't support MSI because of hardware
limitations vs drivers that simply have not implemented it.

To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
it such that you can't disable MSI on the IMX6.

Is there some fix you can think of to make the IMX6 PCIe host
controller raise an interrupt for cards/drivers that use legacy irq's?
If not, then we need to allow MSI to be disabled for IMX6 and default
it to disabled for compatibility.

Regards,

Tim

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2017-03-30 23:42       ` Tim Harvey
@ 2017-03-31 16:05           ` Tim Harvey
  0 siblings, 0 replies; 19+ messages in thread
From: Tim Harvey @ 2017-03-31 16:05 UTC (permalink / raw)
  To: Joao Pinto, Jingoo Han
  Cc: linux-pci, patchwork-lst, Krzysztof Hałasa, Sascha Hauer,
	Shawn Guo, linux-arm-kernel, Lucas Stach

On Thu, Mar 30, 2017 at 4:42 PM, Tim Harvey <tharvey@gateworks.com> wrote:
> On Fri, Apr 15, 2016 at 1:21 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
>> Am Donnerstag, den 14.04.2016, 08:13 -0700 schrieb Tim Harvey:
>>> On Mon, Nov 30, 2015 at 9:00 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
>>> > This has been stable on i.MX6 for a good while now and there is no
>>> > reason to keep it disabled, as it allows to allocate non-shared
>>> > IRQs if several PCIe devices are connected to a single host.
>>> >
>>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>>> > ---
>>> >  arch/arm/configs/imx_v6_v7_defconfig | 1 +
>>> >  1 file changed, 1 insertion(+)
>>> >
>>> > diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
>>> > index 4187f69f6630..e2ce60d00e8a 100644
>>> > --- a/arch/arm/configs/imx_v6_v7_defconfig
>>> > +++ b/arch/arm/configs/imx_v6_v7_defconfig
>>> > @@ -45,6 +45,7 @@ CONFIG_SOC_IMX7D=y
>>> >  CONFIG_SOC_LS1021A=y
>>> >  CONFIG_SOC_VF610=y
>>> >  CONFIG_PCI=y
>>> > +CONFIG_PCI_MSI=y
>>> >  CONFIG_PCI_IMX6=y
>>> >  CONFIG_SMP=y
>>> >  CONFIG_PREEMPT_VOLUNTARY=y
>>> > --
>>> > 2.6.2
>>> >
>>> >
>>> > _______________________________________________
>>> > linux-arm-kernel mailing list
>>> > linux-arm-kernel@lists.infradead.org
>>> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>>
>>> Lucas,
>>>
>>> Any thoughts on why enabling MSI on IMX6 breaks legacy interrupts?
>>>
>>> Again, many PCI devices/drivers don't support MSI and thus enabling
>>> MSI as this patch does makes this config break many PCI devices on
>>> IMX6.
>>>
>>> I have found that MSI does indeed work on the IMX6 for cards/drivers
>>> that use MSI, but for those that don't the legacy interrupts never
>>> fire regardless of going through a bridge or directly hanging off the
>>> IMX6. I assume you can confirm this on your boards/devices as well?
>>>
>> No, this seems to be an errata in the DW PCIe core. The manual states
>> that legacy IRQs and MSIs can't be used together, but I thought this
>> only applies to the EP part of the core.
>>
>> We can probably fix the simple configuration by not enabling MSI support
>> until someone actually requests to set up an MSI IRQ, so both IRQ types
>> work when only one EP is connected.
>> I don't have any idea yet how to fix setups with a PCIe switch where
>> some connected EPs might like to use MSIs while some others can't use
>> them.
>>
>> Regards,
>> Lucas
>>
>
> Lucas,
>
> I feel a bit dumb here for forgetting about this issue and letting it
> drop, but I've just spent a day debugging an issue with the ath9k
> wireless driver only to realize it was that the ath9k card and/or
> driver doesn't support MSI interrupts and thus no longer work on
> mainline kernels that have MSI enabled. To be honest I'm not sure how
> many PCIe devices out there can't support MSI because of hardware
> limitations vs drivers that simply have not implemented it.
>
> To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
> it such that you can't disable MSI on the IMX6.
>
> Is there some fix you can think of to make the IMX6 PCIe host
> controller raise an interrupt for cards/drivers that use legacy irq's?
> If not, then we need to allow MSI to be disabled for IMX6 and default
> it to disabled for compatibility.
>

Joao / Jingoo,

(Adding linux-pci to the list to pick up maintainers of other DWC PCIe
core drivers)

Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
true in general for the DW PCIe core? If any of the host controllers
using this core can't support both legacy and MSI irqs together I
still believe we shouldn't enable/require MSI as it breaks any
card/driver that only supports legacy interrupts (such as ath9k).

Regards,

Tim

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
@ 2017-03-31 16:05           ` Tim Harvey
  0 siblings, 0 replies; 19+ messages in thread
From: Tim Harvey @ 2017-03-31 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 30, 2017 at 4:42 PM, Tim Harvey <tharvey@gateworks.com> wrote:
> On Fri, Apr 15, 2016 at 1:21 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
>> Am Donnerstag, den 14.04.2016, 08:13 -0700 schrieb Tim Harvey:
>>> On Mon, Nov 30, 2015 at 9:00 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
>>> > This has been stable on i.MX6 for a good while now and there is no
>>> > reason to keep it disabled, as it allows to allocate non-shared
>>> > IRQs if several PCIe devices are connected to a single host.
>>> >
>>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>>> > ---
>>> >  arch/arm/configs/imx_v6_v7_defconfig | 1 +
>>> >  1 file changed, 1 insertion(+)
>>> >
>>> > diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
>>> > index 4187f69f6630..e2ce60d00e8a 100644
>>> > --- a/arch/arm/configs/imx_v6_v7_defconfig
>>> > +++ b/arch/arm/configs/imx_v6_v7_defconfig
>>> > @@ -45,6 +45,7 @@ CONFIG_SOC_IMX7D=y
>>> >  CONFIG_SOC_LS1021A=y
>>> >  CONFIG_SOC_VF610=y
>>> >  CONFIG_PCI=y
>>> > +CONFIG_PCI_MSI=y
>>> >  CONFIG_PCI_IMX6=y
>>> >  CONFIG_SMP=y
>>> >  CONFIG_PREEMPT_VOLUNTARY=y
>>> > --
>>> > 2.6.2
>>> >
>>> >
>>> > _______________________________________________
>>> > linux-arm-kernel mailing list
>>> > linux-arm-kernel at lists.infradead.org
>>> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>>
>>> Lucas,
>>>
>>> Any thoughts on why enabling MSI on IMX6 breaks legacy interrupts?
>>>
>>> Again, many PCI devices/drivers don't support MSI and thus enabling
>>> MSI as this patch does makes this config break many PCI devices on
>>> IMX6.
>>>
>>> I have found that MSI does indeed work on the IMX6 for cards/drivers
>>> that use MSI, but for those that don't the legacy interrupts never
>>> fire regardless of going through a bridge or directly hanging off the
>>> IMX6. I assume you can confirm this on your boards/devices as well?
>>>
>> No, this seems to be an errata in the DW PCIe core. The manual states
>> that legacy IRQs and MSIs can't be used together, but I thought this
>> only applies to the EP part of the core.
>>
>> We can probably fix the simple configuration by not enabling MSI support
>> until someone actually requests to set up an MSI IRQ, so both IRQ types
>> work when only one EP is connected.
>> I don't have any idea yet how to fix setups with a PCIe switch where
>> some connected EPs might like to use MSIs while some others can't use
>> them.
>>
>> Regards,
>> Lucas
>>
>
> Lucas,
>
> I feel a bit dumb here for forgetting about this issue and letting it
> drop, but I've just spent a day debugging an issue with the ath9k
> wireless driver only to realize it was that the ath9k card and/or
> driver doesn't support MSI interrupts and thus no longer work on
> mainline kernels that have MSI enabled. To be honest I'm not sure how
> many PCIe devices out there can't support MSI because of hardware
> limitations vs drivers that simply have not implemented it.
>
> To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
> it such that you can't disable MSI on the IMX6.
>
> Is there some fix you can think of to make the IMX6 PCIe host
> controller raise an interrupt for cards/drivers that use legacy irq's?
> If not, then we need to allow MSI to be disabled for IMX6 and default
> it to disabled for compatibility.
>

Joao / Jingoo,

(Adding linux-pci to the list to pick up maintainers of other DWC PCIe
core drivers)

Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
true in general for the DW PCIe core? If any of the host controllers
using this core can't support both legacy and MSI irqs together I
still believe we shouldn't enable/require MSI as it breaks any
card/driver that only supports legacy interrupts (such as ath9k).

Regards,

Tim

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2017-03-31 16:05           ` Tim Harvey
@ 2017-04-04 20:54             ` Jingoo Han
  -1 siblings, 0 replies; 19+ messages in thread
From: Jingoo Han @ 2017-04-04 20:54 UTC (permalink / raw)
  To: 'Tim Harvey', 'Joao Pinto'
  Cc: linux-pci, patchwork-lst, 'Krzysztof Hałasa',
	'Sascha Hauer', 'Shawn Guo',
	linux-arm-kernel, 'Lucas Stach'

On Friday, March 31, 2017 12:05 PM, Tim Harvey wrote:
> On Thu, Mar 30, 2017 at 4:42 PM, Tim Harvey <tharvey@gateworks.com> wrote:
> > On Fri, Apr 15, 2016 at 1:21 AM, Lucas Stach <l.stach@pengutronix.de>
> wrote:
> >> Am Donnerstag, den 14.04.2016, 08:13 -0700 schrieb Tim Harvey:
> >>> On Mon, Nov 30, 2015 at 9:00 AM, Lucas Stach <l.stach@pengutronix.de>
> wrote:
> >>> > This has been stable on i.MX6 for a good while now and there is no
> >>> > reason to keep it disabled, as it allows to allocate non-shared
> >>> > IRQs if several PCIe devices are connected to a single host.
> >>> >
> >>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> >>> > ---
> >>> >  arch/arm/configs/imx_v6_v7_defconfig | 1 +
> >>> >  1 file changed, 1 insertion(+)
> >>> >
> >>> > diff --git a/arch/arm/configs/imx_v6_v7_defconfig
> b/arch/arm/configs/imx_v6_v7_defconfig
> >>> > index 4187f69f6630..e2ce60d00e8a 100644
> >>> > --- a/arch/arm/configs/imx_v6_v7_defconfig
> >>> > +++ b/arch/arm/configs/imx_v6_v7_defconfig
> >>> > @@ -45,6 +45,7 @@ CONFIG_SOC_IMX7D=y
> >>> >  CONFIG_SOC_LS1021A=y
> >>> >  CONFIG_SOC_VF610=y
> >>> >  CONFIG_PCI=y
> >>> > +CONFIG_PCI_MSI=y
> >>> >  CONFIG_PCI_IMX6=y
> >>> >  CONFIG_SMP=y
> >>> >  CONFIG_PREEMPT_VOLUNTARY=y
> >>> > --
> >>> > 2.6.2
> >>> >
> >>> >
> >>> > _______________________________________________
> >>> > linux-arm-kernel mailing list
> >>> > linux-arm-kernel@lists.infradead.org
> >>> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >>>
> >>> Lucas,
> >>>
> >>> Any thoughts on why enabling MSI on IMX6 breaks legacy interrupts?
> >>>
> >>> Again, many PCI devices/drivers don't support MSI and thus enabling
> >>> MSI as this patch does makes this config break many PCI devices on
> >>> IMX6.
> >>>
> >>> I have found that MSI does indeed work on the IMX6 for cards/drivers
> >>> that use MSI, but for those that don't the legacy interrupts never
> >>> fire regardless of going through a bridge or directly hanging off the
> >>> IMX6. I assume you can confirm this on your boards/devices as well?
> >>>
> >> No, this seems to be an errata in the DW PCIe core. The manual states
> >> that legacy IRQs and MSIs can't be used together, but I thought this
> >> only applies to the EP part of the core.
> >>
> >> We can probably fix the simple configuration by not enabling MSI
> support
> >> until someone actually requests to set up an MSI IRQ, so both IRQ types
> >> work when only one EP is connected.
> >> I don't have any idea yet how to fix setups with a PCIe switch where
> >> some connected EPs might like to use MSIs while some others can't use
> >> them.
> >>
> >> Regards,
> >> Lucas
> >>
> >
> > Lucas,
> >
> > I feel a bit dumb here for forgetting about this issue and letting it
> > drop, but I've just spent a day debugging an issue with the ath9k
> > wireless driver only to realize it was that the ath9k card and/or
> > driver doesn't support MSI interrupts and thus no longer work on
> > mainline kernels that have MSI enabled. To be honest I'm not sure how
> > many PCIe devices out there can't support MSI because of hardware
> > limitations vs drivers that simply have not implemented it.
> >
> > To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
> > it such that you can't disable MSI on the IMX6.
> >
> > Is there some fix you can think of to make the IMX6 PCIe host
> > controller raise an interrupt for cards/drivers that use legacy irq's?
> > If not, then we need to allow MSI to be disabled for IMX6 and default
> > it to disabled for compatibility.
> >
> 
> Joao / Jingoo,
> 
> (Adding linux-pci to the list to pick up maintainers of other DWC PCIe
> core drivers)
> 
> Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
> true in general for the DW PCIe core? If any of the host controllers
> using this core can't support both legacy and MSI irqs together I
> still believe we shouldn't enable/require MSI as it breaks any
> card/driver that only supports legacy interrupts (such as ath9k).

If there are 2 DW PCIe controllers, one controller can be used for legacy
and another controller can be used for MSI.

But, I am not sure that one DW PCIe controller can support both MSI device
and legacy interrupt device at the same time.

To Joao Pinto,
Will you confirm this?

Or if there is anyone who knows this well, please share your knowledge. :-)
Thanks.

Best regards,
Jingoo Han

> 
> Regards,
> 
> Tim


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
@ 2017-04-04 20:54             ` Jingoo Han
  0 siblings, 0 replies; 19+ messages in thread
From: Jingoo Han @ 2017-04-04 20:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, March 31, 2017 12:05 PM, Tim Harvey wrote:
> On Thu, Mar 30, 2017 at 4:42 PM, Tim Harvey <tharvey@gateworks.com> wrote:
> > On Fri, Apr 15, 2016 at 1:21 AM, Lucas Stach <l.stach@pengutronix.de>
> wrote:
> >> Am Donnerstag, den 14.04.2016, 08:13 -0700 schrieb Tim Harvey:
> >>> On Mon, Nov 30, 2015 at 9:00 AM, Lucas Stach <l.stach@pengutronix.de>
> wrote:
> >>> > This has been stable on i.MX6 for a good while now and there is no
> >>> > reason to keep it disabled, as it allows to allocate non-shared
> >>> > IRQs if several PCIe devices are connected to a single host.
> >>> >
> >>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> >>> > ---
> >>> >  arch/arm/configs/imx_v6_v7_defconfig | 1 +
> >>> >  1 file changed, 1 insertion(+)
> >>> >
> >>> > diff --git a/arch/arm/configs/imx_v6_v7_defconfig
> b/arch/arm/configs/imx_v6_v7_defconfig
> >>> > index 4187f69f6630..e2ce60d00e8a 100644
> >>> > --- a/arch/arm/configs/imx_v6_v7_defconfig
> >>> > +++ b/arch/arm/configs/imx_v6_v7_defconfig
> >>> > @@ -45,6 +45,7 @@ CONFIG_SOC_IMX7D=y
> >>> >  CONFIG_SOC_LS1021A=y
> >>> >  CONFIG_SOC_VF610=y
> >>> >  CONFIG_PCI=y
> >>> > +CONFIG_PCI_MSI=y
> >>> >  CONFIG_PCI_IMX6=y
> >>> >  CONFIG_SMP=y
> >>> >  CONFIG_PREEMPT_VOLUNTARY=y
> >>> > --
> >>> > 2.6.2
> >>> >
> >>> >
> >>> > _______________________________________________
> >>> > linux-arm-kernel mailing list
> >>> > linux-arm-kernel at lists.infradead.org
> >>> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >>>
> >>> Lucas,
> >>>
> >>> Any thoughts on why enabling MSI on IMX6 breaks legacy interrupts?
> >>>
> >>> Again, many PCI devices/drivers don't support MSI and thus enabling
> >>> MSI as this patch does makes this config break many PCI devices on
> >>> IMX6.
> >>>
> >>> I have found that MSI does indeed work on the IMX6 for cards/drivers
> >>> that use MSI, but for those that don't the legacy interrupts never
> >>> fire regardless of going through a bridge or directly hanging off the
> >>> IMX6. I assume you can confirm this on your boards/devices as well?
> >>>
> >> No, this seems to be an errata in the DW PCIe core. The manual states
> >> that legacy IRQs and MSIs can't be used together, but I thought this
> >> only applies to the EP part of the core.
> >>
> >> We can probably fix the simple configuration by not enabling MSI
> support
> >> until someone actually requests to set up an MSI IRQ, so both IRQ types
> >> work when only one EP is connected.
> >> I don't have any idea yet how to fix setups with a PCIe switch where
> >> some connected EPs might like to use MSIs while some others can't use
> >> them.
> >>
> >> Regards,
> >> Lucas
> >>
> >
> > Lucas,
> >
> > I feel a bit dumb here for forgetting about this issue and letting it
> > drop, but I've just spent a day debugging an issue with the ath9k
> > wireless driver only to realize it was that the ath9k card and/or
> > driver doesn't support MSI interrupts and thus no longer work on
> > mainline kernels that have MSI enabled. To be honest I'm not sure how
> > many PCIe devices out there can't support MSI because of hardware
> > limitations vs drivers that simply have not implemented it.
> >
> > To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
> > it such that you can't disable MSI on the IMX6.
> >
> > Is there some fix you can think of to make the IMX6 PCIe host
> > controller raise an interrupt for cards/drivers that use legacy irq's?
> > If not, then we need to allow MSI to be disabled for IMX6 and default
> > it to disabled for compatibility.
> >
> 
> Joao / Jingoo,
> 
> (Adding linux-pci to the list to pick up maintainers of other DWC PCIe
> core drivers)
> 
> Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
> true in general for the DW PCIe core? If any of the host controllers
> using this core can't support both legacy and MSI irqs together I
> still believe we shouldn't enable/require MSI as it breaks any
> card/driver that only supports legacy interrupts (such as ath9k).

If there are 2 DW PCIe controllers, one controller can be used for legacy
and another controller can be used for MSI.

But, I am not sure that one DW PCIe controller can support both MSI device
and legacy interrupt device at the same time.

To Joao Pinto,
Will you confirm this?

Or if there is anyone who knows this well, please share your knowledge. :-)
Thanks.

Best regards,
Jingoo Han

> 
> Regards,
> 
> Tim

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2017-04-04 20:54             ` Jingoo Han
@ 2017-04-05 12:07               ` Joao Pinto
  -1 siblings, 0 replies; 19+ messages in thread
From: Joao Pinto @ 2017-04-05 12:07 UTC (permalink / raw)
  To: Jingoo Han, 'Tim Harvey', 'Joao Pinto'
  Cc: linux-pci, patchwork-lst, 'Krzysztof Hałasa',
	'Sascha Hauer', 'Shawn Guo',
	linux-arm-kernel, 'Lucas Stach'

w4BzIDk6NTQgUE0gZGUgNC80LzIwMTcsIEppbmdvbyBIYW4gZXNjcmV2ZXU6Cj4gT24gRnJpZGF5
LCBNYXJjaCAzMSwgMjAxNyAxMjowNSBQTSwgVGltIEhhcnZleSB3cm90ZToKPj4gT24gVGh1LCBN
YXIgMzAsIDIwMTcgYXQgNDo0MiBQTSwgVGltIEhhcnZleSA8dGhhcnZleUBnYXRld29ya3MuY29t
PiB3cm90ZToKPj4+IE9uIEZyaSwgQXByIDE1LCAyMDE2IGF0IDE6MjEgQU0sIEx1Y2FzIFN0YWNo
IDxsLnN0YWNoQHBlbmd1dHJvbml4LmRlPgo+PiB3cm90ZToKPj4+PiBBbSBEb25uZXJzdGFnLCBk
Z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ZyBsaXN0CmxpbnV4LWFybS1rZXJuZWxAbGlzdHMuaW5mcmFkZWFkLm9yZwpodHRwOi8v
bGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2xpbnV4LWFybS1rZXJuZWwK

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
@ 2017-04-05 12:07               ` Joao Pinto
  0 siblings, 0 replies; 19+ messages in thread
From: Joao Pinto @ 2017-04-05 12:07 UTC (permalink / raw)
  To: linux-arm-kernel

?s 9:54 PM de 4/4/2017, Jingoo Han escreveu:
> On Friday, March 31, 2017 12:05 PM, Tim Harvey wrote:
>> On Thu, Mar 30, 2017 at 4:42 PM, Tim Harvey <tharvey@gateworks.com> wrote:
>>> On Fri, Apr 15, 2016 at 1:21 AM, Lucas Stach <l.stach@pengutronix.de>
>> wrote:
>>>> Am Donnerstag, den 14.04.2016, 08:13 -0700 schrieb Tim Harvey:
>>>>> On Mon, Nov 30, 2015 at 9:00 AM, Lucas Stach <l.stach@pengutronix.de>
>> wrote:
>>>>>> This has been stable on i.MX6 for a good while now and there is no
>>>>>> reason to keep it disabled, as it allows to allocate non-shared
>>>>>> IRQs if several PCIe devices are connected to a single host.
>>>>>>
>>>>>> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>>>>>> ---
>>>>>>  arch/arm/configs/imx_v6_v7_defconfig | 1 +
>>>>>>  1 file changed, 1 insertion(+)
>>>>>>
>>>>>> diff --git a/arch/arm/configs/imx_v6_v7_defconfig
>> b/arch/arm/configs/imx_v6_v7_defconfig
>>>>>> index 4187f69f6630..e2ce60d00e8a 100644
>>>>>> --- a/arch/arm/configs/imx_v6_v7_defconfig
>>>>>> +++ b/arch/arm/configs/imx_v6_v7_defconfig
>>>>>> @@ -45,6 +45,7 @@ CONFIG_SOC_IMX7D=y
>>>>>>  CONFIG_SOC_LS1021A=y
>>>>>>  CONFIG_SOC_VF610=y
>>>>>>  CONFIG_PCI=y
>>>>>> +CONFIG_PCI_MSI=y
>>>>>>  CONFIG_PCI_IMX6=y
>>>>>>  CONFIG_SMP=y
>>>>>>  CONFIG_PREEMPT_VOLUNTARY=y
>>>>>> --
>>>>>> 2.6.2
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> linux-arm-kernel mailing list
>>>>>> linux-arm-kernel at lists.infradead.org
>>>>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_mailman_listinfo_linux-2Darm-2Dkernel&d=DwICaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=s2fO0hii0OGNOv9qQy_HRXy-xAJUD1NNoEcc3io_kx0&m=yQx7ybu-JGcPPh6ZlQyxkC6_Uw62cuBKLb7o3zpK7hQ&s=o-tR0mZ5yKNTTXKX1MR7NuDLpHfvSHIjzi47YLue0aA&e= 
>>>>>
>>>>> Lucas,
>>>>>
>>>>> Any thoughts on why enabling MSI on IMX6 breaks legacy interrupts?
>>>>>
>>>>> Again, many PCI devices/drivers don't support MSI and thus enabling
>>>>> MSI as this patch does makes this config break many PCI devices on
>>>>> IMX6.
>>>>>
>>>>> I have found that MSI does indeed work on the IMX6 for cards/drivers
>>>>> that use MSI, but for those that don't the legacy interrupts never
>>>>> fire regardless of going through a bridge or directly hanging off the
>>>>> IMX6. I assume you can confirm this on your boards/devices as well?
>>>>>
>>>> No, this seems to be an errata in the DW PCIe core. The manual states
>>>> that legacy IRQs and MSIs can't be used together, but I thought this
>>>> only applies to the EP part of the core.
>>>>
>>>> We can probably fix the simple configuration by not enabling MSI
>> support
>>>> until someone actually requests to set up an MSI IRQ, so both IRQ types
>>>> work when only one EP is connected.
>>>> I don't have any idea yet how to fix setups with a PCIe switch where
>>>> some connected EPs might like to use MSIs while some others can't use
>>>> them.
>>>>
>>>> Regards,
>>>> Lucas
>>>>
>>>
>>> Lucas,
>>>
>>> I feel a bit dumb here for forgetting about this issue and letting it
>>> drop, but I've just spent a day debugging an issue with the ath9k
>>> wireless driver only to realize it was that the ath9k card and/or
>>> driver doesn't support MSI interrupts and thus no longer work on
>>> mainline kernels that have MSI enabled. To be honest I'm not sure how
>>> many PCIe devices out there can't support MSI because of hardware
>>> limitations vs drivers that simply have not implemented it.
>>>
>>> To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
>>> it such that you can't disable MSI on the IMX6.
>>>
>>> Is there some fix you can think of to make the IMX6 PCIe host
>>> controller raise an interrupt for cards/drivers that use legacy irq's?
>>> If not, then we need to allow MSI to be disabled for IMX6 and default
>>> it to disabled for compatibility.
>>>
>>
>> Joao / Jingoo,
>>
>> (Adding linux-pci to the list to pick up maintainers of other DWC PCIe
>> core drivers)
>>
>> Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
>> true in general for the DW PCIe core? If any of the host controllers
>> using this core can't support both legacy and MSI irqs together I
>> still believe we shouldn't enable/require MSI as it breaks any
>> card/driver that only supports legacy interrupts (such as ath9k).
> 
> If there are 2 DW PCIe controllers, one controller can be used for legacy
> and another controller can be used for MSI.
> 
> But, I am not sure that one DW PCIe controller can support both MSI device
> and legacy interrupt device at the same time.
> 
> To Joao Pinto,
> Will you confirm this?
> 

Hi Jingoo,
I confirm that if a RC has MSI enable, it won't support legacy interrupts.

Regards,
Joao

> Or if there is anyone who knows this well, please share your knowledge. :-)
> Thanks.
> 
> Best regards,
> Jingoo Han
> 
>>
>> Regards,
>>
>> Tim
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2017-04-05 12:07               ` Joao Pinto
@ 2017-04-05 12:16                 ` Lucas Stach
  -1 siblings, 0 replies; 19+ messages in thread
From: Lucas Stach @ 2017-04-05 12:16 UTC (permalink / raw)
  To: Joao Pinto, Tim Harvey
  Cc: Jingoo Han, patchwork-lst, 'Krzysztof Hałasa',
	'Sascha Hauer', linux-pci, 'Shawn Guo',
	linux-arm-kernel

Am Mittwoch, den 05.04.2017, 13:07 +0100 schrieb Joao Pinto:
[...]
> >>> Lucas,
> >>>
> >>> I feel a bit dumb here for forgetting about this issue and letting it
> >>> drop, but I've just spent a day debugging an issue with the ath9k
> >>> wireless driver only to realize it was that the ath9k card and/or
> >>> driver doesn't support MSI interrupts and thus no longer work on
> >>> mainline kernels that have MSI enabled. To be honest I'm not sure how
> >>> many PCIe devices out there can't support MSI because of hardware
> >>> limitations vs drivers that simply have not implemented it.
> >>>
> >>> To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
> >>> it such that you can't disable MSI on the IMX6.
> >>>
> >>> Is there some fix you can think of to make the IMX6 PCIe host
> >>> controller raise an interrupt for cards/drivers that use legacy irq's?
> >>> If not, then we need to allow MSI to be disabled for IMX6 and default
> >>> it to disabled for compatibility.
> >>>
> >>
> >> Joao / Jingoo,
> >>
> >> (Adding linux-pci to the list to pick up maintainers of other DWC PCIe
> >> core drivers)
> >>
> >> Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
> >> true in general for the DW PCIe core? If any of the host controllers
> >> using this core can't support both legacy and MSI irqs together I
> >> still believe we shouldn't enable/require MSI as it breaks any
> >> card/driver that only supports legacy interrupts (such as ath9k).
> > 
> > If there are 2 DW PCIe controllers, one controller can be used for legacy
> > and another controller can be used for MSI.
> > 
> > But, I am not sure that one DW PCIe controller can support both MSI device
> > and legacy interrupt device at the same time.
> > 
> > To Joao Pinto,
> > Will you confirm this?
> > 
> 
> Hi Jingoo,
> I confirm that if a RC has MSI enable, it won't support legacy interrupts.

Okay, so the only way to solve this in a generic way, that I can see at
the moment is to defer MSI enable until the downstream device actually
requests an MSI irq.

Also we need to disable the MSI capability if any bridge device turns up
during the bus topology scan, as we can have devices with conflicting
requirements connected to the RC in that case.

I'll cook up some patches to implement this.

Regards,
Lucas


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
@ 2017-04-05 12:16                 ` Lucas Stach
  0 siblings, 0 replies; 19+ messages in thread
From: Lucas Stach @ 2017-04-05 12:16 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch, den 05.04.2017, 13:07 +0100 schrieb Joao Pinto:
[...]
> >>> Lucas,
> >>>
> >>> I feel a bit dumb here for forgetting about this issue and letting it
> >>> drop, but I've just spent a day debugging an issue with the ath9k
> >>> wireless driver only to realize it was that the ath9k card and/or
> >>> driver doesn't support MSI interrupts and thus no longer work on
> >>> mainline kernels that have MSI enabled. To be honest I'm not sure how
> >>> many PCIe devices out there can't support MSI because of hardware
> >>> limitations vs drivers that simply have not implemented it.
> >>>
> >>> To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
> >>> it such that you can't disable MSI on the IMX6.
> >>>
> >>> Is there some fix you can think of to make the IMX6 PCIe host
> >>> controller raise an interrupt for cards/drivers that use legacy irq's?
> >>> If not, then we need to allow MSI to be disabled for IMX6 and default
> >>> it to disabled for compatibility.
> >>>
> >>
> >> Joao / Jingoo,
> >>
> >> (Adding linux-pci to the list to pick up maintainers of other DWC PCIe
> >> core drivers)
> >>
> >> Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
> >> true in general for the DW PCIe core? If any of the host controllers
> >> using this core can't support both legacy and MSI irqs together I
> >> still believe we shouldn't enable/require MSI as it breaks any
> >> card/driver that only supports legacy interrupts (such as ath9k).
> > 
> > If there are 2 DW PCIe controllers, one controller can be used for legacy
> > and another controller can be used for MSI.
> > 
> > But, I am not sure that one DW PCIe controller can support both MSI device
> > and legacy interrupt device at the same time.
> > 
> > To Joao Pinto,
> > Will you confirm this?
> > 
> 
> Hi Jingoo,
> I confirm that if a RC has MSI enable, it won't support legacy interrupts.

Okay, so the only way to solve this in a generic way, that I can see at
the moment is to defer MSI enable until the downstream device actually
requests an MSI irq.

Also we need to disable the MSI capability if any bridge device turns up
during the bus topology scan, as we can have devices with conflicting
requirements connected to the RC in that case.

I'll cook up some patches to implement this.

Regards,
Lucas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2017-04-05 12:16                 ` Lucas Stach
@ 2017-04-11 16:05                   ` Tim Harvey
  -1 siblings, 0 replies; 19+ messages in thread
From: Tim Harvey @ 2017-04-11 16:05 UTC (permalink / raw)
  To: Lucas Stach
  Cc: Joao Pinto, Jingoo Han, patchwork-lst, Krzysztof Hałasa,
	Sascha Hauer, linux-pci, Shawn Guo, linux-arm-kernel

On Wed, Apr 5, 2017 at 5:16 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Am Mittwoch, den 05.04.2017, 13:07 +0100 schrieb Joao Pinto:
> [...]
>> >>> Lucas,
>> >>>
>> >>> I feel a bit dumb here for forgetting about this issue and letting it
>> >>> drop, but I've just spent a day debugging an issue with the ath9k
>> >>> wireless driver only to realize it was that the ath9k card and/or
>> >>> driver doesn't support MSI interrupts and thus no longer work on
>> >>> mainline kernels that have MSI enabled. To be honest I'm not sure how
>> >>> many PCIe devices out there can't support MSI because of hardware
>> >>> limitations vs drivers that simply have not implemented it.
>> >>>
>> >>> To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
>> >>> it such that you can't disable MSI on the IMX6.
>> >>>
>> >>> Is there some fix you can think of to make the IMX6 PCIe host
>> >>> controller raise an interrupt for cards/drivers that use legacy irq's?
>> >>> If not, then we need to allow MSI to be disabled for IMX6 and default
>> >>> it to disabled for compatibility.
>> >>>
>> >>
>> >> Joao / Jingoo,
>> >>
>> >> (Adding linux-pci to the list to pick up maintainers of other DWC PCIe
>> >> core drivers)
>> >>
>> >> Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
>> >> true in general for the DW PCIe core? If any of the host controllers
>> >> using this core can't support both legacy and MSI irqs together I
>> >> still believe we shouldn't enable/require MSI as it breaks any
>> >> card/driver that only supports legacy interrupts (such as ath9k).
>> >
>> > If there are 2 DW PCIe controllers, one controller can be used for legacy
>> > and another controller can be used for MSI.
>> >
>> > But, I am not sure that one DW PCIe controller can support both MSI device
>> > and legacy interrupt device at the same time.
>> >
>> > To Joao Pinto,
>> > Will you confirm this?
>> >
>>
>> Hi Jingoo,
>> I confirm that if a RC has MSI enable, it won't support legacy interrupts.
>
> Okay, so the only way to solve this in a generic way, that I can see at
> the moment is to defer MSI enable until the downstream device actually
> requests an MSI irq.
>
> Also we need to disable the MSI capability if any bridge device turns up
> during the bus topology scan, as we can have devices with conflicting
> requirements connected to the RC in that case.
>
> I'll cook up some patches to implement this.
>

Lucas,

Any thoughts yet? I'll likely want to backport this to stable although
the restructuring to drivers/pci/dwc and subsequent changes since 4.10
will likely require a re-written patch.

Best regards,

Tim

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
@ 2017-04-11 16:05                   ` Tim Harvey
  0 siblings, 0 replies; 19+ messages in thread
From: Tim Harvey @ 2017-04-11 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 5, 2017 at 5:16 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Am Mittwoch, den 05.04.2017, 13:07 +0100 schrieb Joao Pinto:
> [...]
>> >>> Lucas,
>> >>>
>> >>> I feel a bit dumb here for forgetting about this issue and letting it
>> >>> drop, but I've just spent a day debugging an issue with the ath9k
>> >>> wireless driver only to realize it was that the ath9k card and/or
>> >>> driver doesn't support MSI interrupts and thus no longer work on
>> >>> mainline kernels that have MSI enabled. To be honest I'm not sure how
>> >>> many PCIe devices out there can't support MSI because of hardware
>> >>> limitations vs drivers that simply have not implemented it.
>> >>>
>> >>> To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
>> >>> it such that you can't disable MSI on the IMX6.
>> >>>
>> >>> Is there some fix you can think of to make the IMX6 PCIe host
>> >>> controller raise an interrupt for cards/drivers that use legacy irq's?
>> >>> If not, then we need to allow MSI to be disabled for IMX6 and default
>> >>> it to disabled for compatibility.
>> >>>
>> >>
>> >> Joao / Jingoo,
>> >>
>> >> (Adding linux-pci to the list to pick up maintainers of other DWC PCIe
>> >> core drivers)
>> >>
>> >> Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
>> >> true in general for the DW PCIe core? If any of the host controllers
>> >> using this core can't support both legacy and MSI irqs together I
>> >> still believe we shouldn't enable/require MSI as it breaks any
>> >> card/driver that only supports legacy interrupts (such as ath9k).
>> >
>> > If there are 2 DW PCIe controllers, one controller can be used for legacy
>> > and another controller can be used for MSI.
>> >
>> > But, I am not sure that one DW PCIe controller can support both MSI device
>> > and legacy interrupt device at the same time.
>> >
>> > To Joao Pinto,
>> > Will you confirm this?
>> >
>>
>> Hi Jingoo,
>> I confirm that if a RC has MSI enable, it won't support legacy interrupts.
>
> Okay, so the only way to solve this in a generic way, that I can see at
> the moment is to defer MSI enable until the downstream device actually
> requests an MSI irq.
>
> Also we need to disable the MSI capability if any bridge device turns up
> during the bus topology scan, as we can have devices with conflicting
> requirements connected to the RC in that case.
>
> I'll cook up some patches to implement this.
>

Lucas,

Any thoughts yet? I'll likely want to backport this to stable although
the restructuring to drivers/pci/dwc and subsequent changes since 4.10
will likely require a re-written patch.

Best regards,

Tim

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
  2017-04-11 16:05                   ` Tim Harvey
@ 2017-04-26 11:50                     ` Lucas Stach
  -1 siblings, 0 replies; 19+ messages in thread
From: Lucas Stach @ 2017-04-26 11:50 UTC (permalink / raw)
  To: Tim Harvey
  Cc: Joao Pinto, Jingoo Han, patchwork-lst, Krzysztof Hałasa,
	Sascha Hauer, linux-pci, Shawn Guo, linux-arm-kernel

Hi Tim,

Am Dienstag, den 11.04.2017, 09:05 -0700 schrieb Tim Harvey:
> On Wed, Apr 5, 2017 at 5:16 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> > Am Mittwoch, den 05.04.2017, 13:07 +0100 schrieb Joao Pinto:
> > [...]
> >> >>> Lucas,
> >> >>>
> >> >>> I feel a bit dumb here for forgetting about this issue and letting it
> >> >>> drop, but I've just spent a day debugging an issue with the ath9k
> >> >>> wireless driver only to realize it was that the ath9k card and/or
> >> >>> driver doesn't support MSI interrupts and thus no longer work on
> >> >>> mainline kernels that have MSI enabled. To be honest I'm not sure how
> >> >>> many PCIe devices out there can't support MSI because of hardware
> >> >>> limitations vs drivers that simply have not implemented it.
> >> >>>
> >> >>> To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
> >> >>> it such that you can't disable MSI on the IMX6.
> >> >>>
> >> >>> Is there some fix you can think of to make the IMX6 PCIe host
> >> >>> controller raise an interrupt for cards/drivers that use legacy irq's?
> >> >>> If not, then we need to allow MSI to be disabled for IMX6 and default
> >> >>> it to disabled for compatibility.
> >> >>>
> >> >>
> >> >> Joao / Jingoo,
> >> >>
> >> >> (Adding linux-pci to the list to pick up maintainers of other DWC PCIe
> >> >> core drivers)
> >> >>
> >> >> Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
> >> >> true in general for the DW PCIe core? If any of the host controllers
> >> >> using this core can't support both legacy and MSI irqs together I
> >> >> still believe we shouldn't enable/require MSI as it breaks any
> >> >> card/driver that only supports legacy interrupts (such as ath9k).
> >> >
> >> > If there are 2 DW PCIe controllers, one controller can be used for legacy
> >> > and another controller can be used for MSI.
> >> >
> >> > But, I am not sure that one DW PCIe controller can support both MSI device
> >> > and legacy interrupt device at the same time.
> >> >
> >> > To Joao Pinto,
> >> > Will you confirm this?
> >> >
> >>
> >> Hi Jingoo,
> >> I confirm that if a RC has MSI enable, it won't support legacy interrupts.
> >
> > Okay, so the only way to solve this in a generic way, that I can see at
> > the moment is to defer MSI enable until the downstream device actually
> > requests an MSI irq.
> >
> > Also we need to disable the MSI capability if any bridge device turns up
> > during the bus topology scan, as we can have devices with conflicting
> > requirements connected to the RC in that case.
> >
> > I'll cook up some patches to implement this.
> >
> 
> Lucas,
> 
> Any thoughts yet? I'll likely want to backport this to stable although
> the restructuring to drivers/pci/dwc and subsequent changes since 4.10
> will likely require a re-written patch.

I have a fix for this, that I'm currently testing on different setups.
I'll probably send it out in a few hours.

Regards,
Lucas


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI
@ 2017-04-26 11:50                     ` Lucas Stach
  0 siblings, 0 replies; 19+ messages in thread
From: Lucas Stach @ 2017-04-26 11:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tim,

Am Dienstag, den 11.04.2017, 09:05 -0700 schrieb Tim Harvey:
> On Wed, Apr 5, 2017 at 5:16 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> > Am Mittwoch, den 05.04.2017, 13:07 +0100 schrieb Joao Pinto:
> > [...]
> >> >>> Lucas,
> >> >>>
> >> >>> I feel a bit dumb here for forgetting about this issue and letting it
> >> >>> drop, but I've just spent a day debugging an issue with the ath9k
> >> >>> wireless driver only to realize it was that the ath9k card and/or
> >> >>> driver doesn't support MSI interrupts and thus no longer work on
> >> >>> mainline kernels that have MSI enabled. To be honest I'm not sure how
> >> >>> many PCIe devices out there can't support MSI because of hardware
> >> >>> limitations vs drivers that simply have not implemented it.
> >> >>>
> >> >>> To make matters worse 3ee803641e76bea76ec730c80dcc64739a9919ff makes
> >> >>> it such that you can't disable MSI on the IMX6.
> >> >>>
> >> >>> Is there some fix you can think of to make the IMX6 PCIe host
> >> >>> controller raise an interrupt for cards/drivers that use legacy irq's?
> >> >>> If not, then we need to allow MSI to be disabled for IMX6 and default
> >> >>> it to disabled for compatibility.
> >> >>>
> >> >>
> >> >> Joao / Jingoo,
> >> >>
> >> >> (Adding linux-pci to the list to pick up maintainers of other DWC PCIe
> >> >> core drivers)
> >> >>
> >> >> Is Luca's statement that 'legacy IRQs and MSIs can't be used together'
> >> >> true in general for the DW PCIe core? If any of the host controllers
> >> >> using this core can't support both legacy and MSI irqs together I
> >> >> still believe we shouldn't enable/require MSI as it breaks any
> >> >> card/driver that only supports legacy interrupts (such as ath9k).
> >> >
> >> > If there are 2 DW PCIe controllers, one controller can be used for legacy
> >> > and another controller can be used for MSI.
> >> >
> >> > But, I am not sure that one DW PCIe controller can support both MSI device
> >> > and legacy interrupt device at the same time.
> >> >
> >> > To Joao Pinto,
> >> > Will you confirm this?
> >> >
> >>
> >> Hi Jingoo,
> >> I confirm that if a RC has MSI enable, it won't support legacy interrupts.
> >
> > Okay, so the only way to solve this in a generic way, that I can see at
> > the moment is to defer MSI enable until the downstream device actually
> > requests an MSI irq.
> >
> > Also we need to disable the MSI capability if any bridge device turns up
> > during the bus topology scan, as we can have devices with conflicting
> > requirements connected to the RC in that case.
> >
> > I'll cook up some patches to implement this.
> >
> 
> Lucas,
> 
> Any thoughts yet? I'll likely want to backport this to stable although
> the restructuring to drivers/pci/dwc and subsequent changes since 4.10
> will likely require a re-written patch.

I have a fix for this, that I'm currently testing on different setups.
I'll probably send it out in a few hours.

Regards,
Lucas

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2017-04-26 11:50 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 17:00 [PATCH 1/2] ARM: imx6: remove config space from PCIe controller ranges property Lucas Stach
2015-11-30 17:00 ` [PATCH 2/2] ARM: imx_v6_v7_defconfig: enable PCI_MSI Lucas Stach
2015-12-02  8:03   ` Shawn Guo
2016-04-14 15:13   ` Tim Harvey
2016-04-15  8:21     ` Lucas Stach
2017-03-30 23:42       ` Tim Harvey
2017-03-31 16:05         ` Tim Harvey
2017-03-31 16:05           ` Tim Harvey
2017-04-04 20:54           ` Jingoo Han
2017-04-04 20:54             ` Jingoo Han
2017-04-05 12:07             ` Joao Pinto
2017-04-05 12:07               ` Joao Pinto
2017-04-05 12:16               ` Lucas Stach
2017-04-05 12:16                 ` Lucas Stach
2017-04-11 16:05                 ` Tim Harvey
2017-04-11 16:05                   ` Tim Harvey
2017-04-26 11:50                   ` Lucas Stach
2017-04-26 11:50                     ` Lucas Stach
2015-12-02  8:01 ` [PATCH 1/2] ARM: imx6: remove config space from PCIe controller ranges property Shawn Guo

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.