From 9004478071931f9577ccd17a304c224da52ccb6a Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 24 Jul 2008 10:38:51 +0000 Subject: [PATCH] Minor the kernel patch preparations fixes git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@476 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/generate-kernel-patch | 37 +++++++++++-------- .../Kconfig.drivers.Linux-2.6.26.patch | 12 ++++++ scst/kernel/in-tree/Kconfig.scst | 14 +++---- .../Makefile.drivers.Linux-2.6.26.patch | 11 ++++++ 4 files changed, 52 insertions(+), 22 deletions(-) create mode 100644 scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.26.patch create mode 100644 scst/kernel/in-tree/Makefile.drivers.Linux-2.6.26.patch diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index ef83e25db..33be05ff4 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -24,7 +24,10 @@ ######################## function usage { - echo "Usage: $0 [-m] [-q] ." + echo "Usage: $0 [-q] [-s] [-m] , where: " + echo " -q - add qla2x00t driver" + echo " -s - add srpt driver" + echo " -m - add mpt target driver" } # Convert an existing patch. @@ -77,8 +80,9 @@ EOF # Argument verification # ######################### -mpt_scst="false" qla2x00t="false" +srpt="false" +mpt_scst="false" if [ ! -e scst -o ! -e iscsi-scst -o ! -e srpt ]; then echo "Please run this script from inside the SCST subversion source tree." @@ -89,8 +93,9 @@ set -- $(/usr/bin/getopt mq "$@") while [ "$1" != "${1#-}" ] do case "$1" in - '-m') mpt_scst="true"; shift;; '-q') qla2x00t="true"; shift;; + '-s') srptt="true"; shift;; + '-m') mpt_scst="true"; shift;; '--') shift;; *) usage; exit 1;; esac @@ -212,8 +217,8 @@ if [ "${qla2x00t}" = "true" ]; then #add_file "qla2x00t/qla2x00-target/Kconfig" \ # "drivers/scst/qla2x00-target/Kconfig" - add_file "qla2x00t/qla2x_tgt_def.h" \ - "drivers/scst/qla2x00-target/qla2x_tgt_def.h" + #add_file "qla2x00t/qla2x_tgt_def.h" \ + # "drivers/scst/qla2x00-target/qla2x_tgt_def.h" add_file "qla2x00t/qla2x00-target/README" \ "Documentation/scst/README.qla2x00t" @@ -225,26 +230,28 @@ if [ "${qla2x00t}" = "true" ]; then fi - # Directory drivers/infiniband/ulp/srpt/ -add_patch "srpt/src/Kconfig.infiniband.Linux-${kernel_version}.patch" \ +if [ "$srpt" = "true" ]; then + + add_patch "srpt/src/Kconfig.infiniband.Linux-${kernel_version}.patch" \ "drivers/infiniband/Kconfig" -add_patch "srpt/src/Makefile.infiniband.Linux-${kernel_version}.patch" \ + add_patch "srpt/src/Makefile.infiniband.Linux-${kernel_version}.patch" \ "drivers/infiniband/Makefile" -add_file "srpt/src/Kconfig" "drivers/infiniband/ulp/srpt/Kconfig" + add_file "srpt/src/Kconfig" "drivers/infiniband/ulp/srpt/Kconfig" -add_file "srpt/src/Makefile.in_kernel" "drivers/infiniband/ulp/srpt/Makefile" + add_file "srpt/src/Makefile.in_kernel" "drivers/infiniband/ulp/srpt/Makefile" -add_file "srpt/README" "Documentation/scst/README.srpt" + add_file "srpt/README" "Documentation/scst/README.srpt" -for f in srpt/src/*.[ch] -do - add_file "${f}" "drivers/infiniband/ulp/srpt/${f#srpt/src/}" -done + for f in srpt/src/*.[ch] + do + add_file "${f}" "drivers/infiniband/ulp/srpt/${f#srpt/src/}" + done +fi # Directory drivers/message/fusion/mpt_scst diff --git a/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.26.patch b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.26.patch new file mode 100644 index 000000000..c259d7af0 --- /dev/null +++ b/scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.26.patch @@ -0,0 +1,12 @@ +diff -upkr -X linux-2.6.26/Documentation/dontdiff linux-2.6.26/drivers/Kconfig linux-2.6.26/drivers/Kconfig +--- linux-2.6.26/drivers/Kconfig 2008-07-14 01:51:29.000000000 +0400 ++++ linux-2.6.26/drivers/Kconfig 2008-07-24 14:14:46.000000000 +0400 +@@ -24,6 +24,8 @@ source "drivers/ide/Kconfig" + + source "drivers/scsi/Kconfig" + ++source "drivers/scst/Kconfig" ++ + source "drivers/ata/Kconfig" + + source "drivers/md/Kconfig" diff --git a/scst/kernel/in-tree/Kconfig.scst b/scst/kernel/in-tree/Kconfig.scst index 09d58f166..5ba6b76b3 100644 --- a/scst/kernel/in-tree/Kconfig.scst +++ b/scst/kernel/in-tree/Kconfig.scst @@ -112,7 +112,7 @@ config SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ message in the kernel log. If unsure, leave this option disabled. config SCST_ABORT_CONSIDER_FINISHED_TASKS_AS_NOT_EXISTING - bool "Send back UNKNOWN TASK when an already finished task is aborted." + bool "Send back UNKNOWN TASK when an already finished task is aborted" help Controls which response is sent by SCST to the initiator in case the initiator attempts to abort (ABORT TASK) an already finished @@ -155,13 +155,13 @@ config SCST_TRACING If unsure, leave this option disabled. config SCST_DEBUG - bool "Debugging support." + bool "Debugging support" help Enables support for debugging SCST. This may be helpful for SCST developers. If unsure, leave this option disabled. config SCST_DEBUG_OOM - bool "Out-of-memory debugging support." + bool "Out-of-memory debugging support" help Let SCST's internal memory allocation function (scst_alloc_sg_entries()) fail about once in every 10000 calls, at @@ -171,7 +171,7 @@ config SCST_DEBUG_OOM option disabled. config SCST_DEBUG_RETRY - bool "SCSI command retry debugging support." + bool "SCSI command retry debugging support" help Let SCST's internal SCSI command transfer function (scst_rdy_to_xfer()) fail about once in every 100 calls. This allows @@ -180,7 +180,7 @@ config SCST_DEBUG_RETRY option disabled. config SCST_DEBUG_SN - bool "SCSI sequence number debugging support." + bool "SCSI sequence number debugging support" help Allows to test SCSI command ordering via sequence numbers by randomly changing the type of SCSI commands into @@ -190,7 +190,7 @@ config SCST_DEBUG_SN option disabled. config SCST_DEBUG_TM - bool "Task management debugging support." + bool "Task management debugging support" depends on SCST_DEBUG help Enables support for debugging of SCST's task management functions. @@ -201,7 +201,7 @@ config SCST_DEBUG_TM disabled. config SCST_TM_DBG_GO_OFFLINE - bool "Let devices become completely unresponsive." + bool "Let devices become completely unresponsive" depends on SCST_DEBUG_TM help Enable this option if you want that the device eventually becomes diff --git a/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.26.patch b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.26.patch new file mode 100644 index 000000000..1f26ba38e --- /dev/null +++ b/scst/kernel/in-tree/Makefile.drivers.Linux-2.6.26.patch @@ -0,0 +1,11 @@ +diff -upkr -X linux-2.6.26/Documentation/dontdiff linux-2.6.26/drivers/Makefile linux-2.6.26/drivers/Makefile +--- linux-2.6.26/drivers/Makefile 2008-07-14 01:51:29.000000000 +0400 ++++ linux-2.6.26/drivers/Makefile 2008-07-24 14:15:29.000000000 +0400 +@@ -36,6 +36,7 @@ obj-$(CONFIG_ATM) += atm/ + obj-y += macintosh/ + obj-$(CONFIG_IDE) += ide/ + obj-$(CONFIG_SCSI) += scsi/ ++obj-$(CONFIG_SCST) += scst/ + obj-$(CONFIG_ATA) += ata/ + obj-$(CONFIG_FUSION) += message/ + obj-$(CONFIG_FIREWIRE) += firewire/