[PATCH] scsi: esp_scsi: limit build to builtin only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When CONFIG_SCSI=m and CONFIG_JAZZ_ESP=y, esp_scsi.c cannot reference
the modular SCSI subsytem symbols (this is a partial list):

   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `esp_setsync':
   esp_scsi.c:(.text+0xc04): undefined reference to `spi_display_xfer_agreement'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `scsi_esp_register':
   (.text+0xdec): undefined reference to `scsi_add_host_with_dma'
   mips64-linux-ld: (.text+0xe0c): undefined reference to `scsi_scan_host'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `scsi_esp_unregister':
   (.text+0xf70): undefined reference to `scsi_remove_host'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `esp_set_offset':
   esp_scsi.c:(.text+0xfa8): undefined reference to `scsi_is_host_device'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `esp_slave_configure':
   esp_scsi.c:(.text+0x10bc): undefined reference to `scsi_change_queue_depth'
   mips64-linux-ld: esp_scsi.c:(.text+0x10e8): undefined reference to `spi_dv_device'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `esp_data_bytes_sent':
   esp_scsi.c:(.text+0x15b4): undefined reference to `scsi_kmap_atomic_sg'
   mips64-linux-ld: esp_scsi.c:(.text+0x15cc): undefined reference to `scsi_kunmap_atomic_sg'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `esp_reset_cleanup':
   esp_scsi.c:(.text+0x192c): undefined reference to `scsi_done'
   mips64-linux-ld: esp_scsi.c:(.text+0x1ac0): undefined reference to `scsi_dma_unmap'
   mips64-linux-ld: esp_scsi.c:(.text+0x1b2c): undefined reference to `__starget_for_each_device'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `esp_maybe_execute_command.part.0':
   esp_scsi.c:(.text+0x2108): undefined reference to `spi_populate_tag_msg'
   mips64-linux-ld: esp_scsi.c:(.text+0x2350): undefined reference to `scsi_dma_map'
   mips64-linux-ld: esp_scsi.c:(.text+0x2488): undefined reference to `spi_populate_sync_msg'
   mips64-linux-ld: esp_scsi.c:(.text+0x2798): undefined reference to `spi_populate_width_msg'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `esp_reconnect':
   esp_scsi.c:(.text+0x3010): undefined reference to `__scsi_device_lookup_by_target'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `esp_process_event':
   esp_scsi.c:(.text+0x3f08): undefined reference to `scsi_track_queue_full'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `esp_exit':
   esp_scsi.c:(.exit.text+0x4): undefined reference to `spi_release_transport'
   mips64-linux-ld: drivers/scsi/esp_scsi.o: in function `esp_init':
   esp_scsi.c:(.init.text+0xc): undefined reference to `spi_attach_transport'
   mips64-linux-ld: drivers/scsi/jazz_esp.o: in function `esp_jazz_remove':
   jazz_esp.c:(.text+0x98): undefined reference to `scsi_host_put'
   mips64-linux-ld: drivers/scsi/jazz_esp.o: in function `esp_jazz_probe':
   jazz_esp.c:(.text+0x1e4): undefined reference to `scsi_host_alloc'

Since JAZZ_ESP is a bool Kconfig symbol, make the driver only available
to be built when CONFIG_SCSI=y to eliminate the build errors.

Fixes: f8ab27d96494 ("scsi: esp_scsi: Call scsi_done() directly")
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Cc: Bart Van Assche <bvanassche@xxxxxxx>
Cc: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: "James E.J. Bottomley" <jejb@xxxxxxxxxxxxx>
---
 drivers/scsi/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20211125.orig/drivers/scsi/Kconfig
+++ linux-next-20211125/drivers/scsi/Kconfig
@@ -1296,7 +1296,7 @@ source "drivers/scsi/arm/Kconfig"
 
 config JAZZ_ESP
 	bool "MIPS JAZZ FAS216 SCSI support"
-	depends on MACH_JAZZ && SCSI
+	depends on MACH_JAZZ && SCSI=y
 	select SCSI_SPI_ATTRS
 	help
 	  This is the driver for the onboard SCSI host adapter of MIPS Magnum



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux