Re: scsi: ibmvfc: Add Kconfig dependency on NVME_FC to prevent link failure

Venkat Rao Bagalkote <[email protected]>
Newsgroups gmane.linux.ports.ppc.embedded
Message-ID <afd6fdc7-0fae-4fcf-b30a-a69294d26576__5677.24354784644$1788338458$gmane$org@linux.ibm.com>
On 02/09/26 1:55 pm, pavrampu wrote:
> Hi,
>
> I am seeing below build failure with latest linux-next repo.
>
> Description:
>
> Building the kernel with CONFIG_SCSI_IBMVFC=y and CONFIG_NVME_FC=m 
> results in a link failure when building vmlinux:
>
> Build failure logs:
>
> ld: drivers/scsi/ibmvscsi/ibmvfc-nvme.o: in function 
> `ibmvfc_nvme_register_remoteport':
> ibmvfc-nvme.c:488: undefined reference to `nvme_fc_register_remoteport'
> ld: drivers/scsi/ibmvscsi/ibmvfc-nvme.o: in function 
> `ibmvfc_nvme_unregister_remoteport':
> ibmvfc-nvme.c:515: undefined reference to `nvme_fc_unregister_remoteport'
> ld: drivers/scsi/ibmvscsi/ibmvfc-nvme.o: in function 
> `ibmvfc_nvme_register':
> ibmvfc-nvme.c:536: undefined reference to `nvme_fc_register_localport'
> ld: drivers/scsi/ibmvscsi/ibmvfc-nvme.o: in function 
> `ibmvfc_nvme_unregister':
> ibmvfc-nvme.c:565: undefined reference to `nvme_fc_unregister_localport'
> ld: drivers/scsi/ibmvscsi/ibmvfc-nvme.o: in function 
> `ibmvfc_nvme_unregister':
> ibmvfc-nvme.c:565: undefined reference to `nvme_fc_unregister_localport'
> ld: drivers/scsi/ibmvscsi/ibmvfc-core.c:6798: undefined reference to 
> `nvme_fc_rescan_remoteport'


Below simple check in Kconfig fixes the build failure.

If this is acceptable, then I will send a formal patch.

# git diff
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 4a2af0f702e1..6612d5d445e2 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -753,6 +753,7 @@ config SCSI_IBMVFC
         tristate "IBM Virtual FC support"
         depends on PPC_PSERIES && SCSI
         depends on SCSI_FC_ATTRS
+      depends on NVME_FC || NVME_FC=n
         help
           This is the IBM POWER Virtual FC Client


Regards,

Venkat.

>
> If you happen to fix this, please add below tag.
>
> Reported-by: Pavithra <[email protected]>
>
> Thanks,
> Pavithra
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.