From e62155683e7f40b44986700e7dc7a800b30f6c58 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 12 Jun 2015 15:29:56 +0000 Subject: [PATCH 1/3] iscsi-scst: Fix a compiler warning for kernel versions >= 3.19 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6310 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 309e2d4ac..359541c97 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -930,7 +930,7 @@ int iscsi_conn_alloc(struct iscsi_session *session, conn->transport = t; /* Changing it, change ISCSI_CONN_IOV_MAX as well !! */ - conn->read_iov = (struct iovec *)get_zeroed_page(GFP_KERNEL); + conn->read_iov = (void *)get_zeroed_page(GFP_KERNEL); if (conn->read_iov == NULL) { res = -ENOMEM; goto out_err_free_conn; From a2a22c0b955d5e871d29e40b3262086d14e759b5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 12 Jun 2015 15:31:05 +0000 Subject: [PATCH 2/3] isert-scst: Shorten the compiler include path git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6311 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/Makefile | 2 +- iscsi-scst/kernel/isert-scst/iser_datamover.h | 2 +- iscsi-scst/kernel/isert-scst/iser_hdr.h | 2 +- iscsi-scst/kernel/isert-scst/iser_pdu.c | 2 +- iscsi-scst/kernel/isert-scst/isert.h | 3 +-- iscsi-scst/kernel/isert-scst/isert_login.c | 8 +------- 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/iscsi-scst/kernel/isert-scst/Makefile b/iscsi-scst/kernel/isert-scst/Makefile index b2a08e8c0..d5382a1f5 100644 --- a/iscsi-scst/kernel/isert-scst/Makefile +++ b/iscsi-scst/kernel/isert-scst/Makefile @@ -25,7 +25,7 @@ cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ enable-Wextra = $(shell uname_r="$$(uname -r)"; if [ "$${uname_r%.el5}" = "$${uname_r}" ]; then echo "$(1)"; fi) LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE) -EXTRA_CFLAGS += -I$(src)/../../include -I$(src)/../ -I$(SCST_INC_DIR) +EXTRA_CFLAGS += -I$(src)/../../include -I$(SCST_INC_DIR) EXTRA_CFLAGS += $(call enable-Wextra,-Wextra \ $(call cc-option,-Wno-old-style-declaration) \ -Wno-unused-parameter -Wno-missing-field-initializers) diff --git a/iscsi-scst/kernel/isert-scst/iser_datamover.h b/iscsi-scst/kernel/isert-scst/iser_datamover.h index 8beda2cde..9a41dc291 100644 --- a/iscsi-scst/kernel/isert-scst/iser_datamover.h +++ b/iscsi-scst/kernel/isert-scst/iser_datamover.h @@ -36,7 +36,7 @@ #ifndef __ISER_DATAMOVER_H__ #define __ISER_DATAMOVER_H__ -#include "iscsi.h" +#include "../iscsi.h" /* iscsi layer calling iser */ int isert_datamover_init(void); diff --git a/iscsi-scst/kernel/isert-scst/iser_hdr.h b/iscsi-scst/kernel/isert-scst/iser_hdr.h index 4cfd74a94..c996ad676 100644 --- a/iscsi-scst/kernel/isert-scst/iser_hdr.h +++ b/iscsi-scst/kernel/isert-scst/iser_hdr.h @@ -36,7 +36,7 @@ #ifndef __ISER_HDR_H__ #define __ISER_HDR_H__ -#include "iscsi.h" +#include "../iscsi.h" #define ISCSI_LOGIN_MAX_RDSL (8 * 1024) diff --git a/iscsi-scst/kernel/isert-scst/iser_pdu.c b/iscsi-scst/kernel/isert-scst/iser_pdu.c index ef4c60e28..667052048 100644 --- a/iscsi-scst/kernel/isert-scst/iser_pdu.c +++ b/iscsi-scst/kernel/isert-scst/iser_pdu.c @@ -38,7 +38,7 @@ #include #include "iser.h" -#include "iscsi.h" +#include "../iscsi.h" #include "iser_datamover.h" static inline int isert_pdu_rx_buf_init(struct isert_cmnd *isert_pdu, diff --git a/iscsi-scst/kernel/isert-scst/isert.h b/iscsi-scst/kernel/isert-scst/isert.h index 178b2284f..8dde1a70a 100644 --- a/iscsi-scst/kernel/isert-scst/isert.h +++ b/iscsi-scst/kernel/isert-scst/isert.h @@ -54,12 +54,11 @@ #ifdef INSIDE_KERNEL_TREE #include #include -#include #else #include "isert_scst.h" #include "iscsi_scst.h" -#include "iscsi.h" #endif +#include "../iscsi.h" #include "iser_hdr.h" diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c index a392679d3..3e32c6c33 100644 --- a/iscsi-scst/kernel/isert-scst/isert_login.c +++ b/iscsi-scst/kernel/isert-scst/isert_login.c @@ -40,13 +40,7 @@ #include #include #include - -#ifdef INSIDE_KERNEL_TREE -#include -#else -#include "iscsi.h" -#endif - +#include "../iscsi.h" #include "isert.h" #include "isert_dbg.h" #include "iser_datamover.h" From 0d9d6a6f57b039d1ea07c1975db20453efbfc91c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 12 Jun 2015 16:15:45 +0000 Subject: [PATCH 3/3] isert-scst: Fix in-tree build git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6312 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/Kconfig | 2 ++ iscsi-scst/kernel/Makefile.in-kernel | 4 ++-- iscsi-scst/kernel/conn.c | 7 +++++-- iscsi-scst/kernel/iscsi.c | 7 +++++-- iscsi-scst/kernel/iscsi.h | 3 ++- iscsi-scst/kernel/iscsit_transport.c | 4 ++++ iscsi-scst/kernel/isert-scst/Kconfig | 3 ++- iscsi-scst/kernel/isert-scst/isert.c | 6 +++++- iscsi-scst/kernel/nthread.c | 7 +++++-- scripts/generate-kernel-patch | 6 ++++-- 10 files changed, 36 insertions(+), 13 deletions(-) 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"