All of lore.kernel.org
 help / color / mirror / Atom feed
* PCI support for SOC_MT7621
@ 2019-10-16 14:31 Sergio Paracuellos
  2019-10-16 21:57 ` NeilBrown
  0 siblings, 1 reply; 5+ messages in thread
From: Sergio Paracuellos @ 2019-10-16 14:31 UTC (permalink / raw)
  To: hauke; +Cc: paul.burton, linux-mips, NeilBrown, ralf

Hi all,

I have a concern about commit:

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

This commit make a regression for my kernel configuration for gnubee
board which is mt7621 SOC based and also has PCI. With this applied
PCI_DRIVERS_GENERIC is not selectable anymore and it becomes into a
PCI_DRIVERS_LEGACY configuration making impossible to compile
mt7621-pci driver for this board.

I think this should be reverted. Am I missing something here?

Thanks in advance for your time.

Best regards,
    Sergio Paracuellos

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

* Re: PCI support for SOC_MT7621
  2019-10-16 14:31 PCI support for SOC_MT7621 Sergio Paracuellos
@ 2019-10-16 21:57 ` NeilBrown
  2019-10-17  6:12   ` Sergio Paracuellos
  2019-10-19  8:12   ` [PATCH] MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected Sergio Paracuellos
  0 siblings, 2 replies; 5+ messages in thread
From: NeilBrown @ 2019-10-16 21:57 UTC (permalink / raw)
  To: Sergio Paracuellos, hauke; +Cc: paul.burton, linux-mips, ralf

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]

On Wed, Oct 16 2019, Sergio Paracuellos wrote:

> Hi all,
>
> I have a concern about commit:
>
> c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")
>
> This commit make a regression for my kernel configuration for gnubee
> board which is mt7621 SOC based and also has PCI. With this applied
> PCI_DRIVERS_GENERIC is not selectable anymore and it becomes into a
> PCI_DRIVERS_LEGACY configuration making impossible to compile
> mt7621-pci driver for this board.
>
> I think this should be reverted. Am I missing something here?

The commit reports a build error without the patch, and we don't want
that.
Maybe change the
  select HAVE_PCI
to
  select HAVE_PCI if STAGING
or
  select HAVE_PCI if PCI_MT7621

Hauke: do either of those fix your compile error?

Thanks,
NeilBrown


>
> Thanks in advance for your time.
>
> Best regards,
>     Sergio Paracuellos

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: PCI support for SOC_MT7621
  2019-10-16 21:57 ` NeilBrown
@ 2019-10-17  6:12   ` Sergio Paracuellos
  2019-10-17 11:36     ` Sergio Paracuellos
  2019-10-19  8:12   ` [PATCH] MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected Sergio Paracuellos
  1 sibling, 1 reply; 5+ messages in thread
From: Sergio Paracuellos @ 2019-10-17  6:12 UTC (permalink / raw)
  To: NeilBrown; +Cc: hauke, paul.burton, linux-mips, ralf

Hi Neil,

On Wed, Oct 16, 2019 at 11:57 PM NeilBrown <neil@brown.name> wrote:
>
> On Wed, Oct 16 2019, Sergio Paracuellos wrote:
>
> > Hi all,
> >
> > I have a concern about commit:
> >
> > c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")
> >
> > This commit make a regression for my kernel configuration for gnubee
> > board which is mt7621 SOC based and also has PCI. With this applied
> > PCI_DRIVERS_GENERIC is not selectable anymore and it becomes into a
> > PCI_DRIVERS_LEGACY configuration making impossible to compile
> > mt7621-pci driver for this board.
> >
> > I think this should be reverted. Am I missing something here?
>
> The commit reports a build error without the patch, and we don't want
> that.

I didn't understand properly the commit message. Yes, of course we
don't want a build
fail :).

> Maybe change the
>   select HAVE_PCI
> to
>   select HAVE_PCI if STAGING
> or
>   select HAVE_PCI if PCI_MT7621

I think the second one could be more accurate in this case.

>
> Hauke: do either of those fix your compile error?
>

If so, I don't have any problem to send a patch with this fixed if you
are busy. Just let me know.

> Thanks,
> NeilBrown

Best regards,
    Sergio Paracuellos
>
>
> >
> > Thanks in advance for your time.
> >
> > Best regards,
> >     Sergio Paracuellos

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

* Re: PCI support for SOC_MT7621
  2019-10-17  6:12   ` Sergio Paracuellos
@ 2019-10-17 11:36     ` Sergio Paracuellos
  0 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2019-10-17 11:36 UTC (permalink / raw)
  To: NeilBrown; +Cc: hauke, paul.burton, linux-mips, ralf

On Thu, Oct 17, 2019 at 8:12 AM Sergio Paracuellos
<sergio.paracuellos@gmail.com> wrote:
>
> Hi Neil,
>
> On Wed, Oct 16, 2019 at 11:57 PM NeilBrown <neil@brown.name> wrote:
> >
> > On Wed, Oct 16 2019, Sergio Paracuellos wrote:
> >
> > > Hi all,
> > >
> > > I have a concern about commit:
> > >
> > > c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")
> > >
> > > This commit make a regression for my kernel configuration for gnubee
> > > board which is mt7621 SOC based and also has PCI. With this applied
> > > PCI_DRIVERS_GENERIC is not selectable anymore and it becomes into a
> > > PCI_DRIVERS_LEGACY configuration making impossible to compile
> > > mt7621-pci driver for this board.
> > >
> > > I think this should be reverted. Am I missing something here?
> >
> > The commit reports a build error without the patch, and we don't want
> > that.
>
> I didn't understand properly the commit message. Yes, of course we
> don't want a build
> fail :).
>
> > Maybe change the
> >   select HAVE_PCI
> > to
> >   select HAVE_PCI if STAGING
> > or
> >   select HAVE_PCI if PCI_MT7621
>
> I think the second one could be more accurate in this case.

Actually I tested this two changes with my current configuration.
PCI_MT7621 depends on PCI so the second one gets into a recursive
dependency problem. We can skip depends on PCI and only select
PCI_DRIVERS_GENERIC in mt7621_pci Kconfig file to avoid this. The
following change works,  but I don't know if this is the correct thing
to do:

$ git diff arch/mips/ralink/Kconfig drivers/staging/mt7621-pci/Kconfig
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.

In the other hand, the "select HAVE_PCI if STAGING" one works as it is.

Thanks,
    Sergio Paracuellos
>
> >
> > Hauke: do either of those fix your compile error?
> >
>
> If so, I don't have any problem to send a patch with this fixed if you
> are busy. Just let me know.
>
> > Thanks,
> > NeilBrown
>
> Best regards,
>     Sergio Paracuellos
> >
> >
> > >
> > > Thanks in advance for your time.
> > >
> > > Best regards,
> > >     Sergio Paracuellos

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

* [PATCH] MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected
  2019-10-16 21:57 ` NeilBrown
  2019-10-17  6:12   ` Sergio Paracuellos
@ 2019-10-19  8:12   ` Sergio Paracuellos
  1 sibling, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2019-10-19  8:12 UTC (permalink / raw)
  Cc: Hauke Mehrtens, 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: 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] 5+ messages in thread

end of thread, other threads:[~2019-10-19  8:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 14:31 PCI support for SOC_MT7621 Sergio Paracuellos
2019-10-16 21:57 ` NeilBrown
2019-10-17  6:12   ` Sergio Paracuellos
2019-10-17 11:36     ` Sergio Paracuellos
2019-10-19  8:12   ` [PATCH] MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected Sergio Paracuellos

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.