Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753974Ab0HBRma (ORCPT ); Mon, 2 Aug 2010 13:42:30 -0400 Received: from sabe.cs.wisc.edu ([128.105.6.20]:47887 "EHLO sabe.cs.wisc.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753537Ab0HBRm2 (ORCPT ); Mon, 2 Aug 2010 13:42:28 -0400 Message-ID: <4C570464.9010204@cs.wisc.edu> Date: Mon, 02 Aug 2010 12:46:12 -0500 From: Mike Christie User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Thunderbird/3.0.4 MIME-Version: 1.0 To: James Bottomley CC: Stephen Rothwell , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Jayamohan Kallickal , Randy Dunlap , linux-scsi Subject: Re: linux-next: build failure after merge of the final tree (scsi-post-merge tree related) References: <20100803024445.0bf7ec86.sfr@canb.auug.org.au> <20100803024701.b3dff69a.sfr@canb.auug.org.au> <1280768048.2843.242.camel@mulgrave.site> In-Reply-To: <1280768048.2843.242.camel@mulgrave.site> Content-Type: multipart/mixed; boundary="------------030405050406020507070002" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 52666 Lines: 744 This is a multi-part message in MIME format. --------------030405050406020507070002 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 08/02/2010 11:54 AM, James Bottomley wrote: > missing linux-scsi added to cc list. > > On Tue, 2010-08-03 at 02:47 +1000, Stephen Rothwell wrote: >> Hi all, >> >> On Tue, 3 Aug 2010 02:44:45 +1000 Stephen Rothwell wrote: >>> >>> After merging the final tree, today's linux-next build (powerpc allmodconfig) >>> failed like this: >>> >>> ERROR: ".iscsi_boot_destroy_kset" [drivers/scsi/be2iscsi/be2iscsi.ko] undefined! >>> ERROR: ".iscsi_boot_create_host_kset" [drivers/scsi/be2iscsi/be2iscsi.ko] undefined! >>> ERROR: ".iscsi_boot_create_target" [drivers/scsi/be2iscsi/be2iscsi.ko] undefined! >>> ERROR: ".iscsi_boot_create_initiator" [drivers/scsi/be2iscsi/be2iscsi.ko] undefined! >>> ERROR: ".iscsi_boot_create_ethernet" [drivers/scsi/be2iscsi/be2iscsi.ko] undefined! >>> >>> Caused by commit a33e2a708b2e83ee6111e45c8d3d49a112c3c887 ("[SCSI] >>> be2iscsi: Add support for iscsi boot"). For some reason, commit >>> ed94aa526655d915076dcdbbf4fc962b2a67fcb5 ("[SCSI] be2iscsi: select >>> ISCSI_BOOT_SYSFS") was not sufficient to make sure that >>> CONFIG_ISCSI_BOOT_SYSFS is defined for this build. >> >> It turns out that drivers/firmware/Kconfig is only included on x86, ia64 >> and blackfin. > > OK, we need to turn this around then and make be2iscsi only use iscsi > boot if it's enabled ... that's going to be some fun #ifdefing in the > driver. > I think my mistake was to put iscsi_boot_sysfs in drivers/firmware. The interface is generic and should be used on any arch and with anything (ibft or iscsi driver) that wants to export iscsi boot info. The attached patch moves iscsi_boot_sysfs to drivers/scsi. It was made over linux-next. I have only compile tested it. --------------030405050406020507070002 Content-Type: text/plain; name="0001-iscsi-boot-mv-iscsi_boot_sysfs-to-drivers-scsi.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-iscsi-boot-mv-iscsi_boot_sysfs-to-drivers-scsi.patch" RnJvbSA1M2JjYTQ1NzA3NzYxOGIyNjkxZTk0ZmIxZDEyMjEwNjViZDBmZmRkIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBNaWtlIENocmlzdGllIDxtY2hyaXN0aUByZWRoYXQu Y29tPgpEYXRlOiBNb24sIDIgQXVnIDIwMTAgMTI6MzA6NDkgLTA1MDAKU3ViamVjdDogW1BB VENIXSBpc2NzaSBib290OiBtdiBpc2NzaV9ib290X3N5c2ZzIHRvIGRyaXZlcnMvc2NzaQoK aXNjc2lfYm9vdF9zeXNmc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050406020507070002-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/