]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: lpfc: fix linking against modular NVMe support
authorArnd Bergmann <arnd@arndb.de>
Fri, 21 Jul 2017 20:53:46 +0000 (22:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 15:33:49 +0000 (08:33 -0700)
commit cd069bb9f9ff13b23492fda6ccdb458ac4f641ca upstream.

When LPFC is built-in but NVMe is a loadable module, we fail to link the
kernel:

drivers/scsi/built-in.o: In function `lpfc_nvme_create_localport':
(.text+0x156a82): undefined reference to `nvme_fc_register_localport'
drivers/scsi/built-in.o: In function `lpfc_nvme_destroy_localport':
(.text+0x156eaa): undefined reference to `nvme_fc_unregister_remoteport'

We can avoid this either by forcing lpfc to be a module, or by disabling
NVMe support in this case. This implements the former.

Fixes: 7d7080335f8d ("scsi: lpfc: Finalize Kconfig options for nvme")
Link: https://patchwork.kernel.org/patch/9636569/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/Kconfig

index 3c52867dfe28e33b04f85858dfdb9285eef11ba2..d145e0d9022755d476f8f48c22ea9c3a62377e28 100644 (file)
@@ -1241,6 +1241,8 @@ config SCSI_LPFC
        tristate "Emulex LightPulse Fibre Channel Support"
        depends on PCI && SCSI
        depends on SCSI_FC_ATTRS
+       depends on NVME_TARGET_FC || NVME_TARGET_FC=n
+       depends on NVME_FC || NVME_FC=n
        select CRC_T10DIF
        ---help---
           This lpfc driver supports the Emulex LightPulse