linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected
@ 2019-10-31  7:11 Sergio Paracuellos
  2019-10-31 21:36 ` Paul Burton
  0 siblings, 1 reply; 3+ messages in thread
From: Sergio Paracuellos @ 2019-10-31  7:11 UTC (permalink / raw)
  Cc: Hauke Mehrtens, Paul Burton, ralf, jhogan, john, NeilBrown,
	Greg Kroah-Hartman, linux-mips

Some versions of SoC MT7621 have three PCI express hosts. Some boards
make use of those PCI through the staging driver mt7621-pci. Recently
PCI support has been removed from MT7621 Soc kernel configuration due
to a build error. This makes imposible to compile staging driver and
produces a regression for gnubee based boards. Enable support for PCI
again but enable it only if staging mt7621-pci driver is selected.

Fixes: c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")

Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Paul Burton <paul.burton@mips.com>
Cc: ralf@linux-mips.org
Cc: jhogan@kernel.org
Cc: john@phrozen.org
Cc: NeilBrown <neil@brown.name>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-mips@vger.kernel.org
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 arch/mips/ralink/Kconfig           | 1 +
 drivers/staging/mt7621-pci/Kconfig | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
index 1434fa60f3db..94e9ce994494 100644
--- a/arch/mips/ralink/Kconfig
+++ b/arch/mips/ralink/Kconfig
@@ -51,6 +51,7 @@ choice
 		select MIPS_GIC
 		select COMMON_CLK
 		select CLKSRC_MIPS_GIC
+		select HAVE_PCI if PCI_MT7621
 endchoice
 
 choice
diff --git a/drivers/staging/mt7621-pci/Kconfig b/drivers/staging/mt7621-pci/Kconfig
index af928b75a940..ce58042f2f21 100644
--- a/drivers/staging/mt7621-pci/Kconfig
+++ b/drivers/staging/mt7621-pci/Kconfig
@@ -2,7 +2,6 @@
 config PCI_MT7621
 	tristate "MediaTek MT7621 PCI Controller"
 	depends on RALINK
-	depends on PCI
 	select PCI_DRIVERS_GENERIC
 	help
 	  This selects a driver for the MediaTek MT7621 PCI Controller.
-- 
2.19.1


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

* Re: [PATCH RESEND] MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected
  2019-10-31  7:11 [PATCH RESEND] MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected Sergio Paracuellos
@ 2019-10-31 21:36 ` Paul Burton
  2019-11-01  5:08   ` Sergio Paracuellos
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Burton @ 2019-10-31 21:36 UTC (permalink / raw)
  To: Sergio Paracuellos, Hauke Mehrtens
  Cc: Paul Burton, ralf, jhogan, john, NeilBrown, Greg Kroah-Hartman,
	linux-mips

Hi Sergio,

On Thu, Oct 31, 2019 at 08:11:24AM +0100, Sergio Paracuellos wrote:
> diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
> index 1434fa60f3db..94e9ce994494 100644
> --- a/arch/mips/ralink/Kconfig
> +++ b/arch/mips/ralink/Kconfig
> @@ -51,6 +51,7 @@ choice
>  		select MIPS_GIC
>  		select COMMON_CLK
>  		select CLKSRC_MIPS_GIC
> +		select HAVE_PCI if PCI_MT7621
>  endchoice
>  
>  choice
> diff --git a/drivers/staging/mt7621-pci/Kconfig b/drivers/staging/mt7621-pci/Kconfig
> index af928b75a940..ce58042f2f21 100644
> --- a/drivers/staging/mt7621-pci/Kconfig
> +++ b/drivers/staging/mt7621-pci/Kconfig
> @@ -2,7 +2,6 @@
>  config PCI_MT7621
>  	tristate "MediaTek MT7621 PCI Controller"
>  	depends on RALINK
> -	depends on PCI
>  	select PCI_DRIVERS_GENERIC
>  	help
>  	  This selects a driver for the MediaTek MT7621 PCI Controller.

This doesn't seem right to me - doesn't this now allow the PCI
controller driver to build without PCI support enabled? Are you sure
that won't allow more build failures?

How does enabling the driver change whether or not the SoC has PCI
support? The SoC is always the same hardware regardless of whether you
enable the driver for it, so this doesn't seem right to me.

Hauke - do you recall what the build failure you mentioned in commit
c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")
was?

Thanks,
    Paul

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

* Re: [PATCH RESEND] MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected
  2019-10-31 21:36 ` Paul Burton
@ 2019-11-01  5:08   ` Sergio Paracuellos
  0 siblings, 0 replies; 3+ messages in thread
From: Sergio Paracuellos @ 2019-11-01  5:08 UTC (permalink / raw)
  To: Paul Burton
  Cc: Hauke Mehrtens, Paul Burton, ralf, jhogan, John Crispin,
	NeilBrown, Greg Kroah-Hartman, linux-mips

Hi Paul,

Thanks for the review.

On Thu, Oct 31, 2019 at 10:36 PM Paul Burton <paulburton@kernel.org> wrote:
>
> Hi Sergio,
>
> On Thu, Oct 31, 2019 at 08:11:24AM +0100, Sergio Paracuellos wrote:
> > diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
> > index 1434fa60f3db..94e9ce994494 100644
> > --- a/arch/mips/ralink/Kconfig
> > +++ b/arch/mips/ralink/Kconfig
> > @@ -51,6 +51,7 @@ choice
> >               select MIPS_GIC
> >               select COMMON_CLK
> >               select CLKSRC_MIPS_GIC
> > +             select HAVE_PCI if PCI_MT7621
> >  endchoice
> >
> >  choice
> > diff --git a/drivers/staging/mt7621-pci/Kconfig b/drivers/staging/mt7621-pci/Kconfig
> > index af928b75a940..ce58042f2f21 100644
> > --- a/drivers/staging/mt7621-pci/Kconfig
> > +++ b/drivers/staging/mt7621-pci/Kconfig
> > @@ -2,7 +2,6 @@
> >  config PCI_MT7621
> >       tristate "MediaTek MT7621 PCI Controller"
> >       depends on RALINK
> > -     depends on PCI
> >       select PCI_DRIVERS_GENERIC
> >       help
> >         This selects a driver for the MediaTek MT7621 PCI Controller.
>
> This doesn't seem right to me - doesn't this now allow the PCI
> controller driver to build without PCI support enabled? Are you sure
> that won't allow more build failures?

No, I am not really sure. I don't really know what is the best
approach to be able to avoid the build failure reported in
c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")
but this commit is a regression and avoid to properly build the
MediaTek MT7621 PCI Controller driver located in staging.

>
> How does enabling the driver change whether or not the SoC has PCI
> support? The SoC is always the same hardware regardless of whether you
> enable the driver for it, so this doesn't seem right to me.

So, this SOC has three PCI's, so "select HAVE_PCI" seems the right
thing to do for the SoC config but it seems in some versions that has
build failures.

>
> Hauke - do you recall what the build failure you mentioned in commit
> c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")
> was?

It would be awesome to know that to be able to get a general valid solution.

>
> Thanks,
>     Paul

Best regards,
    Sergio Paracuellos

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

end of thread, other threads:[~2019-11-01  5:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31  7:11 [PATCH RESEND] MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected Sergio Paracuellos
2019-10-31 21:36 ` Paul Burton
2019-11-01  5:08   ` Sergio Paracuellos

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).