diff --git a/iscsi-scst/kernel/Kconfig b/iscsi-scst/kernel/Kconfig index 7c5ee221a..9b973ea25 100644 --- a/iscsi-scst/kernel/Kconfig +++ b/iscsi-scst/kernel/Kconfig @@ -23,3 +23,5 @@ config SCST_ISCSI_DEBUG_DIGEST_FAILURES iSCSI initiator that is talking to SCST. If unsure, say "N". + +source "drivers/scst/iscsi-scst/isert-scst/Kconfig" diff --git a/iscsi-scst/kernel/Makefile.in-kernel b/iscsi-scst/kernel/Makefile.in-kernel index 003cda418..4cedcb11f 100644 --- a/iscsi-scst/kernel/Makefile.in-kernel +++ b/iscsi-scst/kernel/Makefile.in-kernel @@ -1,4 +1,4 @@ iscsi-scst-y := iscsi.o nthread.o config.o digest.o \ - conn.o session.o target.o event.o param.o + conn.o session.o target.o event.o param.o iscsit_transport.o -obj-$(CONFIG_SCST_ISCSI) += iscsi-scst.o +obj-$(CONFIG_SCST_ISCSI) += iscsi-scst.o isert-scst/ diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 359541c97..7fffc6a41 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -17,10 +17,13 @@ #include #include #include - +#ifdef INSIDE_KERNEL_TREE +#include +#else +#include "iscsit_transport.h" +#endif #include "iscsi.h" #include "digest.h" -#include "iscsit_transport.h" #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) #if defined(CONFIG_LOCKDEP) && !defined(CONFIG_SCST_PROC) diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index cdd7c8314..3cfd136f1 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -23,10 +23,13 @@ #include #include #include - +#ifdef INSIDE_KERNEL_TREE +#include +#else +#include "iscsit_transport.h" +#endif #include "iscsi.h" #include "digest.h" -#include "iscsit_transport.h" #ifndef GENERATING_UPSTREAM_PATCH #if !defined(CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION) diff --git a/iscsi-scst/kernel/iscsi.h b/iscsi-scst/kernel/iscsi.h index 84aefeb23..908068bd0 100644 --- a/iscsi-scst/kernel/iscsi.h +++ b/iscsi-scst/kernel/iscsi.h @@ -26,13 +26,14 @@ #ifdef INSIDE_KERNEL_TREE #include #include +#include #else #include #include "iscsi_scst.h" +#include "iscsit_transport.h" #endif #include "iscsi_hdr.h" #include "iscsi_dbg.h" -#include "iscsit_transport.h" #define iscsi_sense_crc_error ABORTED_COMMAND, 0x47, 0x05 #define iscsi_sense_unexpected_unsolicited_data ABORTED_COMMAND, 0x0C, 0x0C diff --git a/iscsi-scst/kernel/iscsit_transport.c b/iscsi-scst/kernel/iscsit_transport.c index 5e3c44ca2..35cf66ba6 100644 --- a/iscsi-scst/kernel/iscsit_transport.c +++ b/iscsi-scst/kernel/iscsit_transport.c @@ -1,6 +1,10 @@ #include +#ifdef INSIDE_KERNEL_TREE +#include +#else #include "iscsit_transport.h" +#endif #include "iscsi.h" static LIST_HEAD(transport_list); diff --git a/iscsi-scst/kernel/isert-scst/Kconfig b/iscsi-scst/kernel/isert-scst/Kconfig index 99ff7a97f..170ab0b0a 100644 --- a/iscsi-scst/kernel/isert-scst/Kconfig +++ b/iscsi-scst/kernel/isert-scst/Kconfig @@ -1,8 +1,9 @@ config SCST_ISER - tristate "ISCSI Target" + tristate "iSER Target Driver" depends on SCST && SCST_ISCSI default SCST help ISER target driver for SCST framework. The iSCSI iSER extension has been defined in RFC 5046. + If unsure, say "N". diff --git a/iscsi-scst/kernel/isert-scst/isert.c b/iscsi-scst/kernel/isert-scst/isert.c index 21fd9658a..40c50acfd 100644 --- a/iscsi-scst/kernel/isert-scst/isert.c +++ b/iscsi-scst/kernel/isert-scst/isert.c @@ -37,9 +37,13 @@ #include #include +#ifdef INSIDE_KERNEL_TREE +#include +#else +#include "iscsit_transport.h" +#endif #include "isert.h" #include "isert_dbg.h" -#include "iscsit_transport.h" #include "iser_datamover.h" #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index 4dea0cf55..e89d4d405 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -20,10 +20,13 @@ #include #include #include - +#ifdef INSIDE_KERNEL_TREE +#include +#else +#include "iscsit_transport.h" +#endif #include "iscsi.h" #include "digest.h" -#include "iscsit_transport.h" /* Read data states */ enum rx_state { diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index 23135edd8..d4a05b71b 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -462,7 +462,7 @@ do "iscsi-scst/include/iscsi_scst_itf_ver.h") ;; "iscsi-scst/include/iscsit_transport.h") - add_file "${f}" "drivers/scst/iscsi-scst/${f#iscsi-scst/include/}" + add_file "${f}" "include/scst/${f#iscsi-scst/include/}" ;; *) add_file "${f}" "include/scst/${f#iscsi-scst/include/}" @@ -484,8 +484,10 @@ done for f in $(ls iscsi-scst/kernel/isert-scst/*.[ch] 2>/dev/null) do - add_file "${f}" "drivers/scst/iscsi-scst/${f#iscsi-scst/kernel/isert-scst/}" + add_file "${f}" "drivers/scst/iscsi-scst/isert-scst/${f#iscsi-scst/kernel/isert-scst/}" done +add_file "iscsi-scst/kernel/isert-scst/Makefile.in-kernel" "drivers/scst/iscsi-scst/isert-scst/Makefile" +add_file "iscsi-scst/kernel/isert-scst/Kconfig" "drivers/scst/iscsi-scst/isert-scst/Kconfig" ) \ | process_patch "iscsi-scst.diff"