########################
function usage {
- echo "Usage: $0 [-m] [-q] <kernel version>."
+ echo "Usage: $0 [-q] [-s] [-m] <kernel version>, where: "
+ echo " -q - add qla2x00t driver"
+ echo " -s - add srpt driver"
+ echo " -m - add mpt target driver"
}
# Convert an existing patch.
# 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."
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
#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"
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
--- /dev/null
+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"
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
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
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
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
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.
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
--- /dev/null
+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/