net: pch_gbe: Allow build on MIPS_GENERIC kernel

Message ID 20230530150301.9555-1-jiaxun.yang@flygoat.com
State New
Headers
Series net: pch_gbe: Allow build on MIPS_GENERIC kernel |

Commit Message

Jiaxun Yang May 30, 2023, 3:03 p.m. UTC
  MIPS Boston board, which is using MIPS_GENERIC kernel is using
EG20T PCH and thus need this driver.

Note that CONFIG_PCH_GBE is selected in arch/mips/configs/generic/
board-boston.config for a while, some how it's never wired up
in Kconfig.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
Netdev maintainers, is it possible to squeeze this tiny patch into
fixes tree?
---
 drivers/net/ethernet/oki-semi/pch_gbe/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Simon Horman May 31, 2023, 9:50 p.m. UTC | #1
[ Fixed Jakub's email address ]

On Tue, May 30, 2023 at 04:03:01PM +0100, Jiaxun Yang wrote:
> MIPS Boston board, which is using MIPS_GENERIC kernel is using
> EG20T PCH and thus need this driver.
> 
> Note that CONFIG_PCH_GBE is selected in arch/mips/configs/generic/
> board-boston.config for a while, some how it's never wired up
> in Kconfig.
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
> Netdev maintainers, is it possible to squeeze this tiny patch into
> fixes tree?

Hi Jianxun Yang,

with this patch applied on top of net [1] I see the following.
Am I doing something wrong?

ARCH=mips

$ make defconfig
CONFIG: mips-gcc-12.2.0
*** Default configuration is based on target '32r2el_defconfig'
Using ./arch/mips/configs/generic_defconfig as base
Merging arch/mips/configs/generic/32r2.config
Merging arch/mips/configs/generic/el.config
Merging ./arch/mips/configs/generic/board-boston.config
Merging ./arch/mips/configs/generic/board-marduk.config
Merging ./arch/mips/configs/generic/board-ni169445.config
Merging ./arch/mips/configs/generic/board-ocelot.config
Merging ./arch/mips/configs/generic/board-ranchu.config
Merging ./arch/mips/configs/generic/board-sead-3.config
Merging ./arch/mips/configs/generic/board-virt.config
Merging ./arch/mips/configs/generic/board-xilfpga.config

WARNING: unmet direct dependencies detected for PTP_1588_CLOCK_PCH
  Depends on [n]: (X86_32 || COMPILE_TEST [=n]) && HAS_IOMEM [=y] && PCI [=y] && NET [=y] && PTP_1588_CLOCK [=y]
  Selected by [y]:
  - PCH_GBE [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_OKI [=y] && PCI [=y] && (MIPS_GENERIC [=y] || X86_32 || COMPILE_TEST [=n]) && PTP_1588_CLOCK [=y]
#
# configuration written to .config
#

Other than the warning a kernel build with this config seemed to work fine

[1] 7ba0732c805f ("Merge branch 'selftests-mptcp-skip-tests-not-supported-by-old-kernels-part-1'")
    https://git.kernel.org/netdev/net/c/7ba0732c805f


Also, if the patch is targeted at 'net' then that should be noted in the
subject.

	Subject: [PATCH net] ...

And 'pch_gbe: ' is probably a slightly better prefix.

	Subject: [PATCH net] pch_gbe: ...

...
  

Patch

diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
index 4e18b64dceb9..9651cc714ef2 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig
@@ -5,7 +5,7 @@ 
 
 config PCH_GBE
 	tristate "OKI SEMICONDUCTOR IOH(ML7223/ML7831) GbE"
-	depends on PCI && (X86_32 || COMPILE_TEST)
+	depends on PCI && (MIPS_GENERIC || X86_32 || COMPILE_TEST)
 	depends on PTP_1588_CLOCK
 	select MII
 	select PTP_1588_CLOCK_PCH