mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-28 13:34:38 +08:00
e5f3155267
The 'imply' keyword does not do what most people think it does, it only
politely asks Kconfig to turn on another symbol, but does not prevent
it from being disabled manually or built as a loadable module when the
user is built-in. In the ICE driver, the latter now causes a link failure:
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_eth_ioctl':
ice_main.c:(.text+0x13b0): undefined reference to `ice_ptp_get_ts_config'
ice_main.c:(.text+0x13b0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_get_ts_config'
aarch64-linux-ld: ice_main.c:(.text+0x13bc): undefined reference to `ice_ptp_set_ts_config'
ice_main.c:(.text+0x13bc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_set_ts_config'
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_prepare_for_reset':
ice_main.c:(.text+0x31fc): undefined reference to `ice_ptp_release'
ice_main.c:(.text+0x31fc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_release'
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_rebuild':
This is a recurring problem in many drivers, and we have discussed
it several times befores, without reaching a consensus. I'm providing
a link to the previous email thread for reference, which discusses
some related problems.
To solve the dependency issue better than the 'imply' keyword, introduce a
separate Kconfig symbol "CONFIG_PTP_1588_CLOCK_OPTIONAL" that any driver
can depend on if it is able to use PTP support when available, but works
fine without it. Whenever CONFIG_PTP_1588_CLOCK=m, those drivers are
then prevented from being built-in, the same way as with a 'depends on
PTP_1588_CLOCK || !PTP_1588_CLOCK' dependency that does the same trick,
but that can be rather confusing when you first see it.
Since this should cover the dependencies correctly, the IS_REACHABLE()
hack in the header is no longer needed now, and can be turned back
into a normal IS_ENABLED() check. Any driver that gets the dependency
wrong will now cause a link time failure rather than being unable to use
PTP support when that is in a loadable module.
However, the two recently added ptp_get_vclocks_index() and
ptp_convert_timestamp() interfaces are only called from builtin code with
ethtool and socket timestamps, so keep the current behavior by stubbing
those out completely when PTP is in a loadable module. This should be
addressed properly in a follow-up.
As Richard suggested, we may want to actually turn PTP support into a
'bool' option later on, preventing it from being a loadable module
altogether, which would be one way to solve the problem with the ethtool
interface.
Fixes: 06c16d89d2
("ice: register 1588 PTP clock device object for E810 devices")
Link: https://lore.kernel.org/netdev/20210804121318.337276-1-arnd@kernel.org/
Link: https://lore.kernel.org/netdev/CAK8P3a06enZOf=XyZ+zcAwBczv41UuCTz+=0FMf2gBz1_cOnZQ@mail.gmail.com/
Link: https://lore.kernel.org/netdev/CAK8P3a3=eOxE-K25754+fB_-i_0BZzf9a9RfPTX3ppSwu9WZXw@mail.gmail.com/
Link: https://lore.kernel.org/netdev/20210726084540.3282344-1-arnd@kernel.org/
Acked-by: Shannon Nelson <snelson@pensando.io>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210812183509.1362782-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
141 lines
4.1 KiB
Plaintext
141 lines
4.1 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Chelsio device configuration
|
|
#
|
|
|
|
config NET_VENDOR_CHELSIO
|
|
bool "Chelsio devices"
|
|
default y
|
|
depends on PCI
|
|
help
|
|
If you have a network (Ethernet) card belonging to this class, say Y.
|
|
|
|
Note that the answer to this question doesn't directly affect the
|
|
kernel: saying N will just cause the configurator to skip all
|
|
the questions about Chelsio devices. If you say Y, you will be asked for
|
|
your specific card in the following questions.
|
|
|
|
if NET_VENDOR_CHELSIO
|
|
|
|
config CHELSIO_T1
|
|
tristate "Chelsio 10Gb Ethernet support"
|
|
depends on PCI
|
|
select CRC32
|
|
select MDIO
|
|
help
|
|
This driver supports Chelsio gigabit and 10-gigabit
|
|
Ethernet cards. More information about adapter features and
|
|
performance tuning is in
|
|
<file:Documentation/networking/device_drivers/ethernet/chelsio/cxgb.rst>.
|
|
|
|
For general information about Chelsio and our products, visit
|
|
our website at <http://www.chelsio.com>.
|
|
|
|
For customer support, please visit our customer support page at
|
|
<http://www.chelsio.com/support.html>.
|
|
|
|
Please send feedback to <linux-bugs@chelsio.com>.
|
|
|
|
To compile this driver as a module, choose M here: the module
|
|
will be called cxgb.
|
|
|
|
config CHELSIO_T1_1G
|
|
bool "Chelsio gigabit Ethernet support"
|
|
depends on CHELSIO_T1
|
|
help
|
|
Enables support for Chelsio's gigabit Ethernet PCI cards. If you
|
|
are using only 10G cards say 'N' here.
|
|
|
|
config CHELSIO_T3
|
|
tristate "Chelsio Communications T3 10Gb Ethernet support"
|
|
depends on PCI && INET
|
|
select FW_LOADER
|
|
select MDIO
|
|
help
|
|
This driver supports Chelsio T3-based gigabit and 10Gb Ethernet
|
|
adapters.
|
|
|
|
For general information about Chelsio and our products, visit
|
|
our website at <http://www.chelsio.com>.
|
|
|
|
For customer support, please visit our customer support page at
|
|
<http://www.chelsio.com/support.html>.
|
|
|
|
Please send feedback to <linux-bugs@chelsio.com>.
|
|
|
|
To compile this driver as a module, choose M here: the module
|
|
will be called cxgb3.
|
|
|
|
config CHELSIO_T4
|
|
tristate "Chelsio Communications T4/T5/T6 Ethernet support"
|
|
depends on PCI && (IPV6 || IPV6=n) && (TLS || TLS=n)
|
|
depends on PTP_1588_CLOCK_OPTIONAL
|
|
select FW_LOADER
|
|
select MDIO
|
|
select ZLIB_DEFLATE
|
|
help
|
|
This driver supports Chelsio T4, T5 & T6 based gigabit, 10Gb Ethernet
|
|
adapter and T5/T6 based 40Gb and T6 based 25Gb, 50Gb and 100Gb
|
|
Ethernet adapters.
|
|
|
|
For general information about Chelsio and our products, visit
|
|
our website at <http://www.chelsio.com>.
|
|
|
|
For customer support, please visit our customer support page at
|
|
<http://www.chelsio.com/support.html>.
|
|
|
|
Please send feedback to <linux-bugs@chelsio.com>.
|
|
|
|
To compile this driver as a module choose M here; the module
|
|
will be called cxgb4.
|
|
|
|
config CHELSIO_T4_DCB
|
|
bool "Data Center Bridging (DCB) Support for Chelsio T4/T5/T6 cards"
|
|
default n
|
|
depends on CHELSIO_T4 && DCB
|
|
help
|
|
Enable DCB support through rtNetlink interface.
|
|
Say Y here if you want to enable Data Center Bridging (DCB) support
|
|
in the driver.
|
|
|
|
If unsure, say N.
|
|
|
|
config CHELSIO_T4_FCOE
|
|
bool "Fibre Channel over Ethernet (FCoE) Support for Chelsio T5 cards"
|
|
default n
|
|
depends on CHELSIO_T4 && CHELSIO_T4_DCB && FCOE
|
|
help
|
|
Enable FCoE offload features.
|
|
Say Y here if you want to enable Fibre Channel over Ethernet (FCoE) support
|
|
in the driver.
|
|
|
|
If unsure, say N.
|
|
|
|
config CHELSIO_T4VF
|
|
tristate "Chelsio Communications T4/T5/T6 Virtual Function Ethernet support"
|
|
depends on PCI
|
|
help
|
|
This driver supports Chelsio T4, T5 & T6 based gigabit, 10Gb Ethernet
|
|
adapters and T5/T6 based 40Gb and T6 based 25Gb, 50Gb and 100Gb
|
|
Ethernet adapters with PCI-E SR-IOV Virtual Functions.
|
|
|
|
For general information about Chelsio and our products, visit
|
|
our website at <http://www.chelsio.com>.
|
|
|
|
For customer support, please visit our customer support page at
|
|
<http://www.chelsio.com/support.html>.
|
|
|
|
Please send feedback to <linux-bugs@chelsio.com>.
|
|
|
|
To compile this driver as a module choose M here; the module
|
|
will be called cxgb4vf.
|
|
|
|
config CHELSIO_LIB
|
|
tristate
|
|
help
|
|
Common library for Chelsio drivers.
|
|
|
|
source "drivers/net/ethernet/chelsio/inline_crypto/Kconfig"
|
|
|
|
endif # NET_VENDOR_CHELSIO
|