linux/drivers/nvme/host
Hannes Reinecke 706add1367 nvme: keyring: fix conditional compilation
The keyring and auth functions can be called from both the host and
the target side and are controlled by Kconfig options for each of the
combinations, but the declarations are controlled by #ifdef checks
on the shared Kconfig symbols.

This leads to link failures in combinations where one of the frontends
is built-in and the other one is a module, and the keyring code
ends up in a module that is not reachable from the builtin code:

ld: drivers/nvme/host/core.o: in function `nvme_core_exit':
core.c:(.exit.text+0x4): undefined reference to `nvme_keyring_exit'
ld: drivers/nvme/host/core.o: in function `nvme_core_init':
core.c:(.init.text+0x94): undefined reference to `nvme_keyring_init

ld: drivers/nvme/host/tcp.o: in function `nvme_tcp_setup_ctrl':
tcp.c:(.text+0x4c18): undefined reference to `nvme_tls_psk_default'

Address this by moving nvme_keyring_init()/nvme_keyring_exit() into
module init/exit functions for the keyring module.

Fixes: be8e82caa6 ("nvme-tcp: enable TLS handshake upcall")
Signed-off-by: Hannes Reinecke <hare@suse.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2023-11-08 08:07:08 -08:00
..
apple.c nvme-apple: return directly instead of else 2023-04-13 08:55:06 +02:00
auth.c nvme-auth: always set valid seq_num in dhchap reply 2023-11-06 08:34:20 -08:00
constants.c nvme fixes for Linux 6.5 2023-06-30 14:04:08 -06:00
core.c nvme: keyring: fix conditional compilation 2023-11-08 08:07:08 -08:00
fabrics.c nvme-fabrics: parse options 'keyring' and 'tls_key' 2023-10-11 10:29:58 -07:00
fabrics.h nvme-fabrics: parse options 'keyring' and 'tls_key' 2023-10-11 10:29:58 -07:00
fault_inject.c nvme: fix parameter check in nvme_fault_inject_init() 2023-07-12 08:48:33 -07:00
fc.c nvme: start keep-alive after admin queue setup 2023-11-06 09:16:10 -08:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme: host: hwmon: constify pointers to hwmon_channel_info 2023-08-21 12:54:02 -07:00
ioctl.c nvme: fix error-handling for io_uring nvme-passthrough 2023-11-06 08:09:31 -08:00
Kconfig nvme: common: make keyring and auth separate modules 2023-11-07 10:05:15 -08:00
Makefile nvme: rework NVME_AUTH Kconfig selection 2023-10-12 08:04:49 -07:00
multipath.c nvme fixes for Linux 6.5 2023-06-30 14:04:08 -06:00
nvme.h nvme: rework NVME_AUTH Kconfig selection 2023-10-12 08:04:49 -07:00
pci.c for-6.7/block-2023-10-30 2023-11-01 12:30:07 -10:00
pr.c nvme: Add pr_ops read_reservation support 2023-04-11 21:55:36 -04:00
rdma.c nvme-rdma: do not try to stop unallocated queues 2023-10-05 09:37:41 -07:00
sysfs.c nvme: rework NVME_AUTH Kconfig selection 2023-10-12 08:04:49 -07:00
tcp.c nvme-tcp: avoid open-coding nvme_tcp_teardown_admin_queue() 2023-11-06 09:00:13 -08:00
trace.c nvme: implement In-Band authentication 2022-08-02 17:14:49 -06:00
trace.h nvme: fix async event trace event 2023-04-13 08:59:04 +02:00
zns.c scsi: nvme: zns: Set zone limits before revalidating zones 2023-07-05 21:58:10 -04:00