From bd660a88d5ec7ae3a00476f7e63f5bf25da5f5ca Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Thu, 27 May 2010 12:58:24 +0000 Subject: [PATCH 22/23] [TCM]: Add Kbuild and Kconfig and update drivers/ Add TCM Kbuild and Kconfig files and update drivers/ to pick up drivers/target Signed-off-by: Nicholas A. Bellinger --- drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/target/Kbuild | 51 ++++++++++++++++++++++++++++++++++++++++++++ drivers/target/Kconfig | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 0 deletions(-) create mode 100644 drivers/target/Kbuild create mode 100644 drivers/target/Kconfig diff --git a/drivers/Kconfig b/drivers/Kconfig index a2b902f..3002329 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -26,6 +26,8 @@ source "drivers/ata/Kconfig" source "drivers/md/Kconfig" +source "drivers/target/Kconfig" + source "drivers/message/fusion/Kconfig" source "drivers/firewire/Kconfig" diff --git a/drivers/Makefile b/drivers/Makefile index f42a030..73aaedd 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -44,6 +44,7 @@ obj-y += macintosh/ obj-$(CONFIG_IDE) += ide/ obj-$(CONFIG_SCSI) += scsi/ obj-$(CONFIG_ATA) += ata/ +obj-$(CONFIG_TARGET_CORE) += target/ obj-$(CONFIG_MTD) += mtd/ obj-$(CONFIG_SPI) += spi/ obj-y += net/ diff --git a/drivers/target/Kbuild b/drivers/target/Kbuild new file mode 100644 index 0000000..5dced95 --- /dev/null +++ b/drivers/target/Kbuild @@ -0,0 +1,51 @@ +EXTRA_CFLAGS += -I$(srctree)/drivers/target/ -I$(srctree)/drivers/scsi/ + +target_core_mod-y := target_core_configfs.o \ + target_core_device.o \ + target_core_fabric_configfs.o \ + target_core_fabric_lib.o \ + target_core_hba.o \ + target_core_plugin.o \ + target_core_pr.o \ + target_core_alua.o \ + target_core_scdb.o \ + target_core_seobj.o \ + target_core_tmr.o \ + target_core_tpg.o \ + target_core_transport.o \ + target_core_ua.o + +ifdef CONFIG_TCM_IBLOCK +target_core_mod-y += target_core_iblock.o +EXTRA_CFLAGS += -DPYX_IBLOCK +endif + +ifdef CONFIG_TCM_PSCSI +target_core_mod-y += target_core_pscsi.o +EXTRA_CFLAGS += -DPARALLEL_SCSI +endif + +ifdef CONFIG_TCM_RAMDISK +target_core_mod-y += target_core_rd.o +EXTRA_CFLAGS += -DPYX_RAMDISK +endif + +ifdef CONFIG_TCM_FILEIO +target_core_mod-y += target_core_file.o +EXTRA_CFLAGS += -DPYX_FILEIO +endif + +ifdef CONFIG_TCM_SNMP +target_core_mod-y += target_core_mib.o +EXTRA_CFLAGS += -DSNMP_SUPPORT +endif + +ifdef CONFIG_TCM_PSCSI_VPD_PAGE_CHECK +EXTRA_CFLAGS += -DLINUX_VPD_PAGE_CHECK +endif + +ifdef CONFIG_TCM_DEBUG_DEV +EXTRA_CFLAGS += -DDEBUG_DEV +endif + +obj-$(CONFIG_TARGET_CORE) += target_core_mod.o diff --git a/drivers/target/Kconfig b/drivers/target/Kconfig new file mode 100644 index 0000000..4ca963a --- /dev/null +++ b/drivers/target/Kconfig @@ -0,0 +1,55 @@ +config TARGET_CORE + tristate "Generic Target Core Mod (TCM) and ConfigFS Infrastructure" + select CONFIGFS_FS + default m + ---help--- + Say Y or M here to enable the TCM Storage Engine and ConfigFS enabled control path for target_core_mod + +config TCM_IBLOCK + tristate "TCM/IBLOCK Subsystem Plugin for Linux/BLOCK" + depends on TARGET_CORE + default y + ---help--- + Say Y here to enable the TCM/IBLOCK subsystem plugin for non-buffered access to Linux/Block devices using BIO in TCM + +config TCM_PSCSI + tristate "TCM/pSCSI Subsystem Plugin for Linux/SCSI" + depends on TARGET_CORE + default y + ---help--- + Say Y here to enable the TCM/pSCSI subsystem plugin for non-buffered passthrough access to Linux/SCSI devices in TCM + +config TCM_PSCSI_VPD_PAGE_CHECK + tristate "TCM/pSCSI EVPD Page Emulation for Linux/SCSI" + depends on TARGET_CORE && TCM_PSCSI + default y + ---help--- + Say Y here to enable the TCM/pSCSI EVPD emulation that is required to register emulated SCSI LUNs on some non Linux OSes when using the Linux/SCSI passthrough for certain devices. + +config TCM_FILEIO + tristate "TCM/FILEIO Subsystem Plugin for Linux/VFS" + depends on TARGET_CORE + default y + ---help--- + Say Y here to enable the TCM/FILEIO subsystem plugin for buffered access to Linux/VFS files or block devices in TCM + +config TCM_RAMDISK + tristate "TCM/RAMDISK Subsystem Plugin" + depends on TARGET_CORE + default y + ---help--- + Say Y here to enable the TCM/RAMDISK subsystem plugins for internal struct page ramdisk device access for performance testing and debugging + +config TCM_SNMP + tristate "TCM SCSI MIBs" + depends on TARGET_CORE && PROC_FS + default y + ---help--- + Say Y here to enable the SCSI MIBs via procfs for TCM + +config TCM_DEBUG_DEV + tristate "TCM Debug device code" + depends on TARGET_CORE + default n + ---help--- + Say Y here to enable the TCM Debug device code -- 1.7.1