Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932960AbdCVCY4 (ORCPT ); Tue, 21 Mar 2017 22:24:56 -0400 Received: from mail-qk0-f170.google.com ([209.85.220.170]:36603 "EHLO mail-qk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757691AbdCVCYy (ORCPT ); Tue, 21 Mar 2017 22:24:54 -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> Cc: Hannes Reinecke , Finn Thain , Johannes Thumshirn , James Smart , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org From: James Smart Message-ID: <2d13017a-0342-c22a-5944-991a4b21f053@broadcom.com> Date: Tue, 21 Mar 2017 19:23:52 -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: <20170321131017.2207105-1-arnd@arndb.de> 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: 1455 Lines: 42 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