linux/drivers/net/ethernet
Jacob Keller cf871006c0 ice: remove unnecessary CONFIG_ICE_GNSS
CONFIG_ICE_GNSS was added by commit c7ef8221ca ("ice: use GNSS subsystem
instead of TTY") as a way to allow the ice driver to optionally support
GNSS features without forcing a dependency on CONFIG_GNSS.

The original implementation of that commit at [1] used IS_REACHABLE. This
was rejected by Olek at [2] with the suggested implementation of
CONFIG_ICE_GNSS.

Eventually after merging, Linus reported a .config which had
CONFIG_ICE_GNSS = y when both GNSS = n and ICE = n. This confused him and
he felt that the config option was not useful, and commented about it at
[3].

CONFIG_ICE_GNSS is defined to y whenever GNSS = ICE. This results in it
being set in cases where both options are not enabled.

The goal of CONFIG_ICE_GNSS is to ensure that the GNSS support in the ice
driver is enabled when GNSS is enabled.

The complaint from Olek about the original IS_REACHABLE was due to the
required IS_REACHABLE checks throughout the ice driver code and the fact
that ice_gnss.c was compiled regardless of GNSS support.

This can be fixed in the Makefile by using ice-$(CONFIG_GNSS) += ice_gnss.o

In this case, if GNSS = m and ICE = y, we can result in some confusing
behavior where GNSS support is not enabled because its not built in. See
[4].

To disallow this, have CONFIG_ICE depend on GNSS || GNSS = n. This ensures
that we cannot enable CONFIG_ICE as builtin while GNSS is a module.

Drop CONFIG_ICE_GNSS, and replace the IS_ENABLED checks for it with
checks for GNSS. Update the Makefile to add the ice_gnss.o object based on
CONFIG_GNSS.

This works to ensure that GNSS support can optionally be enabled, doesn't
have an unnnecessary extra config option, and has Kbuild enforce the
dependency such that you can't accidentally enable GNSS as a module and ICE
as a builtin.

[1] https://lore.kernel.org/intel-wired-lan/20221019095603.44825-1-arkadiusz.kubalewski@intel.com/
[2] https://lore.kernel.org/intel-wired-lan/20221028165706.96849-1-alexandr.lobakin@intel.com/
[3] https://lore.kernel.org/all/CAHk-=wi_410KZqHwF-WL5U7QYxnpHHHNP-3xL=g_y89XnKc-uw@mail.gmail.com/
[4] https://lore.kernel.org/netdev/20230223161309.0e439c5f@kernel.org/

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Fixes: c7ef8221ca ("ice: use GNSS subsystem instead of TTY")
Cc: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Cc: Alexander Lobakin <alexandr.lobakin@intel.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Anthony Nguyen <anthony.l.nguyen@intel.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-26 14:53:09 +00:00
..
3com
8390
actions net: Remove C45 check in C22 only MDIO bus drivers 2023-01-20 18:12:45 -08:00
adaptec
adi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-27 22:56:18 -08:00
aeroflex ethernet: aeroflex: fix potential skb leak in greth_init_rings() 2022-12-07 11:45:52 +01:00
agere
alacritech
allwinner
alteon
altera Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
amazon drivers: net: turn on XDP features 2023-02-02 20:48:23 -08:00
amd amd-xgbe: fix mismatched prototype 2023-02-06 22:33:18 -08:00
apm
apple net: apple: bmac: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-12 09:53:10 +00:00
aquantia bpf-next-for-netdev 2023-02-10 17:51:27 -08:00
arc
asix
atheros net: alx: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-12-19 09:23:02 +00:00
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-02-21 09:29:25 -08:00
brocade
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-02-09 12:25:40 -08:00
calxeda
cavium drivers: net: turn on XDP features 2023-02-02 20:48:23 -08:00
chelsio Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
cirrus
cisco
cortina
davicom
dec
dlink
emulex
engleder bpf-next-for-netdev 2023-02-10 17:51:27 -08:00
ezchip
faraday net: ftmac100: handle netdev flags IFF_PROMISC and IFF_ALLMULTI 2023-01-18 13:03:40 +00:00
freescale net: dpaa2-eth: do not always set xsk support in xdp_features flag 2023-02-20 07:49:44 +01:00
fujitsu
fungible drivers: net: turn on XDP features 2023-02-02 20:48:23 -08:00
google gve: Fix gve interrupt names 2023-02-06 10:03:26 +00:00
hisilicon net/sched: move struct tc_mqprio_qopt_offload from pkt_cls.h to pkt_sched.h 2023-02-06 10:06:43 +00:00
huawei
i825xx
ibm ibmvnic: Assign XPS map to correct queue index 2023-02-24 18:34:26 -08:00
intel ice: remove unnecessary CONFIG_ICE_GNSS 2023-02-26 14:53:09 +00:00
litex
marvell octeontx2-pf: Use correct struct reference in test condition 2023-02-23 16:24:50 -08:00
mediatek net: ethernet: mtk_wed: No need to clear memory after a dma_alloc_coherent() call 2023-02-13 19:45:46 -08:00
mellanox net/mlx5e: Remove hairpin write debugfs files 2023-02-23 16:29:32 -08:00
micrel
microchip Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-02-21 09:29:25 -08:00
microsoft bpf-next-for-netdev 2023-02-10 17:51:27 -08:00
moxa
mscc net: dsa: ocelot: add PTP dependency for NET_DSA_MSCC_OCELOT_EXT 2023-02-10 19:35:58 -08:00
myricom myri10ge: Fix an error handling path in myri10ge_probe() 2022-12-19 12:30:32 +00:00
natsemi
neterion ethernet: s2io: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-12 09:38:24 +00:00
netronome Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2023-02-17 11:06:39 +00:00
ni net: nixge: Separate C22 and C45 transactions 2023-01-17 19:34:08 -08:00
nvidia
nxp
oki-semi
packetengines
pasemi
pensando ionic: add tx/rx-push support with device Component Memory Buffers 2023-02-13 11:05:12 +00:00
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-02-21 09:29:25 -08:00
qualcomm net: qualcomm: rmnet: add ethtool support for configuring tx aggregation 2023-01-13 10:23:52 +00:00
rdc r6040: Fix kmemleak in probe and remove 2022-12-15 12:48:34 +01:00
realtek r8169: reset bus if NIC isn't accessible after tx timeout 2023-01-16 13:38:28 +00:00
renesas net: renesas: rswitch: Improve TX timestamp accuracy 2023-02-10 19:44:17 -08:00
rocker
samsung net: sxgbe: Separate C22 and C45 transactions 2023-01-17 19:34:08 -08:00
seeq
sfc sfc: fix builds without CONFIG_RTC_LIB 2023-02-20 16:39:50 -08:00
sgi
silan
sis
smsc
socionext drivers: net: turn on XDP features 2023-02-02 20:48:23 -08:00
stmicro Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2023-02-17 11:06:39 +00:00
sun net: sunhme: Fix region request 2023-02-23 09:58:51 -08:00
sunplus net: Remove C45 check in C22 only MDIO bus drivers 2023-01-20 18:12:45 -08:00
synopsys
tehuti
ti Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2023-02-17 11:06:39 +00:00
toshiba
tundra
vertexcom
via
wangxun net: wangxun: Add the basic ethtool interfaces 2023-02-15 21:32:01 -08:00
wiznet
xilinx Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-12-13 09:49:29 +01:00
xircom
xscale
dnet.c net: ethernet: dnet: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-12 09:56:17 +00:00
dnet.h
ec_bhf.c
ethoc.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile