Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758585AbdCVCZl (ORCPT ); Tue, 21 Mar 2017 22:25:41 -0400 Received: from mail-qk0-f180.google.com ([209.85.220.180]:34221 "EHLO mail-qk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756711AbdCVCZk (ORCPT ); Tue, 21 Mar 2017 22:25:40 -0400 Subject: Re: [PATCH] scsi: lpfc: fix linking against modular NVMe support To: Arnd Bergmann , "James E.J. Bottomley" , "Martin K. Petersen" References: <20170321131017.2207105-1-arnd@arndb.de> <2d13017a-0342-c22a-5944-991a4b21f053@broadcom.com> Cc: Hannes Reinecke , Finn Thain , Johannes Thumshirn , James Smart , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org From: James Smart Message-ID: <79d9052f-c55b-b9a8-d5ae-a66b00c2f8e7@broadcom.com> Date: Tue, 21 Mar 2017 19:25:22 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <2d13017a-0342-c22a-5944-991a4b21f053@broadcom.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1772 Lines: 52 Note: the patch I referenced (http://www.spinics.net/lists/linux-scsi/msg106102.html) replaced the one I think you referenced below (http://www.spinics.net/lists/linux-scsi/msg106024.html) -- james On 3/21/2017 7:23 PM, James Smart wrote: > Arnd, > > All of the build issues, including building as modules, should have > been resolved by the following patch: > http://www.spinics.net/lists/linux-scsi/msg106102.html > > Am I missing something ? > > -- james > > > On 3/21/2017 6:09 AM, Arnd Bergmann wrote: >> 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") >> Signed-off-by: Arnd Bergmann >> --- >> drivers/scsi/Kconfig | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig >> index 3c52867dfe28..d145e0d90227 100644 >> --- a/drivers/scsi/Kconfig >> +++ b/drivers/scsi/Kconfig >> @@ -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 >