aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2010-12-23 12:48:47 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2010-12-23 12:48:47 +0000
commited94564ed61488a42c25d91fed88fd3429a95c57 (patch)
treeee7e06e8439f43e1ff1a09f0e202394bb87c0e1e
parent559de61b4b92c534a13b71f0dd50631e4f8f47c7 (diff)
downloadaports-ed94564ed61488a42c25d91fed88fd3429a95c57.tar.bz2
aports-ed94564ed61488a42c25d91fed88fd3429a95c57.tar.xz
testing/linux-scst: bump kernel version to 2.6.32.2 and SCST to 2.0.0 final
-rw-r--r--testing/linux-scst/APKBUILD29
-rw-r--r--testing/linux-scst/kernelconfig.x86_64161
-rw-r--r--testing/linux-scst/r8169-add-gro-support.patch52
-rw-r--r--testing/linux-scst/r8169-fix-rx-checksum-offload.patch62
-rw-r--r--testing/linux-scst/scst-2.6.36-2.0.0.patch (renamed from testing/linux-scst/scst-2.6.35-svn-3161.patch)2465
-rw-r--r--testing/linux-scst/unionfs-2.5.7_for_2.6.36.diff (renamed from testing/linux-scst/unionfs-2.5.7_for_2.6.35.8.patch)92
6 files changed, 1016 insertions, 1845 deletions
diff --git a/testing/linux-scst/APKBUILD b/testing/linux-scst/APKBUILD
index 6f494c17e9..ece8b82957 100644
--- a/testing/linux-scst/APKBUILD
+++ b/testing/linux-scst/APKBUILD
@@ -2,8 +2,8 @@
_flavor=scst
pkgname=linux-${_flavor}
-pkgver=2.6.35.9
-_kernver=2.6.35
+pkgver=2.6.36.2
+_kernver=2.6.36
pkgrel=0
pkgdesc="Linux kernel optimised for scst"
url="http://scst.sourceforge.net"
@@ -12,16 +12,12 @@ makedepends="perl installkernel bash"
options="!strip"
_config=${config:-kernelconfig.${CARCH}}
install=
-_scst_svn="3161"
source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
- 0004-arp-flush-arp-cache-on-device-change.patch
- r8169-fix-rx-checksum-offload.patch
- r8169-add-gro-support.patch
- setlocalversion.patch
kernelconfig.x86_64
- unionfs-2.5.7_for_2.6.35.8.patch
- scst-2.6.35-svn-3161.patch
+ scst-$_kernver-2.0.0.patch
+ unionfs-2.5.7_for_$_kernver.diff
+ 0004-arp-flush-arp-cache-on-device-change.patch
"
subpackages="$pkgname-dev linux-firmware:firmware"
arch="x86_64"
@@ -144,12 +140,9 @@ firmware() {
mv "$pkgdir"/lib/firmware "$subpkgdir"/lib/
}
-md5sums="091abeb4684ce03d1d936851618687b6 linux-2.6.35.tar.bz2
-eca407cf4872ad77ae23adc8242389c4 patch-2.6.35.9.bz2
-776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
-0ccecafd4123dcad0b0cd7787553d734 r8169-fix-rx-checksum-offload.patch
-139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch
-8c224ba0cdf0aa572c7eb50379435be4 setlocalversion.patch
-8b50f527b834f693e9cfbcabf29b04f3 kernelconfig.x86_64
-e4185c1bb1d88594c67eb154d0c06692 unionfs-2.5.7_for_2.6.35.8.patch
-f8aa57373ab14ece95ecdaa15840fa25 scst-2.6.35-svn-3161.patch"
+md5sums="61f3739a73afb6914cb007f37fb09b62 linux-2.6.36.tar.bz2
+4b01c5f9657a9587b262df5f8d784116 patch-2.6.36.2.bz2
+3d93fd576b38ac5f68ceac44c65df380 kernelconfig.x86_64
+28c61abeb4932f32c9c5d2f069312148 scst-2.6.36-2.0.0.patch
+fec281a4e03fed560ce309ad8fc5a592 unionfs-2.5.7_for_2.6.36.diff
+776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch"
diff --git a/testing/linux-scst/kernelconfig.x86_64 b/testing/linux-scst/kernelconfig.x86_64
index 6d9675b93a..9d877d166c 100644
--- a/testing/linux-scst/kernelconfig.x86_64
+++ b/testing/linux-scst/kernelconfig.x86_64
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.35.9
-# Mon Dec 20 14:49:00 2010
+# Linux kernel version: 2.6.36.2
+# Thu Dec 23 12:32:35 2010
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
@@ -10,7 +10,6 @@ CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
-CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
@@ -93,8 +92,6 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
# RCU Subsystem
#
CONFIG_TREE_RCU=y
-# CONFIG_TREE_PREEMPT_RCU is not set
-# CONFIG_TINY_RCU is not set
# CONFIG_RCU_TRACE is not set
CONFIG_RCU_FANOUT=32
# CONFIG_RCU_FANOUT_EXACT is not set
@@ -151,6 +148,7 @@ CONFIG_PROFILING=y
CONFIG_OPROFILE=m
# CONFIG_OPROFILE_EVENT_MULTIPLEX is not set
CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_IOREMAP_PROT=y
@@ -164,13 +162,12 @@ CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_HW_BREAKPOINT=y
CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
CONFIG_HAVE_USER_RETURN_NOTIFIER=y
+CONFIG_HAVE_PERF_EVENTS_NMI=y
#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
-CONFIG_SLOW_WORK=y
-# CONFIG_SLOW_WORK_DEBUG is not set
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
@@ -191,7 +188,6 @@ CONFIG_BLK_DEV_BSG=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_DEADLINE=m
CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
@@ -250,28 +246,7 @@ CONFIG_PARAVIRT=y
CONFIG_PARAVIRT_CLOCK=y
CONFIG_NO_BOOTMEM=y
# CONFIG_MEMTEST is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not set
@@ -327,8 +302,6 @@ CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_SPARSEMEM=y
CONFIG_HAVE_MEMORY_PRESENT=y
@@ -391,6 +364,7 @@ CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
# CONFIG_ACPI_POWER_METER is not set
CONFIG_ACPI_SYSFS_POWER=y
+CONFIG_ACPI_EC_DEBUGFS=m
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=m
@@ -413,6 +387,7 @@ CONFIG_ACPI_HED=m
CONFIG_ACPI_APEI=y
CONFIG_ACPI_APEI_GHES=m
CONFIG_ACPI_APEI_EINJ=m
+CONFIG_ACPI_APEI_ERST_DEBUG=m
# CONFIG_SFI is not set
#
@@ -450,7 +425,7 @@ CONFIG_X86_SPEEDSTEP_LIB=m
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_INTEL_IDLE=m
+# CONFIG_INTEL_IDLE is not set
#
# Memory power savings
@@ -578,13 +553,7 @@ CONFIG_TCP_CONG_LP=m
CONFIG_TCP_CONG_VENO=m
CONFIG_TCP_CONG_YEAH=m
CONFIG_TCP_CONG_ILLINOIS=m
-# CONFIG_DEFAULT_BIC is not set
CONFIG_DEFAULT_CUBIC=y
-# CONFIG_DEFAULT_HTCP is not set
-# CONFIG_DEFAULT_HYBLA is not set
-# CONFIG_DEFAULT_VEGAS is not set
-# CONFIG_DEFAULT_VENO is not set
-# CONFIG_DEFAULT_WESTWOOD is not set
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_TCP_MD5SIG=y
@@ -614,6 +583,7 @@ CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
CONFIG_IPV6_PIMSM_V2=y
CONFIG_NETLABEL=y
CONFIG_NETWORK_SECMARK=y
+# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y
@@ -626,7 +596,6 @@ CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NF_CONNTRACK=m
-CONFIG_NF_CT_ACCT=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_ZONES=y
@@ -657,12 +626,14 @@ CONFIG_NETFILTER_XT_CONNMARK=m
#
# Xtables targets
#
+CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
CONFIG_NETFILTER_XT_TARGET_CT=m
CONFIG_NETFILTER_XT_TARGET_DSCP=m
CONFIG_NETFILTER_XT_TARGET_HL=m
+CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
CONFIG_NETFILTER_XT_TARGET_LED=m
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
@@ -685,6 +656,7 @@ CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_CPU=m
CONFIG_NETFILTER_XT_MATCH_DCCP=m
CONFIG_NETFILTER_XT_MATCH_DSCP=m
CONFIG_NETFILTER_XT_MATCH_ESP=m
@@ -692,6 +664,7 @@ CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
CONFIG_NETFILTER_XT_MATCH_HELPER=m
CONFIG_NETFILTER_XT_MATCH_HL=m
CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
+CONFIG_NETFILTER_XT_MATCH_IPVS=m
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -956,6 +929,7 @@ CONFIG_NET_ACT_SKBEDIT=m
# CONFIG_NET_CLS_IND is not set
CONFIG_NET_SCH_FIFO=y
# CONFIG_DCB is not set
+CONFIG_DNS_RESOLVER=y
CONFIG_RPS=y
#
@@ -985,6 +959,7 @@ CONFIG_CAN_PLX_PCI=m
# CAN USB interfaces
#
# CONFIG_CAN_EMS_USB is not set
+CONFIG_CAN_ESD_USB2=m
# CONFIG_CAN_DEBUG_DEVICES is not set
CONFIG_IRDA=m
@@ -1044,7 +1019,6 @@ CONFIG_VIA_FIR=m
CONFIG_MCS_FIR=m
CONFIG_BT=m
CONFIG_BT_L2CAP=m
-# CONFIG_BT_L2CAP_EXT_FEATURES is not set
CONFIG_BT_SCO=m
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
@@ -1062,6 +1036,7 @@ CONFIG_BT_HCIBTSDIO=m
CONFIG_BT_HCIUART=m
CONFIG_BT_HCIUART_H4=y
CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_ATH3K is not set
CONFIG_BT_HCIUART_LL=y
CONFIG_BT_HCIBCM203X=m
CONFIG_BT_HCIBPA10X=m
@@ -1101,6 +1076,7 @@ CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_PID=y
CONFIG_MAC80211_RC_MINSTREL=y
+CONFIG_MAC80211_RC_MINSTREL_HT=y
CONFIG_MAC80211_RC_DEFAULT_PID=y
# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
CONFIG_MAC80211_RC_DEFAULT="pid"
@@ -1348,9 +1324,12 @@ CONFIG_CS5535_CLOCK_EVENT_SRC=m
CONFIG_HP_ILO=m
CONFIG_ISL29003=m
CONFIG_SENSORS_TSL2550=m
+CONFIG_SENSORS_BH1780=m
+CONFIG_HMC6352=m
CONFIG_DS1682=m
CONFIG_TI_DAC7512=m
CONFIG_VMWARE_BALLOON=m
+CONFIG_BMP085=m
CONFIG_C2PORT=m
CONFIG_C2PORT_DURAMAR_2150=m
@@ -1415,6 +1394,7 @@ CONFIG_SCSI_SRP_ATTRS=m
CONFIG_SCSI_SRP_TGT_ATTRS=y
CONFIG_SCSI_LOWLEVEL=y
CONFIG_ISCSI_TCP=m
+CONFIG_ISCSI_BOOT_SYSFS=m
CONFIG_SCSI_CXGB3_ISCSI=m
CONFIG_SCSI_BNX2_ISCSI=m
# CONFIG_BE2ISCSI is not set
@@ -1535,7 +1515,6 @@ CONFIG_SCST_TRACING=y
# CONFIG_SCST_DEBUG_RETRY is not set
# CONFIG_SCST_DEBUG_SN is not set
# CONFIG_SCST_MEASURE_LATENCY is not set
-CONFIG_FCST=m
CONFIG_SCST_ISCSI=m
# CONFIG_SCST_ISCSI_DEBUG_DIGEST_FAILURES is not set
CONFIG_SCST_SRPT=m
@@ -1643,8 +1622,6 @@ CONFIG_MD_RAID1=m
CONFIG_MD_RAID10=m
CONFIG_MD_RAID456=m
# CONFIG_MULTICORE_RAID456 is not set
-CONFIG_MD_RAID6_PQ=m
-# CONFIG_ASYNC_RAID6_TEST is not set
CONFIG_MD_MULTIPATH=m
CONFIG_MD_FAULTY=m
CONFIG_BLK_DEV_DM=m
@@ -1694,6 +1671,7 @@ CONFIG_IEEE1394_RAWIO=m
CONFIG_IEEE1394_VIDEO1394=m
CONFIG_IEEE1394_DV1394=m
# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+CONFIG_FIREWIRE_NOSY=m
CONFIG_I2O=m
CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
CONFIG_I2O_EXT_ADAPTEC=y
@@ -1853,6 +1831,8 @@ CONFIG_CHELSIO_T3_DEPENDS=y
CONFIG_CHELSIO_T3=m
CONFIG_CHELSIO_T4_DEPENDS=y
CONFIG_CHELSIO_T4=m
+CONFIG_CHELSIO_T4VF_DEPENDS=y
+CONFIG_CHELSIO_T4VF=m
CONFIG_ENIC=m
CONFIG_IXGBE=m
CONFIG_IXGBE_DCA=y
@@ -2005,6 +1985,7 @@ CONFIG_WL1251_SPI=m
CONFIG_WL1251_SDIO=m
CONFIG_WL1271=m
CONFIG_WL1271_SPI=m
+CONFIG_WL1271_SDIO=m
CONFIG_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG is not set
@@ -2095,6 +2076,9 @@ CONFIG_ATM_ENI=m
CONFIG_ATM_FIRESTREAM=m
CONFIG_ATM_ZATM=m
# CONFIG_ATM_ZATM_DEBUG is not set
+CONFIG_ATM_NICSTAR=m
+# CONFIG_ATM_NICSTAR_USE_SUNI is not set
+# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
CONFIG_ATM_IDT77252=m
# CONFIG_ATM_IDT77252_DEBUG is not set
# CONFIG_ATM_IDT77252_RCV_ALL is not set
@@ -2119,6 +2103,8 @@ CONFIG_IEEE802154_FAKEHARD=m
# CAIF transport drivers
#
CONFIG_CAIF_TTY=m
+CONFIG_CAIF_SPI_SLAVE=m
+# CONFIG_CAIF_SPI_SYNC is not set
CONFIG_FDDI=y
CONFIG_DEFXX=m
# CONFIG_DEFXX_MMIO is not set
@@ -2237,6 +2223,7 @@ CONFIG_KEYBOARD_TCA6416=m
CONFIG_KEYBOARD_MATRIX=m
CONFIG_KEYBOARD_LM8323=m
# CONFIG_KEYBOARD_MAX7359 is not set
+CONFIG_KEYBOARD_MCS=m
CONFIG_KEYBOARD_NEWTON=m
# CONFIG_KEYBOARD_OPENCORES is not set
CONFIG_KEYBOARD_STOWAWAY=m
@@ -2263,8 +2250,10 @@ CONFIG_MOUSE_SYNAPTICS_I2C=m
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ADS7846=m
CONFIG_TOUCHSCREEN_AD7877=m
-CONFIG_TOUCHSCREEN_AD7879_I2C=m
CONFIG_TOUCHSCREEN_AD7879=m
+CONFIG_TOUCHSCREEN_AD7879_I2C=m
+CONFIG_TOUCHSCREEN_AD7879_SPI=m
+CONFIG_TOUCHSCREEN_CY8CTMG110=m
CONFIG_TOUCHSCREEN_DYNAPRO=m
CONFIG_TOUCHSCREEN_HAMPSHIRE=m
CONFIG_TOUCHSCREEN_EETI=m
@@ -2277,6 +2266,7 @@ CONFIG_TOUCHSCREEN_MTOUCH=m
CONFIG_TOUCHSCREEN_INEXIO=m
CONFIG_TOUCHSCREEN_MK712=m
CONFIG_TOUCHSCREEN_PENMOUNT=m
+CONFIG_TOUCHSCREEN_QT602240=m
CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
CONFIG_TOUCHSCREEN_TOUCHWIN=m
CONFIG_TOUCHSCREEN_UCB1400=m
@@ -2299,7 +2289,7 @@ CONFIG_TOUCHSCREEN_USB_GOTOP=y
CONFIG_TOUCHSCREEN_USB_JASTEC=y
CONFIG_TOUCHSCREEN_USB_E2I=y
CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y
-CONFIG_TOUCHSCREEN_USB_ETT_TC5UH=y
+CONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y
CONFIG_TOUCHSCREEN_USB_NEXIO=y
CONFIG_TOUCHSCREEN_TOUCHIT213=m
CONFIG_TOUCHSCREEN_TSC2007=m
@@ -2322,6 +2312,9 @@ CONFIG_INPUT_WINBOND_CIR=m
CONFIG_INPUT_PCF50633_PMU=m
CONFIG_INPUT_PCF8574=m
CONFIG_INPUT_GPIO_ROTARY_ENCODER=m
+CONFIG_INPUT_ADXL34X=m
+CONFIG_INPUT_ADXL34X_I2C=m
+CONFIG_INPUT_ADXL34X_SPI=m
#
# Hardware I/O ports
@@ -2388,6 +2381,9 @@ CONFIG_SERIAL_8250_RSA=y
# Non-8250 serial port support
#
CONFIG_SERIAL_MAX3100=m
+CONFIG_SERIAL_MAX3107=m
+CONFIG_SERIAL_MRST_MAX3110=m
+CONFIG_SERIAL_MFD_HSU=m
CONFIG_SERIAL_UARTLITE=m
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
@@ -2429,8 +2425,6 @@ CONFIG_CARDMAN_4000=m
CONFIG_CARDMAN_4040=m
CONFIG_IPWIRELESS=m
CONFIG_MWAVE=m
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
CONFIG_RAW_DRIVER=m
CONFIG_MAX_RAW_DEVS=256
CONFIG_HPET=y
@@ -2448,6 +2442,12 @@ CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_MUX=m
+
+#
+# Multiplexer I2C Chip support
+#
+CONFIG_I2C_MUX_PCA954x=m
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_SMBUS=m
CONFIG_I2C_ALGOBIT=m
@@ -2641,9 +2641,11 @@ CONFIG_SENSORS_G760A=m
CONFIG_SENSORS_GL518SM=m
CONFIG_SENSORS_GL520SM=m
CONFIG_SENSORS_CORETEMP=m
+CONFIG_SENSORS_PKGTEMP=m
CONFIG_SENSORS_IBMAEM=m
CONFIG_SENSORS_IBMPEX=m
CONFIG_SENSORS_IT87=m
+CONFIG_SENSORS_JC42=m
CONFIG_SENSORS_LM63=m
CONFIG_SENSORS_LM70=m
CONFIG_SENSORS_LM73=m
@@ -2668,8 +2670,10 @@ CONFIG_SENSORS_PC87427=m
CONFIG_SENSORS_PCF8591=m
CONFIG_SENSORS_SHT15=m
CONFIG_SENSORS_SIS5595=m
+CONFIG_SENSORS_SMM665=m
CONFIG_SENSORS_DME1737=m
CONFIG_SENSORS_EMC1403=m
+CONFIG_SENSORS_EMC2103=m
CONFIG_SENSORS_SMSC47M1=m
CONFIG_SENSORS_SMSC47M192=m
CONFIG_SENSORS_SMSC47B397=m
@@ -2713,6 +2717,7 @@ CONFIG_ACQUIRE_WDT=m
CONFIG_ADVANTECH_WDT=m
CONFIG_ALIM1535_WDT=m
CONFIG_ALIM7101_WDT=m
+CONFIG_F71808E_WDT=m
CONFIG_GEODE_WDT=m
CONFIG_SC520_WDT=m
# CONFIG_SBC_FITPC2_WATCHDOG is not set
@@ -2791,6 +2796,7 @@ CONFIG_MFD_TIMBERDALE=m
CONFIG_LPC_SCH=m
CONFIG_MFD_RDC321X=m
CONFIG_MFD_JANZ_CMODIO=m
+CONFIG_MFD_TPS6586X=m
CONFIG_REGULATOR=y
# CONFIG_REGULATOR_DEBUG is not set
# CONFIG_REGULATOR_DUMMY is not set
@@ -2806,6 +2812,10 @@ CONFIG_REGULATOR_PCF50633=m
CONFIG_REGULATOR_LP3971=m
# CONFIG_REGULATOR_TPS65023 is not set
# CONFIG_REGULATOR_TPS6507X is not set
+CONFIG_REGULATOR_ISL6271A=m
+CONFIG_REGULATOR_AD5398=m
+# CONFIG_REGULATOR_AB8500 is not set
+CONFIG_REGULATOR_TPS6586X=m
CONFIG_MEDIA_SUPPORT=m
#
@@ -2825,13 +2835,18 @@ CONFIG_VIDEO_SAA7146=m
CONFIG_VIDEO_SAA7146_VV=m
CONFIG_IR_CORE=m
CONFIG_VIDEO_IR=m
+CONFIG_LIRC=m
CONFIG_RC_MAP=m
CONFIG_IR_NEC_DECODER=m
CONFIG_IR_RC5_DECODER=m
CONFIG_IR_RC6_DECODER=m
CONFIG_IR_JVC_DECODER=m
CONFIG_IR_SONY_DECODER=m
+CONFIG_IR_LIRC_CODEC=m
CONFIG_IR_IMON=m
+CONFIG_IR_MCEUSB=m
+CONFIG_IR_ENE=m
+CONFIG_IR_STREAMZAP=m
# CONFIG_MEDIA_ATTACH is not set
CONFIG_MEDIA_TUNER=m
# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
@@ -2857,6 +2872,7 @@ CONFIG_VIDEO_V4L2=m
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_DMA_SG=m
CONFIG_VIDEOBUF_VMALLOC=m
+CONFIG_VIDEOBUF_DMA_CONTIG=m
CONFIG_VIDEOBUF_DVB=m
CONFIG_VIDEO_BTCX=m
CONFIG_VIDEO_TVEEPROM=m
@@ -3018,8 +3034,10 @@ CONFIG_USB_GSPCA_SPCA505=m
CONFIG_USB_GSPCA_SPCA506=m
CONFIG_USB_GSPCA_SPCA508=m
CONFIG_USB_GSPCA_SPCA561=m
+CONFIG_USB_GSPCA_SPCA1528=m
CONFIG_USB_GSPCA_SQ905=m
CONFIG_USB_GSPCA_SQ905C=m
+CONFIG_USB_GSPCA_SQ930X=m
CONFIG_USB_GSPCA_STK014=m
CONFIG_USB_GSPCA_STV0680=m
CONFIG_USB_GSPCA_SUNPLUS=m
@@ -3042,7 +3060,6 @@ CONFIG_VIDEO_CX231XX_DVB=m
CONFIG_VIDEO_USBVISION=m
CONFIG_USB_ET61X251=m
CONFIG_USB_SN9C102=m
-CONFIG_USB_ZC0301=m
CONFIG_USB_ZR364XX=m
CONFIG_USB_STKWEBCAM=m
CONFIG_USB_S2255=m
@@ -3239,6 +3256,7 @@ CONFIG_DVB_ISL6421=m
CONFIG_DVB_ISL6423=m
CONFIG_DVB_LGS8GXX=m
CONFIG_DVB_ATBM8830=m
+CONFIG_DVB_TDA665x=m
CONFIG_DAB=y
CONFIG_USB_DABUSB=m
@@ -3574,9 +3592,10 @@ CONFIG_SND_SOC_AK4104=m
CONFIG_SND_SOC_AK4535=m
CONFIG_SND_SOC_AK4642=m
CONFIG_SND_SOC_AK4671=m
+CONFIG_SND_SOC_CS42L51=m
CONFIG_SND_SOC_CS4270=m
-CONFIG_SND_SOC_DA7210=m
CONFIG_SND_SOC_L3=m
+CONFIG_SND_SOC_DA7210=m
CONFIG_SND_SOC_PCM3008=m
CONFIG_SND_SOC_SPDIF=m
CONFIG_SND_SOC_SSM2602=m
@@ -3594,6 +3613,7 @@ CONFIG_SND_SOC_WM8711=m
CONFIG_SND_SOC_WM8727=m
CONFIG_SND_SOC_WM8728=m
CONFIG_SND_SOC_WM8731=m
+CONFIG_SND_SOC_WM8741=m
CONFIG_SND_SOC_WM8750=m
CONFIG_SND_SOC_WM8753=m
CONFIG_SND_SOC_WM8776=m
@@ -3639,6 +3659,7 @@ CONFIG_USB_MOUSE=m
#
CONFIG_HID_3M_PCT=m
# CONFIG_HID_A4TECH is not set
+CONFIG_HID_ACRUX_FF=m
# CONFIG_HID_APPLE is not set
# CONFIG_HID_BELKIN is not set
CONFIG_HID_CANDO=m
@@ -3648,6 +3669,7 @@ CONFIG_HID_PRODIKEYS=m
# CONFIG_HID_CYPRESS is not set
# CONFIG_HID_DRAGONRISE is not set
CONFIG_HID_EGALAX=m
+CONFIG_HID_ELECOM=m
# CONFIG_HID_EZKEY is not set
# CONFIG_HID_KYE is not set
# CONFIG_HID_GYRATION is not set
@@ -3824,6 +3846,7 @@ CONFIG_USB_SERIAL_OMNINET=m
CONFIG_USB_SERIAL_OPTICON=m
CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
CONFIG_USB_SERIAL_ZIO=m
+CONFIG_USB_SERIAL_SSU100=m
CONFIG_USB_SERIAL_DEBUG=m
#
@@ -3984,9 +4007,11 @@ CONFIG_RTC_DRV_TEST=m
CONFIG_RTC_DRV_DS1307=m
CONFIG_RTC_DRV_DS1374=m
CONFIG_RTC_DRV_DS1672=m
+CONFIG_RTC_DRV_DS3232=m
CONFIG_RTC_DRV_MAX6900=m
CONFIG_RTC_DRV_RS5C372=m
CONFIG_RTC_DRV_ISL1208=m
+CONFIG_RTC_DRV_ISL12022=m
CONFIG_RTC_DRV_X1205=m
CONFIG_RTC_DRV_PCF8563=m
CONFIG_RTC_DRV_PCF8583=m
@@ -4038,9 +4063,11 @@ CONFIG_DMADEVICES=y
#
# DMA Devices
#
+CONFIG_INTEL_MID_DMAC=m
CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH=y
CONFIG_INTEL_IOATDMA=m
CONFIG_TIMB_DMA=m
+CONFIG_PCH_DMA=m
CONFIG_DMA_ENGINE=y
#
@@ -4096,6 +4123,7 @@ CONFIG_STAGING=y
# I2C encoder or helper chips
#
# CONFIG_DRM_I2C_CH7006 is not set
+CONFIG_DRM_I2C_SIL164=m
# CONFIG_USB_SERIAL_QUATECH2 is not set
# CONFIG_USB_SERIAL_QUATECH_USB2 is not set
# CONFIG_VT6655 is not set
@@ -4107,19 +4135,14 @@ CONFIG_HYPERV_BLOCK=m
CONFIG_HYPERV_NET=m
CONFIG_HYPERV_UTILS=m
# CONFIG_VME_BUS is not set
-
-#
-# RAR Register Driver
-#
-# CONFIG_RAR_REGISTER is not set
# CONFIG_IIO is not set
-# CONFIG_RAMZSWAP is not set
+CONFIG_ZRAM=m
+CONFIG_ZRAM_STATS=y
# CONFIG_WLAGS49_H2 is not set
# CONFIG_WLAGS49_H25 is not set
# CONFIG_BATMAN_ADV is not set
# CONFIG_SAMSUNG_LAPTOP is not set
# CONFIG_FB_SM7XX is not set
-# CONFIG_DT3155 is not set
# CONFIG_VIDEO_DT3155 is not set
# CONFIG_CRYSTALHD is not set
# CONFIG_CXT1E1 is not set
@@ -4131,6 +4154,10 @@ CONFIG_HYPERV_UTILS=m
# CONFIG_ST_BT is not set
# CONFIG_ADIS16255 is not set
# CONFIG_FB_XGI is not set
+# CONFIG_LIRC_STAGING is not set
+CONFIG_EASYCAP=m
+CONFIG_SOLO6X10=m
+CONFIG_ACPI_QUICKSTART=m
CONFIG_X86_PLATFORM_DEVICES=y
CONFIG_ACER_WMI=m
CONFIG_ASUS_LAPTOP=m
@@ -4144,6 +4171,7 @@ CONFIG_PANASONIC_LAPTOP=m
CONFIG_COMPAL_LAPTOP=m
CONFIG_SONY_LAPTOP=m
# CONFIG_SONYPI_COMPAT is not set
+CONFIG_IDEAPAD_ACPI=m
CONFIG_THINKPAD_ACPI=m
CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y
# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
@@ -4161,6 +4189,7 @@ CONFIG_ACPI_ASUS=m
CONFIG_ACPI_TOSHIBA=m
CONFIG_TOSHIBA_BT_RFKILL=m
CONFIG_ACPI_CMPC=m
+CONFIG_INTEL_IPS=m
#
# Firmware Drivers
@@ -4228,7 +4257,6 @@ CONFIG_NILFS2_FS=m
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
# CONFIG_DNOTIFY is not set
-CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
@@ -4327,7 +4355,8 @@ CONFIG_UBIFS_FS_ZLIB=y
CONFIG_LOGFS=m
CONFIG_CRAMFS=m
CONFIG_SQUASHFS=m
-# CONFIG_SQUASHFS_XATTRS is not set
+# CONFIG_SQUASHFS_XATTR is not set
+# CONFIG_SQUASHFS_LZO is not set
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
# CONFIG_VXFS_FS is not set
@@ -4353,6 +4382,8 @@ CONFIG_NFS_V3=y
CONFIG_NFS_V4=y
# CONFIG_NFS_V4_1 is not set
# CONFIG_NFS_FSCACHE is not set
+# CONFIG_NFS_USE_LEGACY_DNS is not set
+CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
@@ -4377,6 +4408,7 @@ CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
# CONFIG_CIFS_DEBUG2 is not set
CONFIG_CIFS_DFS_UPCALL=y
+# CONFIG_CIFS_FSCACHE is not set
CONFIG_CIFS_EXPERIMENTAL=y
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
@@ -4461,13 +4493,13 @@ CONFIG_FRAME_WARN=1024
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_HARDLOCKUP_DETECTOR is not set
CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_MEMORY_INIT is not set
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_LKDTM is not set
-# CONFIG_LATENCYTOP is not set
CONFIG_SYSCTL_SYSCALL_CHECK=y
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_HAVE_FUNCTION_TRACER=y
@@ -4515,10 +4547,8 @@ CONFIG_SECURITYFS=y
# CONFIG_SECURITY_NETWORK is not set
# CONFIG_SECURITY_PATH is not set
# CONFIG_SECURITY_TOMOYO is not set
+# CONFIG_SECURITY_APPARMOR is not set
# CONFIG_IMA is not set
-# CONFIG_DEFAULT_SECURITY_SELINUX is not set
-# CONFIG_DEFAULT_SECURITY_SMACK is not set
-# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_DEFAULT_SECURITY=""
CONFIG_XOR_BLOCKS=m
@@ -4527,6 +4557,7 @@ CONFIG_ASYNC_MEMCPY=m
CONFIG_ASYNC_XOR=m
CONFIG_ASYNC_PQ=m
CONFIG_ASYNC_RAID6_RECOV=m
+# CONFIG_ASYNC_RAID6_TEST is not set
CONFIG_ASYNC_TX_DISABLE_PQ_VAL_DMA=y
CONFIG_ASYNC_TX_DISABLE_XOR_VAL_DMA=y
CONFIG_CRYPTO=y
@@ -4545,10 +4576,11 @@ CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=m
CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_PCOMP=m
+CONFIG_CRYPTO_PCOMP2=y
CONFIG_CRYPTO_MANAGER=m
CONFIG_CRYPTO_MANAGER2=y
-CONFIG_CRYPTO_MANAGER_TESTS=y
+CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_NULL=m
CONFIG_CRYPTO_PCRYPT=m
@@ -4662,6 +4694,7 @@ CONFIG_VIRTIO_BALLOON=m
#
# Library routines
#
+CONFIG_RAID6_PQ=m
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
diff --git a/testing/linux-scst/r8169-add-gro-support.patch b/testing/linux-scst/r8169-add-gro-support.patch
deleted file mode 100644
index d8ca8d3ad6..0000000000
--- a/testing/linux-scst/r8169-add-gro-support.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-- Use napi_gro_receive() and vlan_gro_receive()
-- Enable GRO by default
-
-Tested on a RTL8111/8168 adapter
-
-Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
-CC: Francois Romieu <romieu@fr.zoreil.com>
----
- drivers/net/r8169.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
-index 56a11e2..ddff42b 100644
---- a/drivers/net/r8169.c
-+++ b/drivers/net/r8169.c
-@@ -1076,7 +1076,12 @@ static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc,
- int ret;
-
- if (vlgrp && (opts2 & RxVlanTag)) {
-- __vlan_hwaccel_rx(skb, vlgrp, swab16(opts2 & 0xffff), polling);
-+ u16 vtag = swab16(opts2 & 0xffff);
-+
-+ if (polling)
-+ vlan_gro_receive(&tp->napi, vlgrp, vtag, skb);
-+ else
-+ __vlan_hwaccel_rx(skb, vlgrp, vtag, polling);
- ret = 0;
- } else
- ret = -1;
-@@ -3186,6 +3191,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
- #ifdef CONFIG_R8169_VLAN
- dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
- #endif
-+ dev->features |= NETIF_F_GRO;
-
- tp->intr_mask = 0xffff;
- tp->align = cfg->align;
-@@ -4561,7 +4567,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
-
- if (rtl8169_rx_vlan_skb(tp, desc, skb, polling) < 0) {
- if (likely(polling))
-- netif_receive_skb(skb);
-+ napi_gro_receive(&tp->napi, skb);
- else
- netif_rx(skb);
- }
-
-
---
-To unsubscribe from this list: send the line "unsubscribe netdev" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html \ No newline at end of file
diff --git a/testing/linux-scst/r8169-fix-rx-checksum-offload.patch b/testing/linux-scst/r8169-fix-rx-checksum-offload.patch
deleted file mode 100644
index d979caac63..0000000000
--- a/testing/linux-scst/r8169-fix-rx-checksum-offload.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From adea1ac7effbddbe60a9de6d63462bfe79289e59 Mon Sep 17 00:00:00 2001
-From: Eric Dumazet <eric.dumazet@gmail.com>
-Date: Sun, 5 Sep 2010 20:04:05 -0700
-Subject: [PATCH] r8169: fix rx checksum offload
-
-While porting GRO to r8169, I found this driver has a bug in its rx
-path.
-
-All skbs given to network stack had their ip_summed set to
-CHECKSUM_NONE, while hardware said they had correct TCP/UDP checksums.
-
-The reason is driver sets skb->ip_summed on the original skb before the
-copy eventually done by copybreak. The fresh skb gets the ip_summed =
-CHECKSUM_NONE value, forcing network stack to recompute checksum, and
-preventing my GRO patch to work.
-
-Fix is to make the ip_summed setting after skb copy.
-
-Note : rx_copybreak current value is 16383, so all frames are copied...
-
-Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
-Acked-by: Francois Romieu <romieu@fr.zoreil.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- drivers/net/r8169.c | 6 ++----
- 1 files changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
-index 07b3fb5..56a11e2 100644
---- a/drivers/net/r8169.c
-+++ b/drivers/net/r8169.c
-@@ -4450,9 +4450,8 @@ static inline int rtl8169_fragmented_frame(u32 status)
- return (status & (FirstFrag | LastFrag)) != (FirstFrag | LastFrag);
- }
-
--static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc)
-+static inline void rtl8169_rx_csum(struct sk_buff *skb, u32 opts1)
- {
-- u32 opts1 = le32_to_cpu(desc->opts1);
- u32 status = opts1 & RxProtoMask;
-
- if (((status == RxProtoTCP) && !(opts1 & TCPFail)) ||
-@@ -4546,8 +4545,6 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
- continue;
- }
-
-- rtl8169_rx_csum(skb, desc);
--
- if (rtl8169_try_rx_copy(&skb, tp, pkt_size, addr)) {
- pci_dma_sync_single_for_device(pdev, addr,
- pkt_size, PCI_DMA_FROMDEVICE);
-@@ -4558,6 +4555,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
- tp->Rx_skbuff[entry] = NULL;
- }
-
-+ rtl8169_rx_csum(skb, status);
- skb_put(skb, pkt_size);
- skb->protocol = eth_type_trans(skb, dev);
-
---
-1.7.2.3
-
diff --git a/testing/linux-scst/scst-2.6.35-svn-3161.patch b/testing/linux-scst/scst-2.6.36-2.0.0.patch
index 6b1904a45d..f482ae59e4 100644
--- a/testing/linux-scst/scst-2.6.35-svn-3161.patch
+++ b/testing/linux-scst/scst-2.6.36-2.0.0.patch
@@ -1,8 +1,8 @@
Signed-off-by:
-diff -upkr linux-2.6.35/block/blk-map.c linux-2.6.35/block/blk-map.c
---- linux-2.6.35/block/blk-map.c 2010-08-02 02:11:14.000000000 +0400
-+++ linux-2.6.35/block/blk-map.c 2010-11-26 18:03:58.107693773 +0300
+diff -upkr linux-2.6.36/block/blk-map.c linux-2.6.36/block/blk-map.c
+--- linux-2.6.36/block/blk-map.c 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/block/blk-map.c 2010-11-26 17:52:19.467689539 +0300
@@ -5,6 +5,8 @@
#include <linux/module.h>
#include <linux/bio.h>
@@ -12,7 +12,7 @@ diff -upkr linux-2.6.35/block/blk-map.c linux-2.6.35/block/blk-map.c
#include <scsi/sg.h> /* for struct sg_iovec */
#include "blk.h"
-@@ -271,6 +273,335 @@ int blk_rq_unmap_user(struct bio *bio)
+@@ -271,6 +273,337 @@ int blk_rq_unmap_user(struct bio *bio)
}
EXPORT_SYMBOL(blk_rq_unmap_user);
@@ -197,7 +197,7 @@ diff -upkr linux-2.6.35/block/blk-map.c linux-2.6.35/block/blk-map.c
+ }
+
+ if (rw == WRITE)
-+ bio->bi_rw |= 1 << BIO_RW;
++ bio->bi_rw |= REQ_WRITE;
+
+ bios++;
+ bio->bi_private = bw;
@@ -265,6 +265,8 @@ diff -upkr linux-2.6.35/block/blk-map.c linux-2.6.35/block/blk-map.c
+ }
+ }
+
++ res = 0;
++
+ rq->buffer = NULL;
+out:
+ return res;
@@ -348,10 +350,10 @@ diff -upkr linux-2.6.35/block/blk-map.c linux-2.6.35/block/blk-map.c
/**
* blk_rq_map_kern - map kernel data to a request, for REQ_TYPE_BLOCK_PC usage
* @q: request queue where request should be inserted
-diff -upkr linux-2.6.35/include/linux/blkdev.h linux-2.6.35/include/linux/blkdev.h
---- linux-2.6.35/include/linux/blkdev.h 2010-08-02 02:11:14.000000000 +0400
-+++ linux-2.6.35/include/linux/blkdev.h 2010-08-04 12:21:59.737128732 +0400
-@@ -832,6 +834,9 @@ extern int blk_rq_map_kern(struct reques
+diff -upkr linux-2.6.36/include/linux/blkdev.h linux-2.6.36/include/linux/blkdev.h
+--- linux-2.6.36/include/linux/blkdev.h 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/include/linux/blkdev.h 2010-10-26 12:00:15.899759399 +0400
+@@ -746,6 +748,9 @@ extern int blk_rq_map_kern(struct reques
extern int blk_rq_map_user_iov(struct request_queue *, struct request *,
struct rq_map_data *, struct sg_iovec *, int,
unsigned int, gfp_t);
@@ -361,9 +363,9 @@ diff -upkr linux-2.6.35/include/linux/blkdev.h linux-2.6.35/include/linux/blkdev
extern int blk_execute_rq(struct request_queue *, struct gendisk *,
struct request *, int);
extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *,
-diff -upkr linux-2.6.35/include/linux/scatterlist.h linux-2.6.35/include/linux/scatterlist.h
---- linux-2.6.35/include/linux/scatterlist.h 2010-08-02 02:11:14.000000000 +0400
-+++ linux-2.6.35/include/linux/scatterlist.h 2010-08-04 12:21:59.741129485 +0400
+diff -upkr linux-2.6.36/include/linux/scatterlist.h linux-2.6.36/include/linux/scatterlist.h
+--- linux-2.6.36/include/linux/scatterlist.h 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/include/linux/scatterlist.h 2010-10-26 12:00:15.899759399 +0400
@@ -3,6 +3,7 @@
#include <asm/types.h>
@@ -383,10 +385,10 @@ diff -upkr linux-2.6.35/include/linux/scatterlist.h linux-2.6.35/include/linux/s
/*
* Maximum number of entries that will be allocated in one piece, if
* a list larger than this is required then chaining will be utilized.
-diff -upkr linux-2.6.35/lib/scatterlist.c linux-2.6.35/lib/scatterlist.c
---- linux-2.6.35/lib/scatterlist.c 2010-08-02 02:11:14.000000000 +0400
-+++ linux-2.6.35/lib/scatterlist.c 2010-08-04 12:21:59.741129485 +0400
-@@ -494,3 +494,132 @@ size_t sg_copy_to_buffer(struct scatterl
+diff -upkr linux-2.6.36/lib/scatterlist.c linux-2.6.36/lib/scatterlist.c
+--- linux-2.6.36/lib/scatterlist.c 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/lib/scatterlist.c 2010-10-26 12:00:15.899759399 +0400
+@@ -517,3 +517,132 @@ size_t sg_copy_to_buffer(struct scatterl
return sg_copy_buffer(sgl, nents, buf, buflen, 1);
}
EXPORT_SYMBOL(sg_copy_to_buffer);
@@ -520,9 +522,9 @@ diff -upkr linux-2.6.35/lib/scatterlist.c linux-2.6.35/lib/scatterlist.c
+}
+EXPORT_SYMBOL(sg_copy);
-diff -upkr linux-2.6.35/include/linux/mm_types.h linux-2.6.35/include/linux/mm_types.h
---- linux-2.6.35/include/linux/mm_types.h 2010-05-17 01:17:36.000000000 +0400
-+++ linux-2.6.35/include/linux/mm_types.h 2010-05-24 14:51:40.000000000 +0400
+diff -upkr linux-2.6.36/include/linux/mm_types.h linux-2.6.36/include/linux/mm_types.h
+--- linux-2.6.36/include/linux/mm_types.h 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/include/linux/mm_types.h 2010-10-26 12:01:40.651752329 +0400
@@ -100,6 +100,18 @@ struct page {
*/
void *shadow;
@@ -542,9 +544,9 @@ diff -upkr linux-2.6.35/include/linux/mm_types.h linux-2.6.35/include/linux/mm_t
};
/*
-diff -upkr linux-2.6.35/include/linux/net.h linux-2.6.35/include/linux/net.h
---- linux-2.6.35/include/linux/net.h 2010-05-17 01:17:36.000000000 +0400
-+++ linux-2.6.35/include/linux/net.h 2010-05-24 14:51:40.000000000 +0400
+diff -upkr linux-2.6.36/include/linux/net.h linux-2.6.36/include/linux/net.h
+--- linux-2.6.36/include/linux/net.h 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/include/linux/net.h 2010-10-26 12:01:40.651752329 +0400
@@ -20,6 +20,7 @@
#include <linux/socket.h>
@@ -598,10 +600,10 @@ diff -upkr linux-2.6.35/include/linux/net.h linux-2.6.35/include/linux/net.h
+
#endif /* __KERNEL__ */
#endif /* _LINUX_NET_H */
-diff -upkr linux-2.6.35/net/core/dev.c linux-2.6.35/net/core/dev.c
---- linux-2.6.35/net/core/dev.c 2010-05-17 01:17:36.000000000 +0400
-+++ linux-2.6.35/net/core/dev.c 2010-05-24 14:51:40.000000000 +0400
-@@ -3130,7 +3130,7 @@ pull:
+diff -upkr linux-2.6.36/net/core/dev.c linux-2.6.36/net/core/dev.c
+--- linux-2.6.36/net/core/dev.c 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/net/core/dev.c 2010-10-26 12:01:40.651752329 +0400
+@@ -3140,7 +3140,7 @@ pull:
skb_shinfo(skb)->frags[0].size -= grow;
if (unlikely(!skb_shinfo(skb)->frags[0].size)) {
@@ -609,10 +611,10 @@ diff -upkr linux-2.6.35/net/core/dev.c linux-2.6.35/net/core/dev.c
+ net_put_page(skb_shinfo(skb)->frags[0].page);
memmove(skb_shinfo(skb)->frags,
skb_shinfo(skb)->frags + 1,
- --skb_shinfo(skb)->nr_frags);
-diff -upkr linux-2.6.35/net/core/skbuff.c linux-2.6.35/net/core/skbuff.c
---- linux-2.6.35/net/core/skbuff.c 2010-05-17 01:17:36.000000000 +0400
-+++ linux-2.6.35/net/core/skbuff.c 2010-05-24 14:51:40.000000000 +0400
+ --skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t));
+diff -upkr linux-2.6.36/net/core/skbuff.c linux-2.6.36/net/core/skbuff.c
+--- linux-2.6.36/net/core/skbuff.c 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/net/core/skbuff.c 2010-10-26 12:01:40.655752708 +0400
@@ -76,13 +76,13 @@ static struct kmem_cache *skbuff_fclone_
static void sock_pipe_buf_release(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
@@ -648,7 +650,7 @@ diff -upkr linux-2.6.35/net/core/skbuff.c linux-2.6.35/net/core/skbuff.c
skb_shinfo(n)->nr_frags = i;
}
@@ -820,7 +820,7 @@ int pskb_expand_head(struct sk_buff *skb
- sizeof(struct skb_shared_info));
+ offsetof(struct skb_shared_info, frags[skb_shinfo(skb)->nr_frags]));
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
- get_page(skb_shinfo(skb)->frags[i].page);
@@ -737,7 +739,7 @@ diff -upkr linux-2.6.35/net/core/skbuff.c linux-2.6.35/net/core/skbuff.c
}
/* Reposition in the original skb */
-@@ -2598,7 +2598,7 @@ struct sk_buff *skb_segment(struct sk_bu
+@@ -2601,7 +2601,7 @@ struct sk_buff *skb_segment(struct sk_bu
while (pos < offset + len && i < nfrags) {
*frag = skb_shinfo(skb)->frags[i];
@@ -746,10 +748,10 @@ diff -upkr linux-2.6.35/net/core/skbuff.c linux-2.6.35/net/core/skbuff.c
size = frag->size;
if (pos < offset) {
-diff -upkr linux-2.6.35/net/ipv4/ip_output.c linux-2.6.35/net/ipv4/ip_output.c
---- linux-2.6.35/net/ipv4/ip_output.c 2010-05-17 01:17:36.000000000 +0400
-+++ linux-2.6.35/net/ipv4/ip_output.c 2010-05-24 14:51:40.000000000 +0400
-@@ -1035,7 +1035,7 @@ alloc_new_skb:
+diff -upkr linux-2.6.36/net/ipv4/ip_output.c linux-2.6.36/net/ipv4/ip_output.c
+--- linux-2.6.36/net/ipv4/ip_output.c 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/net/ipv4/ip_output.c 2010-10-26 12:01:40.655752708 +0400
+@@ -1040,7 +1040,7 @@ alloc_new_skb:
err = -EMSGSIZE;
goto error;
}
@@ -758,7 +760,7 @@ diff -upkr linux-2.6.35/net/ipv4/ip_output.c linux-2.6.35/net/ipv4/ip_output.c
skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
frag = &skb_shinfo(skb)->frags[i];
}
-@@ -1194,7 +1194,7 @@ ssize_t ip_append_page(struct sock *sk,
+@@ -1199,7 +1199,7 @@ ssize_t ip_append_page(struct sock *sk,
if (skb_can_coalesce(skb, i, page, offset)) {
skb_shinfo(skb)->frags[i-1].size += len;
} else if (i < MAX_SKB_FRAGS) {
@@ -767,9 +769,9 @@ diff -upkr linux-2.6.35/net/ipv4/ip_output.c linux-2.6.35/net/ipv4/ip_output.c
skb_fill_page_desc(skb, i, page, offset, len);
} else {
err = -EMSGSIZE;
-diff -upkr linux-2.6.35/net/ipv4/Makefile linux-2.6.35/net/ipv4/Makefile
---- linux-2.6.35/net/ipv4/Makefile 2010-05-17 01:17:36.000000000 +0400
-+++ linux-2.6.35/net/ipv4/Makefile 2010-05-24 14:51:40.000000000 +0400
+diff -upkr linux-2.6.36/net/ipv4/Makefile linux-2.6.36/net/ipv4/Makefile
+--- linux-2.6.36/net/ipv4/Makefile 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/net/ipv4/Makefile 2010-10-26 12:01:40.655752708 +0400
@@ -49,6 +49,7 @@ obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o
@@ -778,10 +780,10 @@ diff -upkr linux-2.6.35/net/ipv4/Makefile linux-2.6.35/net/ipv4/Makefile
obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
xfrm4_output.o
-diff -upkr linux-2.6.35/net/ipv4/tcp.c linux-2.6.35/net/ipv4/tcp.c
---- linux-2.6.35/net/ipv4/tcp.c 2010-05-17 01:17:36.000000000 +0400
-+++ linux-2.6.35/net/ipv4/tcp.c 2010-05-24 14:51:40.000000000 +0400
-@@ -801,7 +801,7 @@ new_segment:
+diff -upkr linux-2.6.36/net/ipv4/tcp.c linux-2.6.36/net/ipv4/tcp.c
+--- linux-2.6.36/net/ipv4/tcp.c 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/net/ipv4/tcp.c 2010-10-26 12:01:40.659752056 +0400
+@@ -806,7 +806,7 @@ new_segment:
if (can_coalesce) {
skb_shinfo(skb)->frags[i - 1].size += copy;
} else {
@@ -790,7 +792,7 @@ diff -upkr linux-2.6.35/net/ipv4/tcp.c linux-2.6.35/net/ipv4/tcp.c
skb_fill_page_desc(skb, i, page, offset, copy);
}
-@@ -1010,7 +1010,7 @@ new_segment:
+@@ -1015,7 +1015,7 @@ new_segment:
goto new_segment;
} else if (page) {
if (off == PAGE_SIZE) {
@@ -799,7 +801,7 @@ diff -upkr linux-2.6.35/net/ipv4/tcp.c linux-2.6.35/net/ipv4/tcp.c
TCP_PAGE(sk) = page = NULL;
off = 0;
}
-@@ -1051,9 +1051,9 @@ new_segment:
+@@ -1056,9 +1056,9 @@ new_segment:
} else {
skb_fill_page_desc(skb, i, page, off, copy);
if (TCP_PAGE(sk)) {
@@ -811,10 +813,10 @@ diff -upkr linux-2.6.35/net/ipv4/tcp.c linux-2.6.35/net/ipv4/tcp.c
TCP_PAGE(sk) = page;
}
}
-diff -upkr linux-2.6.35/net/ipv4/tcp_output.c linux-2.6.35/net/ipv4/tcp_output.c
---- linux-2.6.35/net/ipv4/tcp_output.c 2010-05-17 01:17:36.000000000 +0400
-+++ linux-2.6.35/net/ipv4/tcp_output.c 2010-05-24 14:51:40.000000000 +0400
-@@ -1085,7 +1085,7 @@ static void __pskb_trim_head(struct sk_b
+diff -upkr linux-2.6.36/net/ipv4/tcp_output.c linux-2.6.36/net/ipv4/tcp_output.c
+--- linux-2.6.36/net/ipv4/tcp_output.c 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/net/ipv4/tcp_output.c 2010-10-26 12:01:40.659752056 +0400
+@@ -1086,7 +1086,7 @@ static void __pskb_trim_head(struct sk_b
k = 0;
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
if (skb_shinfo(skb)->frags[i].size <= eat) {
@@ -823,9 +825,9 @@ diff -upkr linux-2.6.35/net/ipv4/tcp_output.c linux-2.6.35/net/ipv4/tcp_output.c
eat -= skb_shinfo(skb)->frags[i].size;
} else {
skb_shinfo(skb)->frags[k] = skb_shinfo(skb)->frags[i];
-diff -upkr linux-2.6.35/net/ipv4/tcp_zero_copy.c linux-2.6.35/net/ipv4/tcp_zero_copy.c
---- linux-2.6.35/net/ipv4/tcp_zero_copy.c 2010-03-01 17:30:31.000000000 +0300
-+++ linux-2.6.35/net/ipv4/tcp_zero_copy.c 2010-05-24 14:51:40.000000000 +0400
+diff -upkr linux-2.6.36/net/ipv4/tcp_zero_copy.c linux-2.6.36/net/ipv4/tcp_zero_copy.c
+--- linux-2.6.36/net/ipv4/tcp_zero_copy.c 2010-10-26 12:02:24.519252006 +0400
++++ linux-2.6.36/net/ipv4/tcp_zero_copy.c 2010-10-26 12:01:40.659752056 +0400
@@ -0,0 +1,49 @@
+/*
+ * Support routines for TCP zero copy transmit
@@ -836,7 +838,7 @@ diff -upkr linux-2.6.35/net/ipv4/tcp_zero_copy.c linux-2.6.35/net/ipv4/tcp_zero_
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ */
-+
++
+#include <linux/skbuff.h>
+
+net_get_page_callback_t net_get_page_callback __read_mostly;
@@ -876,10 +878,10 @@ diff -upkr linux-2.6.35/net/ipv4/tcp_zero_copy.c linux-2.6.35/net/ipv4/tcp_zero_
+ return res;
+}
+EXPORT_SYMBOL(net_set_get_put_page_callbacks);
-diff -upkr linux-2.6.35/net/ipv6/ip6_output.c linux-2.6.35/net/ipv6/ip6_output.c
---- linux-2.6.35/net/ipv6/ip6_output.c 2010-05-17 01:17:36.000000000 +0400
-+++ linux-2.6.35/net/ipv6/ip6_output.c 2010-05-24 14:51:40.000000000 +0400
-@@ -1383,7 +1383,7 @@ alloc_new_skb:
+diff -upkr linux-2.6.36/net/ipv6/ip6_output.c linux-2.6.36/net/ipv6/ip6_output.c
+--- linux-2.6.36/net/ipv6/ip6_output.c 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/net/ipv6/ip6_output.c 2010-10-26 12:01:40.659752056 +0400
+@@ -1391,7 +1391,7 @@ alloc_new_skb:
err = -EMSGSIZE;
goto error;
}
@@ -888,9 +890,9 @@ diff -upkr linux-2.6.35/net/ipv6/ip6_output.c linux-2.6.35/net/ipv6/ip6_output.c
skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
frag = &skb_shinfo(skb)->frags[i];
}
-diff -upkr linux-2.6.35/net/Kconfig linux-2.6.35/net/Kconfig
---- linux-2.6.35/net/Kconfig 2010-05-17 01:17:36.000000000 +0400
-+++ linux-2.6.35/net/Kconfig 2010-05-24 14:51:40.000000000 +0400
+diff -upkr linux-2.6.36/net/Kconfig linux-2.6.36/net/Kconfig
+--- linux-2.6.36/net/Kconfig 2010-10-21 00:30:22.000000000 +0400
++++ linux-2.6.36/net/Kconfig 2010-10-26 12:01:40.659752056 +0400
@@ -72,6 +72,18 @@ config INET
Short answer: say Y.
@@ -910,9 +912,425 @@ diff -upkr linux-2.6.35/net/Kconfig linux-2.6.35/net/Kconfig
if INET
source "net/ipv4/Kconfig"
source "net/ipv6/Kconfig"
-diff -uprN orig/linux-2.6.35/include/scst/scst.h linux-2.6.35/include/scst/scst.h
---- orig/linux-2.6.35/include/scst/scst.h
-+++ linux-2.6.35/include/scst/scst.h
+diff -uprN orig/linux-2.6.36/include/scst/scst_const.h linux-2.6.36/include/scst/scst_const.h
+--- orig/linux-2.6.36/include/scst/scst_const.h
++++ linux-2.6.36/include/scst/scst_const.h
+@@ -0,0 +1,412 @@
++/*
++ * include/scst_const.h
++ *
++ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
++ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ *
++ * Contains common SCST constants.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation, version 2
++ * of the License.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ */
++
++#ifndef __SCST_CONST_H
++#define __SCST_CONST_H
++
++#ifndef GENERATING_UPSTREAM_PATCH
++/*
++ * Include <linux/version.h> only when not converting this header file into
++ * a patch for upstream review because only then the symbol LINUX_VERSION_CODE
++ * is needed.
++ */
++#include <linux/version.h>
++#endif
++#include <scsi/scsi.h>
++
++#define SCST_CONST_VERSION "$Revision: 2605 $"
++
++/*** Shared constants between user and kernel spaces ***/
++
++/* Max size of CDB */
++#define SCST_MAX_CDB_SIZE 16
++
++/* Max size of various names */
++#define SCST_MAX_NAME 50
++
++/* Max size of external names, like initiator name */
++#define SCST_MAX_EXTERNAL_NAME 256
++
++/*
++ * Size of sense sufficient to carry standard sense data.
++ * Warning! It's allocated on stack!
++ */
++#define SCST_STANDARD_SENSE_LEN 18
++
++/* Max size of sense */
++#define SCST_SENSE_BUFFERSIZE 96
++
++/*************************************************************
++ ** Allowed delivery statuses for cmd's delivery_status
++ *************************************************************/
++
++#define SCST_CMD_DELIVERY_SUCCESS 0
++#define SCST_CMD_DELIVERY_FAILED -1
++#define SCST_CMD_DELIVERY_ABORTED -2
++
++/*************************************************************
++ ** Values for task management functions
++ *************************************************************/
++#define SCST_ABORT_TASK 0
++#define SCST_ABORT_TASK_SET 1
++#define SCST_CLEAR_ACA 2
++#define SCST_CLEAR_TASK_SET 3
++#define SCST_LUN_RESET 4
++#define SCST_TARGET_RESET 5
++
++/** SCST extensions **/
++
++/*
++ * Notifies about I_T nexus loss event in the corresponding session.
++ * Aborts all tasks there, resets the reservation, if any, and sets
++ * up the I_T Nexus loss UA.
++ */
++#define SCST_NEXUS_LOSS_SESS 6
++
++/* Aborts all tasks in the corresponding session */
++#define SCST_ABORT_ALL_TASKS_SESS 7
++
++/*
++ * Notifies about I_T nexus loss event. Aborts all tasks in all sessions
++ * of the tgt, resets the reservations, if any, and sets up the I_T Nexus
++ * loss UA.
++ */
++#define SCST_NEXUS_LOSS 8
++
++/* Aborts all tasks in all sessions of the tgt */
++#define SCST_ABORT_ALL_TASKS 9
++
++/*
++ * Internal TM command issued by SCST in scst_unregister_session(). It is the
++ * same as SCST_NEXUS_LOSS_SESS, except:
++ * - it doesn't call task_mgmt_affected_cmds_done()
++ * - it doesn't call task_mgmt_fn_done()
++ * - it doesn't queue NEXUS LOSS UA.
++ *
++ * Target drivers must NEVER use it!!
++ */
++#define SCST_UNREG_SESS_TM 10
++
++/*
++ * Internal TM command issued by SCST in scst_pr_abort_reg(). It aborts all
++ * tasks from mcmd->origin_pr_cmd->tgt_dev, except mcmd->origin_pr_cmd.
++ * Additionally:
++ * - it signals pr_aborting_cmpl completion when all affected
++ * commands marked as aborted.
++ * - it doesn't call task_mgmt_affected_cmds_done()
++ * - it doesn't call task_mgmt_fn_done()
++ * - it calls mcmd->origin_pr_cmd->scst_cmd_done() when all affected
++ * commands aborted.
++ *
++ * Target drivers must NEVER use it!!
++ */
++#define SCST_PR_ABORT_ALL 11
++
++/*************************************************************
++ ** Values for mgmt cmd's status field. Codes taken from iSCSI
++ *************************************************************/
++#define SCST_MGMT_STATUS_SUCCESS 0
++#define SCST_MGMT_STATUS_TASK_NOT_EXIST -1
++#define SCST_MGMT_STATUS_LUN_NOT_EXIST -2
++#define SCST_MGMT_STATUS_FN_NOT_SUPPORTED -5
++#define SCST_MGMT_STATUS_REJECTED -255
++#define SCST_MGMT_STATUS_FAILED -129
++
++/*************************************************************
++ ** SCSI task attribute queue types
++ *************************************************************/
++enum scst_cmd_queue_type {
++ SCST_CMD_QUEUE_UNTAGGED = 0,
++ SCST_CMD_QUEUE_SIMPLE,
++ SCST_CMD_QUEUE_ORDERED,
++ SCST_CMD_QUEUE_HEAD_OF_QUEUE,
++ SCST_CMD_QUEUE_ACA
++};
++
++/*************************************************************
++ ** CDB flags
++ **
++ ** Implicit ordered used for commands which need calm environment
++ ** without any simultaneous activities. For instance, for MODE
++ ** SELECT it is needed to correctly generate its UA.
++ *************************************************************/
++enum scst_cdb_flags {
++ SCST_TRANSFER_LEN_TYPE_FIXED = 0x0001,
++ SCST_SMALL_TIMEOUT = 0x0002,
++ SCST_LONG_TIMEOUT = 0x0004,
++ SCST_UNKNOWN_LENGTH = 0x0008,
++ SCST_INFO_VALID = 0x0010, /* must be single bit */
++ SCST_VERIFY_BYTCHK_MISMATCH_ALLOWED = 0x0020,
++ SCST_IMPLICIT_HQ = 0x0040,
++ SCST_IMPLICIT_ORDERED = 0x0080, /* ToDo: remove it's nonsense */
++ SCST_SKIP_UA = 0x0100,
++ SCST_WRITE_MEDIUM = 0x0200,
++ SCST_LOCAL_CMD = 0x0400,
++ SCST_FULLY_LOCAL_CMD = 0x0800,
++ SCST_REG_RESERVE_ALLOWED = 0x1000,
++ SCST_WRITE_EXCL_ALLOWED = 0x2000,
++ SCST_EXCL_ACCESS_ALLOWED = 0x4000,
++#ifdef CONFIG_SCST_TEST_IO_IN_SIRQ
++ SCST_TEST_IO_IN_SIRQ_ALLOWED = 0x8000,
++#endif
++};
++
++/*************************************************************
++ ** Data direction aliases. Changing it don't forget to change
++ ** scst_to_tgt_dma_dir as well!!
++ *************************************************************/
++#define SCST_DATA_UNKNOWN 0
++#define SCST_DATA_WRITE 1
++#define SCST_DATA_READ 2
++#define SCST_DATA_BIDI (SCST_DATA_WRITE | SCST_DATA_READ)
++#define SCST_DATA_NONE 4
++
++/*************************************************************
++ ** Default suffix for targets with NULL names
++ *************************************************************/
++#define SCST_DEFAULT_TGT_NAME_SUFFIX "_target_"
++
++/*************************************************************
++ ** Sense manipulation and examination
++ *************************************************************/
++#define SCST_LOAD_SENSE(key_asc_ascq) key_asc_ascq
++
++#define SCST_SENSE_VALID(sense) ((sense != NULL) && \
++ ((((const uint8_t *)(sense))[0] & 0x70) == 0x70))
++
++#define SCST_NO_SENSE(sense) ((sense != NULL) && \
++ (((const uint8_t *)(sense))[2] == 0))
++
++/*************************************************************
++ ** Sense data for the appropriate errors. Can be used with
++ ** scst_set_cmd_error()
++ *************************************************************/
++#define scst_sense_no_sense NO_SENSE, 0x00, 0
++#define scst_sense_hardw_error HARDWARE_ERROR, 0x44, 0
++#define scst_sense_aborted_command ABORTED_COMMAND, 0x00, 0
++#define scst_sense_invalid_opcode ILLEGAL_REQUEST, 0x20, 0
++#define scst_sense_invalid_field_in_cdb ILLEGAL_REQUEST, 0x24, 0
++#define scst_sense_invalid_field_in_parm_list ILLEGAL_REQUEST, 0x26, 0
++#define scst_sense_parameter_value_invalid ILLEGAL_REQUEST, 0x26, 2
++#define scst_sense_invalid_release ILLEGAL_REQUEST, 0x26, 4
++#define scst_sense_parameter_list_length_invalid \
++ ILLEGAL_REQUEST, 0x1A, 0
++#define scst_sense_reset_UA UNIT_ATTENTION, 0x29, 0
++#define scst_sense_nexus_loss_UA UNIT_ATTENTION, 0x29, 0x7
++#define scst_sense_saving_params_unsup ILLEGAL_REQUEST, 0x39, 0
++#define scst_sense_lun_not_supported ILLEGAL_REQUEST, 0x25, 0
++#define scst_sense_data_protect DATA_PROTECT, 0x00, 0
++#define scst_sense_miscompare_error MISCOMPARE, 0x1D, 0
++#define scst_sense_block_out_range_error ILLEGAL_REQUEST, 0x21, 0
++#define scst_sense_medium_changed_UA UNIT_ATTENTION, 0x28, 0
++#define scst_sense_read_error MEDIUM_ERROR, 0x11, 0
++#define scst_sense_write_error MEDIUM_ERROR, 0x03, 0
++#define scst_sense_not_ready NOT_READY, 0x04, 0x10
++#define scst_sense_invalid_message ILLEGAL_REQUEST, 0x49, 0
++#define scst_sense_cleared_by_another_ini_UA UNIT_ATTENTION, 0x2F, 0
++#define scst_sense_capacity_data_changed UNIT_ATTENTION, 0x2A, 0x9
++#define scst_sense_reservation_preempted UNIT_ATTENTION, 0x2A, 0x03
++#define scst_sense_reservation_released UNIT_ATTENTION, 0x2A, 0x04
++#define scst_sense_registrations_preempted UNIT_ATTENTION, 0x2A, 0x05
++#define scst_sense_reported_luns_data_changed UNIT_ATTENTION, 0x3F, 0xE
++#define scst_sense_inquery_data_changed UNIT_ATTENTION, 0x3F, 0x3
++
++/*************************************************************
++ * SCSI opcodes not listed anywhere else
++ *************************************************************/
++#define REPORT_DEVICE_IDENTIFIER 0xA3
++#define INIT_ELEMENT_STATUS 0x07
++#define INIT_ELEMENT_STATUS_RANGE 0x37
++#define PREVENT_ALLOW_MEDIUM 0x1E
++#define READ_ATTRIBUTE 0x8C
++#define REQUEST_VOLUME_ADDRESS 0xB5
++#define WRITE_ATTRIBUTE 0x8D
++#define WRITE_VERIFY_16 0x8E
++#define VERIFY_6 0x13
++#ifndef VERIFY_12
++#define VERIFY_12 0xAF
++#endif
++#ifndef GENERATING_UPSTREAM_PATCH
++/*
++ * The constants below have been defined in the kernel header <scsi/scsi.h>
++ * and hence are not needed when this header file is included in kernel code.
++ * The definitions below are only used when this header file is included during
++ * compilation of SCST's user space components.
++ */
++#ifndef READ_16
++#define READ_16 0x88
++#endif
++#ifndef WRITE_16
++#define WRITE_16 0x8a
++#endif
++#ifndef VERIFY_16
++#define VERIFY_16 0x8f
++#endif
++#ifndef SERVICE_ACTION_IN
++#define SERVICE_ACTION_IN 0x9e
++#endif
++#ifndef SAI_READ_CAPACITY_16
++/* values for service action in */
++#define SAI_READ_CAPACITY_16 0x10
++#endif
++#endif
++#ifndef GENERATING_UPSTREAM_PATCH
++#ifndef REPORT_LUNS
++#define REPORT_LUNS 0xa0
++#endif
++#endif
++
++/*************************************************************
++ ** SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
++ ** T10/1561-D Revision 4 Draft dated 7th November 2002.
++ *************************************************************/
++#define SAM_STAT_GOOD 0x00
++#define SAM_STAT_CHECK_CONDITION 0x02
++#define SAM_STAT_CONDITION_MET 0x04
++#define SAM_STAT_BUSY 0x08
++#define SAM_STAT_INTERMEDIATE 0x10
++#define SAM_STAT_INTERMEDIATE_CONDITION_MET 0x14
++#define SAM_STAT_RESERVATION_CONFLICT 0x18
++#define SAM_STAT_COMMAND_TERMINATED 0x22 /* obsolete in SAM-3 */
++#define SAM_STAT_TASK_SET_FULL 0x28
++#define SAM_STAT_ACA_ACTIVE 0x30
++#define SAM_STAT_TASK_ABORTED 0x40
++
++/*************************************************************
++ ** Control byte field in CDB
++ *************************************************************/
++#define CONTROL_BYTE_LINK_BIT 0x01
++#define CONTROL_BYTE_NACA_BIT 0x04
++
++/*************************************************************
++ ** Byte 1 in INQUIRY CDB
++ *************************************************************/
++#define SCST_INQ_EVPD 0x01
++
++/*************************************************************
++ ** Byte 3 in Standard INQUIRY data
++ *************************************************************/
++#define SCST_INQ_BYTE3 3
++
++#define SCST_INQ_NORMACA_BIT 0x20
++
++/*************************************************************
++ ** Byte 2 in RESERVE_10 CDB
++ *************************************************************/
++#define SCST_RES_3RDPTY 0x10
++#define SCST_RES_LONGID 0x02
++
++/*************************************************************
++ ** Values for the control mode page TST field
++ *************************************************************/
++#define SCST_CONTR_MODE_ONE_TASK_SET 0
++#define SCST_CONTR_MODE_SEP_TASK_SETS 1
++
++/*******************************************************************
++ ** Values for the control mode page QUEUE ALGORITHM MODIFIER field
++ *******************************************************************/
++#define SCST_CONTR_MODE_QUEUE_ALG_RESTRICTED_REORDER 0
++#define SCST_CONTR_MODE_QUEUE_ALG_UNRESTRICTED_REORDER 1
++
++/*************************************************************
++ ** Values for the control mode page D_SENSE field
++ *************************************************************/
++#define SCST_CONTR_MODE_FIXED_SENSE 0
++#define SCST_CONTR_MODE_DESCR_SENSE 1
++
++/*************************************************************
++ ** TransportID protocol identifiers
++ *************************************************************/
++
++#define SCSI_TRANSPORTID_PROTOCOLID_FCP2 0
++#define SCSI_TRANSPORTID_PROTOCOLID_SPI5 1
++#define SCSI_TRANSPORTID_PROTOCOLID_SRP 4
++#define SCSI_TRANSPORTID_PROTOCOLID_ISCSI 5
++#define SCSI_TRANSPORTID_PROTOCOLID_SAS 6
++
++/*************************************************************
++ ** Misc SCSI constants
++ *************************************************************/
++#define SCST_SENSE_ASC_UA_RESET 0x29
++#define BYTCHK 0x02
++#define POSITION_LEN_SHORT 20
++#define POSITION_LEN_LONG 32
++
++/*************************************************************
++ ** Various timeouts
++ *************************************************************/
++#define SCST_DEFAULT_TIMEOUT (60 * HZ)
++
++#define SCST_GENERIC_CHANGER_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_CHANGER_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_GENERIC_PROCESSOR_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_PROCESSOR_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_GENERIC_TAPE_SMALL_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_TAPE_REG_TIMEOUT (900 * HZ)
++#define SCST_GENERIC_TAPE_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_GENERIC_MODISK_SMALL_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_MODISK_REG_TIMEOUT (900 * HZ)
++#define SCST_GENERIC_MODISK_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_GENERIC_DISK_SMALL_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_DISK_REG_TIMEOUT (60 * HZ)
++#define SCST_GENERIC_DISK_LONG_TIMEOUT (3600 * HZ)
++
++#define SCST_GENERIC_RAID_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_RAID_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_GENERIC_CDROM_SMALL_TIMEOUT (3 * HZ)
++#define SCST_GENERIC_CDROM_REG_TIMEOUT (900 * HZ)
++#define SCST_GENERIC_CDROM_LONG_TIMEOUT (14000 * HZ)
++
++#define SCST_MAX_OTHER_TIMEOUT (14000 * HZ)
++
++/*************************************************************
++ ** I/O grouping attribute string values. Must match constants
++ ** w/o '_STR' suffix!
++ *************************************************************/
++#define SCST_IO_GROUPING_AUTO_STR "auto"
++#define SCST_IO_GROUPING_THIS_GROUP_ONLY_STR "this_group_only"
++#define SCST_IO_GROUPING_NEVER_STR "never"
++
++/*************************************************************
++ ** Threads pool type attribute string values.
++ ** Must match scst_dev_type_threads_pool_type!
++ *************************************************************/
++#define SCST_THREADS_POOL_PER_INITIATOR_STR "per_initiator"
++#define SCST_THREADS_POOL_SHARED_STR "shared"
++
++/*************************************************************
++ ** Misc constants
++ *************************************************************/
++#define SCST_SYSFS_BLOCK_SIZE PAGE_SIZE
++
++#define SCST_PR_DIR "/var/lib/scst/pr"
++
++#define TID_COMMON_SIZE 24
++
++#define SCST_SYSFS_KEY_MARK "[key]"
++
++#define SCST_MIN_REL_TGT_ID 1
++#define SCST_MAX_REL_TGT_ID 65535
++
++#endif /* __SCST_CONST_H */
+diff -uprN orig/linux-2.6.36/include/scst/scst.h linux-2.6.36/include/scst/scst.h
+--- orig/linux-2.6.36/include/scst/scst.h
++++ linux-2.6.36/include/scst/scst.h
@@ -0,0 +1,3511 @@
+/*
+ * include/scst.h
@@ -963,9 +1381,9 @@ diff -uprN orig/linux-2.6.35/include/scst/scst.h linux-2.6.35/include/scst/scst.
+#define SCST_VERSION(a, b, c, d) (((a) << 24) + ((b) << 16) + ((c) << 8) + d)
+#define SCST_VERSION_CODE SCST_VERSION(2, 0, 0, 0)
+#define SCST_VERSION_STRING_SUFFIX
-+#define SCST_VERSION_STRING "2.0.0-rc3" SCST_VERSION_STRING_SUFFIX
++#define SCST_VERSION_STRING "2.0.0" SCST_VERSION_STRING_SUFFIX
+#define SCST_INTERFACE_VERSION \
-+ SCST_VERSION_STRING "$Revision: 3153 $" SCST_CONST_VERSION
++ SCST_VERSION_STRING "$Revision: 3165 $" SCST_CONST_VERSION
+
+#define SCST_LOCAL_NAME "scst_local"
+
@@ -4425,425 +4843,9 @@ diff -uprN orig/linux-2.6.35/include/scst/scst.h linux-2.6.35/include/scst/scst.
+void scst_deinit_threads(struct scst_cmd_threads *cmd_threads);
+
+#endif /* __SCST_H */
-diff -uprN orig/linux-2.6.35/include/scst/scst_const.h linux-2.6.35/include/scst/scst_const.h
---- orig/linux-2.6.35/include/scst/scst_const.h
-+++ linux-2.6.35/include/scst/scst_const.h
-@@ -0,0 +1,412 @@
-+/*
-+ * include/scst_const.h
-+ *
-+ * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
-+ * Copyright (C) 2007 - 2010 ID7 Ltd.
-+ *
-+ * Contains common SCST constants.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation, version 2
-+ * of the License.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ */
-+
-+#ifndef __SCST_CONST_H
-+#define __SCST_CONST_H
-+
-+#ifndef GENERATING_UPSTREAM_PATCH
-+/*
-+ * Include <linux/version.h> only when not converting this header file into
-+ * a patch for upstream review because only then the symbol LINUX_VERSION_CODE
-+ * is needed.
-+ */
-+#include <linux/version.h>
-+#endif
-+#include <scsi/scsi.h>
-+
-+#define SCST_CONST_VERSION "$Revision: 2605 $"
-+
-+/*** Shared constants between user and kernel spaces ***/
-+
-+/* Max size of CDB */
-+#define SCST_MAX_CDB_SIZE 16
-+
-+/* Max size of various names */
-+#define SCST_MAX_NAME 50
-+
-+/* Max size of external names, like initiator name */
-+#define SCST_MAX_EXTERNAL_NAME 256
-+
-+/*
-+ * Size of sense sufficient to carry standard sense data.
-+ * Warning! It's allocated on stack!
-+ */
-+#define SCST_STANDARD_SENSE_LEN 18
-+
-+/* Max size of sense */
-+#define SCST_SENSE_BUFFERSIZE 96
-+
-+/*************************************************************
-+ ** Allowed delivery statuses for cmd's delivery_status
-+ *************************************************************/
-+
-+#define SCST_CMD_DELIVERY_SUCCESS 0
-+#define SCST_CMD_DELIVERY_FAILED -1
-+#define SCST_CMD_DELIVERY_ABORTED -2
-+
-+/*************************************************************
-+ ** Values for task management functions
-+ *************************************************************/
-+#define SCST_ABORT_TASK 0
-+#define SCST_ABORT_TASK_SET 1
-+#define SCST_CLEAR_ACA 2
-+#define SCST_CLEAR_TASK_SET 3
-+#define SCST_LUN_RESET 4
-+#define SCST_TARGET_RESET 5
-+
-+/** SCST extensions **/
-+
-+/*
-+ * Notifies about I_T nexus loss event in the corresponding session.
-+ * Aborts all tasks there, resets the reservation, if any, and sets
-+ * up the I_T Nexus loss UA.
-+ */
-+#define SCST_NEXUS_LOSS_SESS 6
-+
-+/* Aborts all tasks in the corresponding session */
-+#define SCST_ABORT_ALL_TASKS_SESS 7
-+
-+/*
-+ * Notifies about I_T nexus loss event. Aborts all tasks in all sessions
-+ * of the tgt, resets the reservations, if any, and sets up the I_T Nexus
-+ * loss UA.
-+ */
-+#define SCST_NEXUS_LOSS 8
-+
-+/* Aborts all tasks in all sessions of the tgt */
-+#define SCST_ABORT_ALL_TASKS 9
-+
-+/*
-+ * Internal TM command issued by SCST in scst_unregister_session(). It is the
-+ * same as SCST_NEXUS_LOSS_SESS, except:
-+ * - it doesn't call task_mgmt_affected_cmds_done()
-+ * - it doesn't call task_mgmt_fn_done()
-+ * - it doesn't queue NEXUS LOSS UA.
-+ *
-+ * Target drivers must NEVER use it!!
-+ */
-+#define SCST_UNREG_SESS_TM 10
-+
-+/*
-+ * Internal TM command issued by SCST in scst_pr_abort_reg(). It aborts all
-+ * tasks from mcmd->origin_pr_cmd->tgt_dev, except mcmd->origin_pr_cmd.
-+ * Additionally:
-+ * - it signals pr_aborting_cmpl completion when all affected
-+ * commands marked as aborted.
-+ * - it doesn't call task_mgmt_affected_cmds_done()
-+ * - it doesn't call task_mgmt_fn_done()
-+ * - it calls mcmd->origin_pr_cmd->scst_cmd_done() when all affected
-+ * commands aborted.
-+ *
-+ * Target drivers must NEVER use it!!
-+ */
-+#define SCST_PR_ABORT_ALL 11
-+
-+/*************************************************************
-+ ** Values for mgmt cmd's status field. Codes taken from iSCSI
-+ *************************************************************/
-+#define SCST_MGMT_STATUS_SUCCESS 0
-+#define SCST_MGMT_STATUS_TASK_NOT_EXIST -1
-+#define SCST_MGMT_STATUS_LUN_NOT_EXIST -2
-+#define SCST_MGMT_STATUS_FN_NOT_SUPPORTED -5
-+#define SCST_MGMT_STATUS_REJECTED -255
-+#define SCST_MGMT_STATUS_FAILED -129
-+
-+/*************************************************************
-+ ** SCSI task attribute queue types
-+ *************************************************************/
-+enum scst_cmd_queue_type {
-+ SCST_CMD_QUEUE_UNTAGGED = 0,
-+ SCST_CMD_QUEUE_SIMPLE,
-+ SCST_CMD_QUEUE_ORDERED,
-+ SCST_CMD_QUEUE_HEAD_OF_QUEUE,
-+ SCST_CMD_QUEUE_ACA
-+};
-+
-+/*************************************************************
-+ ** CDB flags
-+ **
-+ ** Implicit ordered used for commands which need calm environment
-+ ** without any simultaneous activities. For instance, for MODE
-+ ** SELECT it is needed to correctly generate its UA.
-+ *************************************************************/
-+enum scst_cdb_flags {
-+ SCST_TRANSFER_LEN_TYPE_FIXED = 0x0001,
-+ SCST_SMALL_TIMEOUT = 0x0002,
-+ SCST_LONG_TIMEOUT = 0x0004,
-+ SCST_UNKNOWN_LENGTH = 0x0008,
-+ SCST_INFO_VALID = 0x0010, /* must be single bit */
-+ SCST_VERIFY_BYTCHK_MISMATCH_ALLOWED = 0x0020,
-+ SCST_IMPLICIT_HQ = 0x0040,
-+ SCST_IMPLICIT_ORDERED = 0x0080, /* ToDo: remove it's nonsense */
-+ SCST_SKIP_UA = 0x0100,
-+ SCST_WRITE_MEDIUM = 0x0200,
-+ SCST_LOCAL_CMD = 0x0400,
-+ SCST_FULLY_LOCAL_CMD = 0x0800,
-+ SCST_REG_RESERVE_ALLOWED = 0x1000,
-+ SCST_WRITE_EXCL_ALLOWED = 0x2000,
-+ SCST_EXCL_ACCESS_ALLOWED = 0x4000,
-+#ifdef CONFIG_SCST_TEST_IO_IN_SIRQ
-+ SCST_TEST_IO_IN_SIRQ_ALLOWED = 0x8000,
-+#endif
-+};
-+
-+/*************************************************************
-+ ** Data direction aliases. Changing it don't forget to change
-+ ** scst_to_tgt_dma_dir as well!!
-+ *************************************************************/
-+#define SCST_DATA_UNKNOWN 0
-+#define SCST_DATA_WRITE 1
-+#define SCST_DATA_READ 2
-+#define SCST_DATA_BIDI (SCST_DATA_WRITE | SCST_DATA_READ)
-+#define SCST_DATA_NONE 4
-+
-+/*************************************************************
-+ ** Default suffix for targets with NULL names
-+ *************************************************************/
-+#define SCST_DEFAULT_TGT_NAME_SUFFIX "_target_"
-+
-+/*************************************************************
-+ ** Sense manipulation and examination
-+ *************************************************************/
-+#define SCST_LOAD_SENSE(key_asc_ascq) key_asc_ascq
-+
-+#define SCST_SENSE_VALID(sense) ((sense != NULL) && \
-+ ((((const uint8_t *)(sense))[0] & 0x70) == 0x70))
-+
-+#define SCST_NO_SENSE(sense) ((sense != NULL) && \
-+ (((const uint8_t *)(sense))[2] == 0))
-+
-+/*************************************************************
-+ ** Sense data for the appropriate errors. Can be used with
-+ ** scst_set_cmd_error()
-+ *************************************************************/
-+#define scst_sense_no_sense NO_SENSE, 0x00, 0
-+#define scst_sense_hardw_error HARDWARE_ERROR, 0x44, 0
-+#define scst_sense_aborted_command ABORTED_COMMAND, 0x00, 0
-+#define scst_sense_invalid_opcode ILLEGAL_REQUEST, 0x20, 0
-+#define scst_sense_invalid_field_in_cdb ILLEGAL_REQUEST, 0x24, 0
-+#define scst_sense_invalid_field_in_parm_list ILLEGAL_REQUEST, 0x26, 0
-+#define scst_sense_parameter_value_invalid ILLEGAL_REQUEST, 0x26, 2
-+#define scst_sense_invalid_release ILLEGAL_REQUEST, 0x26, 4
-+#define scst_sense_parameter_list_length_invalid \
-+ ILLEGAL_REQUEST, 0x1A, 0
-+#define scst_sense_reset_UA UNIT_ATTENTION, 0x29, 0
-+#define scst_sense_nexus_loss_UA UNIT_ATTENTION, 0x29, 0x7
-+#define scst_sense_saving_params_unsup ILLEGAL_REQUEST, 0x39, 0
-+#define scst_sense_lun_not_supported ILLEGAL_REQUEST, 0x25, 0
-+#define scst_sense_data_protect DATA_PROTECT, 0x00, 0
-+#define scst_sense_miscompare_error MISCOMPARE, 0x1D, 0
-+#define scst_sense_block_out_range_error ILLEGAL_REQUEST, 0x21, 0
-+#define scst_sense_medium_changed_UA UNIT_ATTENTION, 0x28, 0
-+#define scst_sense_read_error MEDIUM_ERROR, 0x11, 0
-+#define scst_sense_write_error MEDIUM_ERROR, 0x03, 0
-+#define scst_sense_not_ready NOT_READY, 0x04, 0x10
-+#define scst_sense_invalid_message ILLEGAL_REQUEST, 0x49, 0
-+#define scst_sense_cleared_by_another_ini_UA UNIT_ATTENTION, 0x2F, 0
-+#define scst_sense_capacity_data_changed UNIT_ATTENTION, 0x2A, 0x9
-+#define scst_sense_reservation_preempted UNIT_ATTENTION, 0x2A, 0x03
-+#define scst_sense_reservation_released UNIT_ATTENTION, 0x2A, 0x04
-+#define scst_sense_registrations_preempted UNIT_ATTENTION, 0x2A, 0x05
-+#define scst_sense_reported_luns_data_changed UNIT_ATTENTION, 0x3F, 0xE
-+#define scst_sense_inquery_data_changed UNIT_ATTENTION, 0x3F, 0x3
-+
-+/*************************************************************
-+ * SCSI opcodes not listed anywhere else
-+ *************************************************************/
-+#define REPORT_DEVICE_IDENTIFIER 0xA3
-+#define INIT_ELEMENT_STATUS 0x07
-+#define INIT_ELEMENT_STATUS_RANGE 0x37
-+#define PREVENT_ALLOW_MEDIUM 0x1E
-+#define READ_ATTRIBUTE 0x8C
-+#define REQUEST_VOLUME_ADDRESS 0xB5
-+#define WRITE_ATTRIBUTE 0x8D
-+#define WRITE_VERIFY_16 0x8E
-+#define VERIFY_6 0x13
-+#ifndef VERIFY_12
-+#define VERIFY_12 0xAF
-+#endif
-+#ifndef GENERATING_UPSTREAM_PATCH
-+/*
-+ * The constants below have been defined in the kernel header <scsi/scsi.h>
-+ * and hence are not needed when this header file is included in kernel code.
-+ * The definitions below are only used when this header file is included during
-+ * compilation of SCST's user space components.
-+ */
-+#ifndef READ_16
-+#define READ_16 0x88
-+#endif
-+#ifndef WRITE_16
-+#define WRITE_16 0x8a
-+#endif
-+#ifndef VERIFY_16
-+#define VERIFY_16 0x8f
-+#endif
-+#ifndef SERVICE_ACTION_IN
-+#define SERVICE_ACTION_IN 0x9e
-+#endif
-+#ifndef SAI_READ_CAPACITY_16
-+/* values for service action in */
-+#define SAI_READ_CAPACITY_16 0x10
-+#endif
-+#endif
-+#ifndef GENERATING_UPSTREAM_PATCH
-+#ifndef REPORT_LUNS
-+#define REPORT_LUNS 0xa0
-+#endif
-+#endif
-+
-+/*************************************************************
-+ ** SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
-+ ** T10/1561-D Revision 4 Draft dated 7th November 2002.
-+ *************************************************************/
-+#define SAM_STAT_GOOD 0x00
-+#define SAM_STAT_CHECK_CONDITION 0x02
-+#define SAM_STAT_CONDITION_MET 0x04
-+#define SAM_STAT_BUSY 0x08
-+#define SAM_STAT_INTERMEDIATE 0x10
-+#define SAM_STAT_INTERMEDIATE_CONDITION_MET 0x14
-+#define SAM_STAT_RESERVATION_CONFLICT 0x18
-+#define SAM_STAT_COMMAND_TERMINATED 0x22 /* obsolete in SAM-3 */
-+#define SAM_STAT_TASK_SET_FULL 0x28
-+#define SAM_STAT_ACA_ACTIVE 0x30
-+#define SAM_STAT_TASK_ABORTED 0x40
-+
-+/*************************************************************
-+ ** Control byte field in CDB
-+ *************************************************************/
-+#define CONTROL_BYTE_LINK_BIT 0x01
-+#define CONTROL_BYTE_NACA_BIT 0x04
-+
-+/*************************************************************
-+ ** Byte 1 in INQUIRY CDB
-+ *************************************************************/
-+#define SCST_INQ_EVPD 0x01
-+
-+/*************************************************************
-+ ** Byte 3 in Standard INQUIRY data
-+ *************************************************************/
-+#define SCST_INQ_BYTE3 3
-+
-+#define SCST_INQ_NORMACA_BIT 0x20
-+
-+/*************************************************************
-+ ** Byte 2 in RESERVE_10 CDB
-+ *************************************************************/
-+#define SCST_RES_3RDPTY 0x10
-+#define SCST_RES_LONGID 0x02
-+
-+/*************************************************************
-+ ** Values for the control mode page TST field
-+ *************************************************************/
-+#define SCST_CONTR_MODE_ONE_TASK_SET 0
-+#define SCST_CONTR_MODE_SEP_TASK_SETS 1
-+
-+/*******************************************************************
-+ ** Values for the control mode page QUEUE ALGORITHM MODIFIER field
-+ *******************************************************************/
-+#define SCST_CONTR_MODE_QUEUE_ALG_RESTRICTED_REORDER 0
-+#define SCST_CONTR_MODE_QUEUE_ALG_UNRESTRICTED_REORDER 1
-+
-+/*************************************************************
-+ ** Values for the control mode page D_SENSE field
-+ *************************************************************/
-+#define SCST_CONTR_MODE_FIXED_SENSE 0
-+#define SCST_CONTR_MODE_DESCR_SENSE 1
-+
-+/*************************************************************
-+ ** TransportID protocol identifiers
-+ *************************************************************/
-+
-+#define SCSI_TRANSPORTID_PROTOCOLID_FCP2 0
-+#define SCSI_TRANSPORTID_PROTOCOLID_SPI5 1
-+#define SCSI_TRANSPORTID_PROTOCOLID_SRP 4
-+#define SCSI_TRANSPORTID_PROTOCOLID_ISCSI 5
-+#define SCSI_TRANSPORTID_PROTOCOLID_SAS 6
-+
-+/*************************************************************
-+ ** Misc SCSI constants
-+ *************************************************************/
-+#define SCST_SENSE_ASC_UA_RESET 0x29
-+#define BYTCHK 0x02
-+#define POSITION_LEN_SHORT 20
-+#define POSITION_LEN_LONG 32
-+
-+/*************************************************************
-+ ** Various timeouts
-+ *************************************************************/
-+#define SCST_DEFAULT_TIMEOUT (60 * HZ)
-+
-+#define SCST_GENERIC_CHANGER_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_CHANGER_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_GENERIC_PROCESSOR_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_PROCESSOR_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_GENERIC_TAPE_SMALL_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_TAPE_REG_TIMEOUT (900 * HZ)
-+#define SCST_GENERIC_TAPE_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_GENERIC_MODISK_SMALL_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_MODISK_REG_TIMEOUT (900 * HZ)
-+#define SCST_GENERIC_MODISK_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_GENERIC_DISK_SMALL_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_DISK_REG_TIMEOUT (60 * HZ)
-+#define SCST_GENERIC_DISK_LONG_TIMEOUT (3600 * HZ)
-+
-+#define SCST_GENERIC_RAID_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_RAID_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_GENERIC_CDROM_SMALL_TIMEOUT (3 * HZ)
-+#define SCST_GENERIC_CDROM_REG_TIMEOUT (900 * HZ)
-+#define SCST_GENERIC_CDROM_LONG_TIMEOUT (14000 * HZ)
-+
-+#define SCST_MAX_OTHER_TIMEOUT (14000 * HZ)
-+
-+/*************************************************************
-+ ** I/O grouping attribute string values. Must match constants
-+ ** w/o '_STR' suffix!
-+ *************************************************************/
-+#define SCST_IO_GROUPING_AUTO_STR "auto"
-+#define SCST_IO_GROUPING_THIS_GROUP_ONLY_STR "this_group_only"
-+#define SCST_IO_GROUPING_NEVER_STR "never"
-+
-+/*************************************************************
-+ ** Threads pool type attribute string values.
-+ ** Must match scst_dev_type_threads_pool_type!
-+ *************************************************************/
-+#define SCST_THREADS_POOL_PER_INITIATOR_STR "per_initiator"
-+#define SCST_THREADS_POOL_SHARED_STR "shared"
-+
-+/*************************************************************
-+ ** Misc constants
-+ *************************************************************/
-+#define SCST_SYSFS_BLOCK_SIZE PAGE_SIZE
-+
-+#define SCST_PR_DIR "/var/lib/scst/pr"
-+
-+#define TID_COMMON_SIZE 24
-+
-+#define SCST_SYSFS_KEY_MARK "[key]"
-+
-+#define SCST_MIN_REL_TGT_ID 1
-+#define SCST_MAX_REL_TGT_ID 65535
-+
-+#endif /* __SCST_CONST_H */
-diff -upkr -X linux-2.6.35/Documentation/dontdiff linux-2.6.35/drivers/Kconfig linux-2.6.35/drivers/Kconfig
---- orig/linux-2.6.35/drivers/Kconfig 01:51:29.000000000 +0400
-+++ linux-2.6.35/drivers/Kconfig 14:14:46.000000000 +0400
+diff -upkr -X linux-2.6.36/Documentation/dontdiff linux-2.6.36/drivers/Kconfig linux-2.6.36/drivers/Kconfig
+--- orig/linux-2.6.36/drivers/Kconfig 01:51:29.000000000 +0400
++++ linux-2.6.36/drivers/Kconfig 14:14:46.000000000 +0400
@@ -22,6 +22,8 @@ source "drivers/ide/Kconfig"
source "drivers/scsi/Kconfig"
@@ -4853,21 +4855,18 @@ diff -upkr -X linux-2.6.35/Documentation/dontdiff linux-2.6.35/drivers/Kconfig l
source "drivers/ata/Kconfig"
source "drivers/md/Kconfig"
-diff -upkr -X linux-2.6.35/Documentation/dontdiff linux-2.6.35/drivers/Makefile linux-2.6.35/drivers/Makefile
---- orig/linux-2.6.35/drivers/Makefile 01:51:29.000000000 +0400
-+++ linux-2.6.35/drivers/Makefile 14:15:29.000000000 +0400
-@@ -43,6 +43,7 @@ obj-$(CONFIG_ATM) += atm/
- obj-y += macintosh/
- obj-$(CONFIG_IDE) += ide/
- obj-$(CONFIG_SCSI) += scsi/
+diff -upkr -X linux-2.6.36/Documentation/dontdiff linux-2.6.36/drivers/Makefile linux-2.6.36/drivers/Makefile
+--- orig/linux-2.6.36/drivers/Makefile 15:40:04.000000000 +0200
++++ linux-2.6.36/drivers/Makefile 15:40:20.000000000 +0200
+@@ -113,3 +113,4 @@ obj-$(CONFIG_VLYNQ) += vlynq/
+ obj-$(CONFIG_STAGING) += staging/
+ obj-y += platform/
+ obj-y += ieee802154/
+obj-$(CONFIG_SCST) += scst/
- obj-$(CONFIG_ATA) += ata/
- obj-y += net/
- obj-$(CONFIG_ATM) += atm/
-diff -uprN orig/linux-2.6.35/drivers/scst/Kconfig linux-2.6.35/drivers/scst/Kconfig
---- orig/linux-2.6.35/drivers/scst/Kconfig
-+++ linux-2.6.35/drivers/scst/Kconfig
-@@ -0,0 +1,255 @@
+diff -uprN orig/linux-2.6.36/drivers/scst/Kconfig linux-2.6.36/drivers/scst/Kconfig
+--- orig/linux-2.6.36/drivers/scst/Kconfig
++++ linux-2.6.36/drivers/scst/Kconfig
+@@ -0,0 +1,254 @@
+menu "SCSI target (SCST) support"
+
+config SCST
@@ -5118,14 +5117,13 @@ diff -uprN orig/linux-2.6.35/drivers/scst/Kconfig linux-2.6.35/drivers/scst/Kcon
+
+ If unsure, say "N".
+
-+source "drivers/scst/fcst/Kconfig"
+source "drivers/scst/iscsi-scst/Kconfig"
+source "drivers/scst/srpt/Kconfig"
+
+endmenu
-diff -uprN orig/linux-2.6.35/drivers/scst/Makefile linux-2.6.35/drivers/scst/Makefile
---- orig/linux-2.6.35/drivers/scst/Makefile
-+++ linux-2.6.35/drivers/scst/Makefile
+diff -uprN orig/linux-2.6.36/drivers/scst/Makefile linux-2.6.36/drivers/scst/Makefile
+--- orig/linux-2.6.36/drivers/scst/Makefile
++++ linux-2.6.36/drivers/scst/Makefile
@@ -0,0 +1,12 @@
+ccflags-y += -Wno-unused-parameter
+
@@ -5137,11 +5135,11 @@ diff -uprN orig/linux-2.6.35/drivers/scst/Makefile linux-2.6.35/drivers/scst/Mak
+scst-y += scst_mem.o
+scst-y += scst_debug.o
+
-+obj-$(CONFIG_SCST) += scst.o dev_handlers/ fcst/ iscsi-scst/ qla2xxx-target/ \
++obj-$(CONFIG_SCST) += scst.o dev_handlers/ iscsi-scst/ qla2xxx-target/ \
+ srpt/ scst_local/
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_lib.c linux-2.6.35/drivers/scst/scst_lib.c
---- orig/linux-2.6.35/drivers/scst/scst_lib.c
-+++ linux-2.6.35/drivers/scst/scst_lib.c
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_lib.c linux-2.6.36/drivers/scst/scst_lib.c
+--- orig/linux-2.6.36/drivers/scst/scst_lib.c
++++ linux-2.6.36/drivers/scst/scst_lib.c
@@ -0,0 +1,7361 @@
+/*
+ * scst_lib.c
@@ -12504,9 +12502,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_lib.c linux-2.6.35/drivers/scst/s
+}
+
+#endif /* CONFIG_SCST_MEASURE_LATENCY */
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_main.c linux-2.6.35/drivers/scst/scst_main.c
---- orig/linux-2.6.35/drivers/scst/scst_main.c
-+++ linux-2.6.35/drivers/scst/scst_main.c
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_main.c linux-2.6.36/drivers/scst/scst_main.c
+--- orig/linux-2.6.36/drivers/scst/scst_main.c
++++ linux-2.6.36/drivers/scst/scst_main.c
@@ -0,0 +1,2195 @@
+/*
+ * scst_main.c
@@ -14703,9 +14701,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_main.c linux-2.6.35/drivers/scst/
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("SCSI target core");
+MODULE_VERSION(SCST_VERSION_STRING);
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_module.c linux-2.6.35/drivers/scst/scst_module.c
---- orig/linux-2.6.35/drivers/scst/scst_module.c
-+++ linux-2.6.35/drivers/scst/scst_module.c
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_module.c linux-2.6.36/drivers/scst/scst_module.c
+--- orig/linux-2.6.36/drivers/scst/scst_module.c
++++ linux-2.6.36/drivers/scst/scst_module.c
@@ -0,0 +1,69 @@
+/*
+ * scst_module.c
@@ -14776,9 +14774,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_module.c linux-2.6.35/drivers/scs
+
+module_init(init_this_scst_driver);
+module_exit(exit_this_scst_driver);
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_pres.c linux-2.6.35/drivers/scst/scst_pres.c
---- orig/linux-2.6.35/drivers/scst/scst_pres.c
-+++ linux-2.6.35/drivers/scst/scst_pres.c
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_pres.c linux-2.6.36/drivers/scst/scst_pres.c
+--- orig/linux-2.6.36/drivers/scst/scst_pres.c
++++ linux-2.6.36/drivers/scst/scst_pres.c
@@ -0,0 +1,2648 @@
+/*
+ * scst_pres.c
@@ -17428,9 +17426,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_pres.c linux-2.6.35/drivers/scst/
+ TRACE_EXIT();
+ return;
+}
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_pres.h linux-2.6.35/drivers/scst/scst_pres.h
---- orig/linux-2.6.35/drivers/scst/scst_pres.h
-+++ linux-2.6.35/drivers/scst/scst_pres.h
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_pres.h linux-2.6.36/drivers/scst/scst_pres.h
+--- orig/linux-2.6.36/drivers/scst/scst_pres.h
++++ linux-2.6.36/drivers/scst/scst_pres.h
@@ -0,0 +1,170 @@
+/*
+ * scst_pres.c
@@ -17602,9 +17600,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_pres.h linux-2.6.35/drivers/scst/
+#endif
+
+#endif /* SCST_PRES_H_ */
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_priv.h linux-2.6.35/drivers/scst/scst_priv.h
---- orig/linux-2.6.35/drivers/scst/scst_priv.h
-+++ linux-2.6.35/drivers/scst/scst_priv.h
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_priv.h linux-2.6.36/drivers/scst/scst_priv.h
+--- orig/linux-2.6.36/drivers/scst/scst_priv.h
++++ linux-2.6.36/drivers/scst/scst_priv.h
@@ -0,0 +1,599 @@
+/*
+ * scst_priv.h
@@ -18205,10 +18203,10 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_priv.h linux-2.6.35/drivers/scst/
+#endif /* CONFIG_SCST_MEASURE_LATENCY */
+
+#endif /* __SCST_PRIV_H */
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_sysfs.c linux-2.6.35/drivers/scst/scst_sysfs.c
---- orig/linux-2.6.35/drivers/scst/scst_sysfs.c
-+++ linux-2.6.35/drivers/scst/scst_sysfs.c
-@@ -0,0 +1,5292 @@
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_sysfs.c linux-2.6.36/drivers/scst/scst_sysfs.c
+--- orig/linux-2.6.36/drivers/scst/scst_sysfs.c
++++ linux-2.6.36/drivers/scst/scst_sysfs.c
+@@ -0,0 +1,5291 @@
+/*
+ * scst_sysfs.c
+ *
@@ -21813,7 +21811,6 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_sysfs.c linux-2.6.35/drivers/scst
+ }
+ strlcpy((char *)attr->attr.name, acn->name, len);
+
-+ attr->attr.owner = THIS_MODULE;
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+ attr->attr.key = &__key;
+#endif
@@ -23501,9 +23498,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_sysfs.c linux-2.6.35/drivers/scst
+ TRACE_EXIT();
+ return;
+}
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_targ.c linux-2.6.35/drivers/scst/scst_targ.c
---- orig/linux-2.6.35/drivers/scst/scst_targ.c
-+++ linux-2.6.35/drivers/scst/scst_targ.c
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_targ.c linux-2.6.36/drivers/scst/scst_targ.c
+--- orig/linux-2.6.36/drivers/scst/scst_targ.c
++++ linux-2.6.36/drivers/scst/scst_targ.c
@@ -0,0 +1,6582 @@
+/*
+ * scst_targ.c
@@ -30087,9 +30084,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_targ.c linux-2.6.35/drivers/scst/
+ return cmd;
+}
+EXPORT_SYMBOL(scst_find_cmd_by_tag);
-diff -uprN orig/linux-2.6.35/include/scst/scst_debug.h linux-2.6.35/include/scst/scst_debug.h
---- orig/linux-2.6.35/include/scst/scst_debug.h
-+++ linux-2.6.35/include/scst/scst_debug.h
+diff -uprN orig/linux-2.6.36/include/scst/scst_debug.h linux-2.6.36/include/scst/scst_debug.h
+--- orig/linux-2.6.36/include/scst/scst_debug.h
++++ linux-2.6.36/include/scst/scst_debug.h
@@ -0,0 +1,350 @@
+/*
+ * include/scst_debug.h
@@ -30441,9 +30438,9 @@ diff -uprN orig/linux-2.6.35/include/scst/scst_debug.h linux-2.6.35/include/scst
+#endif
+
+#endif /* __SCST_DEBUG_H */
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_debug.c linux-2.6.35/drivers/scst/scst_debug.c
---- orig/linux-2.6.35/drivers/scst/scst_debug.c
-+++ linux-2.6.35/drivers/scst/scst_debug.c
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_debug.c linux-2.6.36/drivers/scst/scst_debug.c
+--- orig/linux-2.6.36/drivers/scst/scst_debug.c
++++ linux-2.6.36/drivers/scst/scst_debug.c
@@ -0,0 +1,223 @@
+/*
+ * scst_debug.c
@@ -30668,9 +30665,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_debug.c linux-2.6.35/drivers/scst
+}
+
+#endif /* CONFIG_SCST_DEBUG || CONFIG_SCST_TRACING */
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_proc.c linux-2.6.35/drivers/scst/scst_proc.c
---- orig/linux-2.6.35/drivers/scst/scst_proc.c
-+++ linux-2.6.35/drivers/scst/scst_proc.c
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_proc.c linux-2.6.36/drivers/scst/scst_proc.c
+--- orig/linux-2.6.36/drivers/scst/scst_proc.c
++++ linux-2.6.36/drivers/scst/scst_proc.c
@@ -0,0 +1,2703 @@
+/*
+ * scst_proc.c
@@ -33375,9 +33372,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_proc.c linux-2.6.35/drivers/scst/
+ return dtt->proc_dev_type_root;
+}
+EXPORT_SYMBOL_GPL(scst_proc_get_dev_type_root);
-diff -uprN orig/linux-2.6.35/include/scst/scst_sgv.h linux-2.6.35/include/scst/scst_sgv.h
---- orig/linux-2.6.35/include/scst/scst_sgv.h
-+++ linux-2.6.35/include/scst/scst_sgv.h
+diff -uprN orig/linux-2.6.36/include/scst/scst_sgv.h linux-2.6.36/include/scst/scst_sgv.h
+--- orig/linux-2.6.36/include/scst/scst_sgv.h
++++ linux-2.6.36/include/scst/scst_sgv.h
@@ -0,0 +1,97 @@
+/*
+ * include/scst_sgv.h
@@ -33476,9 +33473,9 @@ diff -uprN orig/linux-2.6.35/include/scst/scst_sgv.h linux-2.6.35/include/scst/s
+void scst_init_mem_lim(struct scst_mem_lim *mem_lim);
+
+#endif /* __SCST_SGV_H */
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_mem.h linux-2.6.35/drivers/scst/scst_mem.h
---- orig/linux-2.6.35/drivers/scst/scst_mem.h
-+++ linux-2.6.35/drivers/scst/scst_mem.h
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_mem.h linux-2.6.36/drivers/scst/scst_mem.h
+--- orig/linux-2.6.36/drivers/scst/scst_mem.h
++++ linux-2.6.36/drivers/scst/scst_mem.h
@@ -0,0 +1,150 @@
+/*
+ * scst_mem.h
@@ -33630,9 +33627,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_mem.h linux-2.6.35/drivers/scst/s
+void scst_sgv_pool_use_norm(struct scst_tgt_dev *tgt_dev);
+void scst_sgv_pool_use_norm_clust(struct scst_tgt_dev *tgt_dev);
+void scst_sgv_pool_use_dma(struct scst_tgt_dev *tgt_dev);
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_mem.c linux-2.6.35/drivers/scst/scst_mem.c
---- orig/linux-2.6.35/drivers/scst/scst_mem.c
-+++ linux-2.6.35/drivers/scst/scst_mem.c
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_mem.c linux-2.6.36/drivers/scst/scst_mem.c
+--- orig/linux-2.6.36/drivers/scst/scst_mem.c
++++ linux-2.6.36/drivers/scst/scst_mem.c
@@ -0,0 +1,1879 @@
+/*
+ * scst_mem.c
@@ -35513,9 +35510,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_mem.c linux-2.6.35/drivers/scst/s
+ return count;
+}
+
-diff -uprN orig/linux-2.6.35/Documentation/scst/sgv_cache.txt linux-2.6.35/Documentation/scst/sgv_cache.txt
---- orig/linux-2.6.35/Documentation/scst/sgv_cache.txt
-+++ linux-2.6.35/Documentation/scst/sgv_cache.txt
+diff -uprN orig/linux-2.6.36/Documentation/scst/sgv_cache.txt linux-2.6.36/Documentation/scst/sgv_cache.txt
+--- orig/linux-2.6.36/Documentation/scst/sgv_cache.txt
++++ linux-2.6.36/Documentation/scst/sgv_cache.txt
@@ -0,0 +1,224 @@
+ SCST SGV CACHE.
+
@@ -35741,9 +35738,9 @@ diff -uprN orig/linux-2.6.35/Documentation/scst/sgv_cache.txt linux-2.6.35/Docum
+
+Runtime information and statistics is available in /sys/kernel/scst_tgt/sgv.
+
-diff -uprN orig/linux-2.6.35/include/scst/scst_user.h linux-2.6.35/include/scst/scst_user.h
---- orig/linux-2.6.35/include/scst/scst_user.h
-+++ linux-2.6.35/include/scst/scst_user.h
+diff -uprN orig/linux-2.6.36/include/scst/scst_user.h linux-2.6.36/include/scst/scst_user.h
+--- orig/linux-2.6.36/include/scst/scst_user.h
++++ linux-2.6.36/include/scst/scst_user.h
@@ -0,0 +1,321 @@
+/*
+ * include/scst_user.h
@@ -35773,9 +35770,9 @@ diff -uprN orig/linux-2.6.35/include/scst/scst_user.h linux-2.6.35/include/scst/
+
+#define DEV_USER_NAME "scst_user"
+#define DEV_USER_PATH "/dev/"
-+#define DEV_USER_VERSION_NAME "2.0.0-rc3"
++#define DEV_USER_VERSION_NAME "2.0.0"
+#define DEV_USER_VERSION \
-+ DEV_USER_VERSION_NAME "$Revision: 2091 $" SCST_CONST_VERSION
++ DEV_USER_VERSION_NAME "$Revision: 3165 $" SCST_CONST_VERSION
+
+#define SCST_USER_PARSE_STANDARD 0
+#define SCST_USER_PARSE_CALL 1
@@ -36066,9 +36063,9 @@ diff -uprN orig/linux-2.6.35/include/scst/scst_user.h linux-2.6.35/include/scst/
+ _IOWR('s', UCMD_STATE_TM_EXECING, struct scst_user_tm)
+
+#endif /* __SCST_USER_H */
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_user.c linux-2.6.35/drivers/scst/dev_handlers/scst_user.c
---- orig/linux-2.6.35/drivers/scst/dev_handlers/scst_user.c
-+++ linux-2.6.35/drivers/scst/dev_handlers/scst_user.c
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_user.c linux-2.6.36/drivers/scst/dev_handlers/scst_user.c
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_user.c
++++ linux-2.6.36/drivers/scst/dev_handlers/scst_user.c
@@ -0,0 +1,3738 @@
+/*
+ * scst_user.c
@@ -39808,10 +39805,10 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_user.c linux-2.6.35/
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("User space device handler for SCST");
+MODULE_VERSION(SCST_VERSION_STRING);
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c
---- orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c
-+++ linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c
-@@ -0,0 +1,4160 @@
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.36/drivers/scst/dev_handlers/scst_vdisk.c
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_vdisk.c
++++ linux-2.6.36/drivers/scst/dev_handlers/scst_vdisk.c
+@@ -0,0 +1,4226 @@
+/*
+ * scst_vdisk.c
+ *
@@ -40028,9 +40025,13 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ char *filename; /* File name, protected by
+ scst_mutex and suspended activities */
+ uint16_t command_set_version;
++
++ /* All 4 protected by vdisk_serial_rwlock */
+ unsigned int t10_dev_id_set:1; /* true if t10_dev_id manually set */
++ unsigned int usn_set:1; /* true if usn manually set */
+ char t10_dev_id[16+8+2]; /* T10 device ID */
+ char usn[MAX_USN_LEN];
++
+ struct scst_device *dev;
+ struct list_head vdev_list_entry;
+
@@ -40114,6 +40115,8 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ struct kobj_attribute *attr, const char *buf, size_t count);
+static ssize_t vdev_sysfs_t10_dev_id_show(struct kobject *kobj,
+ struct kobj_attribute *attr, char *buf);
++static ssize_t vdev_sysfs_usn_store(struct kobject *kobj,
++ struct kobj_attribute *attr, const char *buf, size_t count);
+static ssize_t vdev_sysfs_usn_show(struct kobject *kobj,
+ struct kobj_attribute *attr, char *buf);
+
@@ -40142,7 +40145,7 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ __ATTR(t10_dev_id, S_IWUSR|S_IRUGO, vdev_sysfs_t10_dev_id_show,
+ vdev_sysfs_t10_dev_id_store);
+static struct kobj_attribute vdev_usn_attr =
-+ __ATTR(usn, S_IRUGO, vdev_sysfs_usn_show, NULL);
++ __ATTR(usn, S_IWUSR|S_IRUGO, vdev_sysfs_usn_show, vdev_sysfs_usn_store);
+
+static struct kobj_attribute vcdrom_filename_attr =
+ __ATTR(filename, S_IRUGO|S_IWUSR, vdev_sysfs_filename_show,
@@ -40196,7 +40199,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+
+/* Protects vdisks addition/deletion and related activities, like search */
+static DEFINE_MUTEX(scst_vdisk_mutex);
-+static DEFINE_RWLOCK(vdisk_t10_dev_id_rwlock);
++
++/* Protects devices t10_dev_id and usn */
++static DEFINE_RWLOCK(vdisk_serial_rwlock);
+
+/* Protected by scst_vdisk_mutex */
+static LIST_HEAD(vdev_list);
@@ -41024,10 +41029,12 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ resp_len = buf[3] + 4;
+ } else if (0x80 == cmd->cdb[2]) {
+ /* unit serial number */
-+ int usn_len = strlen(virt_dev->usn);
-+ buf[1] = 0x80;
++ int usn_len;
++ read_lock(&vdisk_serial_rwlock);
++ usn_len = strlen(virt_dev->usn);
+ buf[3] = usn_len;
+ strncpy(&buf[4], virt_dev->usn, usn_len);
++ read_unlock(&vdisk_serial_rwlock);
+ resp_len = buf[3] + 4;
+ } else if (0x83 == cmd->cdb[2]) {
+ /* device identification */
@@ -41042,10 +41049,10 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ else
+ memcpy(&buf[num + 4], SCST_FIO_VENDOR, 8);
+
-+ read_lock_bh(&vdisk_t10_dev_id_rwlock);
++ read_lock(&vdisk_serial_rwlock);
+ i = strlen(virt_dev->t10_dev_id);
+ memcpy(&buf[num + 12], virt_dev->t10_dev_id, i);
-+ read_unlock_bh(&vdisk_t10_dev_id_rwlock);
++ read_unlock(&vdisk_serial_rwlock);
+
+ buf[num + 3] = 8 + i;
+ num += buf[num + 3];
@@ -42330,7 +42337,7 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ /* To protect from several bios finishing simultaneously */
+ spin_lock_irqsave(&blockio_endio_lock, flags);
+
-+ if (bio->bi_rw & (1 << BIO_RW))
++ if (bio->bi_rw & REQ_WRITE)
+ scst_set_cmd_error(blockio_work->cmd,
+ SCST_LOAD_SENSE(scst_sense_write_error));
+ else
@@ -42415,9 +42422,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ * Better to fail fast w/o any local recovery
+ * and retries.
+ */
-+ bio->bi_rw |= (1 << BIO_RW_FAILFAST_DEV) |
-+ (1 << BIO_RW_FAILFAST_TRANSPORT) |
-+ (1 << BIO_RW_FAILFAST_DRIVER);
++ bio->bi_rw |= REQ_FAILFAST_DEV |
++ REQ_FAILFAST_TRANSPORT |
++ REQ_FAILFAST_DRIVER;
+#if 0 /* It could be win, but could be not, so a performance study is needed */
+ bio->bi_rw |= REQ_SYNC;
+#endif
@@ -42781,9 +42788,13 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ memcpy(virt_dev->t10_dev_id + i, dev_id_str, dev_id_len);
+ TRACE_DBG("t10_dev_id %s", virt_dev->t10_dev_id);
+
++ virt_dev->t10_dev_id_set = 1; /* temporary */
++
+ scnprintf(virt_dev->usn, sizeof(virt_dev->usn), "%llx", dev_id_num);
+ TRACE_DBG("usn %s", virt_dev->usn);
+
++ virt_dev->usn_set = 1; /* temporary */
++
+ *res_virt_dev = virt_dev;
+
+out:
@@ -43772,7 +43783,7 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ dev = container_of(kobj, struct scst_device, dev_kobj);
+ virt_dev = (struct scst_vdisk_dev *)dev->dh_priv;
+
-+ write_lock_bh(&vdisk_t10_dev_id_rwlock);
++ write_lock(&vdisk_serial_rwlock);
+
+ if ((count > sizeof(virt_dev->t10_dev_id)) ||
+ ((count == sizeof(virt_dev->t10_dev_id)) &&
@@ -43803,7 +43814,7 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ virt_dev->t10_dev_id);
+
+out_unlock:
-+ write_unlock_bh(&vdisk_t10_dev_id_rwlock);
++ write_unlock(&vdisk_serial_rwlock);
+
+ TRACE_EXIT_RES(res);
+ return res;
@@ -43821,15 +43832,64 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ dev = container_of(kobj, struct scst_device, dev_kobj);
+ virt_dev = (struct scst_vdisk_dev *)dev->dh_priv;
+
-+ read_lock_bh(&vdisk_t10_dev_id_rwlock);
++ read_lock(&vdisk_serial_rwlock);
+ pos = sprintf(buf, "%s\n%s", virt_dev->t10_dev_id,
+ virt_dev->t10_dev_id_set ? SCST_SYSFS_KEY_MARK "\n" : "");
-+ read_unlock_bh(&vdisk_t10_dev_id_rwlock);
++ read_unlock(&vdisk_serial_rwlock);
+
+ TRACE_EXIT_RES(pos);
+ return pos;
+}
+
++static ssize_t vdev_sysfs_usn_store(struct kobject *kobj,
++ struct kobj_attribute *attr, const char *buf, size_t count)
++{
++ int res, i;
++ struct scst_device *dev;
++ struct scst_vdisk_dev *virt_dev;
++
++ TRACE_ENTRY();
++
++ dev = container_of(kobj, struct scst_device, dev_kobj);
++ virt_dev = dev->dh_priv;
++
++ write_lock(&vdisk_serial_rwlock);
++
++ if ((count > sizeof(virt_dev->usn)) ||
++ ((count == sizeof(virt_dev->usn)) &&
++ (buf[count-1] != '\n'))) {
++ PRINT_ERROR("USN is too long (max %zd "
++ "characters)", sizeof(virt_dev->usn)-1);
++ res = -EINVAL;
++ goto out_unlock;
++ }
++
++ memset(virt_dev->usn, 0, sizeof(virt_dev->usn));
++ memcpy(virt_dev->usn, buf, count);
++
++ i = 0;
++ while (i < sizeof(virt_dev->usn)) {
++ if (virt_dev->usn[i] == '\n') {
++ virt_dev->usn[i] = '\0';
++ break;
++ }
++ i++;
++ }
++
++ virt_dev->usn_set = 1;
++
++ res = count;
++
++ PRINT_INFO("USN for device %s changed to %s", virt_dev->name,
++ virt_dev->usn);
++
++out_unlock:
++ write_unlock(&vdisk_serial_rwlock);
++
++ TRACE_EXIT_RES(res);
++ return res;
++}
++
+static ssize_t vdev_sysfs_usn_show(struct kobject *kobj,
+ struct kobj_attribute *attr, char *buf)
+{
@@ -43842,7 +43902,10 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+ dev = container_of(kobj, struct scst_device, dev_kobj);
+ virt_dev = (struct scst_vdisk_dev *)dev->dh_priv;
+
-+ pos = sprintf(buf, "%s\n", virt_dev->usn);
++ read_lock(&vdisk_serial_rwlock);
++ pos = sprintf(buf, "%s\n%s", virt_dev->usn,
++ virt_dev->usn_set ? SCST_SYSFS_KEY_MARK "\n" : "");
++ read_unlock(&vdisk_serial_rwlock);
+
+ TRACE_EXIT_RES(pos);
+ return pos;
@@ -43972,9 +44035,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_vdisk.c linux-2.6.35
+MODULE_DESCRIPTION("SCSI disk (type 0) and CDROM (type 5) dev handler for "
+ "SCST using files on file systems or block devices");
+MODULE_VERSION(SCST_VERSION_STRING);
-diff -uprN orig/linux-2.6.35/Documentation/scst/README.scst linux-2.6.35/Documentation/scst/README.scst
---- orig/linux-2.6.35/Documentation/scst/README.scst
-+++ linux-2.6.35/Documentation/scst/README.scst
+diff -uprN orig/linux-2.6.36/Documentation/scst/README.scst linux-2.6.36/Documentation/scst/README.scst
+--- orig/linux-2.6.36/Documentation/scst/README.scst
++++ linux-2.6.36/Documentation/scst/README.scst
@@ -0,0 +1,1445 @@
+Generic SCSI target mid-level for Linux (SCST)
+==============================================
@@ -45421,9 +45484,9 @@ diff -uprN orig/linux-2.6.35/Documentation/scst/README.scst linux-2.6.35/Documen
+ initial SCST sysfs tree implementation
+
+Vladislav Bolkhovitin <vst@vlnb.net>, http://scst.sourceforge.net
-diff -uprN orig/linux-2.6.35/Documentation/scst/SysfsRules linux-2.6.35/Documentation/scst/SysfsRules
---- orig/linux-2.6.35/Documentation/scst/SysfsRules
-+++ linux-2.6.35/Documentation/scst/SysfsRules
+diff -uprN orig/linux-2.6.36/Documentation/scst/SysfsRules linux-2.6.36/Documentation/scst/SysfsRules
+--- orig/linux-2.6.36/Documentation/scst/SysfsRules
++++ linux-2.6.36/Documentation/scst/SysfsRules
@@ -0,0 +1,933 @@
+ SCST SYSFS interface rules
+ ==========================
@@ -46358,9 +46421,9 @@ diff -uprN orig/linux-2.6.35/Documentation/scst/SysfsRules linux-2.6.35/Document
+
+3.5. If this target driver should be enabled, enable it.
+
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/Makefile linux-2.6.35/drivers/scst/dev_handlers/Makefile
---- orig/linux-2.6.35/drivers/scst/dev_handlers/Makefile
-+++ linux-2.6.35/drivers/scst/dev_handlers/Makefile
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/Makefile linux-2.6.36/drivers/scst/dev_handlers/Makefile
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/Makefile
++++ linux-2.6.36/drivers/scst/dev_handlers/Makefile
@@ -0,0 +1,14 @@
+ccflags-y += -Wno-unused-parameter
+
@@ -46376,9 +46439,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/Makefile linux-2.6.35/dri
+obj-$(CONFIG_SCST_PROCESSOR) += scst_processor.o
+obj-$(CONFIG_SCST_VDISK) += scst_vdisk.o
+obj-$(CONFIG_SCST_USER) += scst_user.o
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_cdrom.c linux-2.6.35/drivers/scst/dev_handlers/scst_cdrom.c
---- orig/linux-2.6.35/drivers/scst/dev_handlers/scst_cdrom.c
-+++ linux-2.6.35/drivers/scst/dev_handlers/scst_cdrom.c
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_cdrom.c linux-2.6.36/drivers/scst/dev_handlers/scst_cdrom.c
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_cdrom.c
++++ linux-2.6.36/drivers/scst/dev_handlers/scst_cdrom.c
@@ -0,0 +1,301 @@
+/*
+ * scst_cdrom.c
@@ -46681,9 +46744,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_cdrom.c linux-2.6.35
+MODULE_AUTHOR("Vladislav Bolkhovitin & Leonid Stoljar");
+MODULE_DESCRIPTION("SCSI CDROM (type 5) dev handler for SCST");
+MODULE_VERSION(SCST_VERSION_STRING);
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_changer.c linux-2.6.35/drivers/scst/dev_handlers/scst_changer.c
---- orig/linux-2.6.35/drivers/scst/dev_handlers/scst_changer.c
-+++ linux-2.6.35/drivers/scst/dev_handlers/scst_changer.c
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_changer.c linux-2.6.36/drivers/scst/dev_handlers/scst_changer.c
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_changer.c
++++ linux-2.6.36/drivers/scst/dev_handlers/scst_changer.c
@@ -0,0 +1,222 @@
+/*
+ * scst_changer.c
@@ -46907,9 +46970,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_changer.c linux-2.6.
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("SCSI medium changer (type 8) dev handler for SCST");
+MODULE_VERSION(SCST_VERSION_STRING);
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_dev_handler.h linux-2.6.35/drivers/scst/dev_handlers/scst_dev_handler.h
---- orig/linux-2.6.35/drivers/scst/dev_handlers/scst_dev_handler.h
-+++ linux-2.6.35/drivers/scst/dev_handlers/scst_dev_handler.h
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_dev_handler.h linux-2.6.36/drivers/scst/dev_handlers/scst_dev_handler.h
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_dev_handler.h
++++ linux-2.6.36/drivers/scst/dev_handlers/scst_dev_handler.h
@@ -0,0 +1,27 @@
+#ifndef __SCST_DEV_HANDLER_H
+#define __SCST_DEV_HANDLER_H
@@ -46938,9 +47001,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_dev_handler.h linux-
+#endif /* defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) */
+
+#endif /* __SCST_DEV_HANDLER_H */
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_disk.c linux-2.6.35/drivers/scst/dev_handlers/scst_disk.c
---- orig/linux-2.6.35/drivers/scst/dev_handlers/scst_disk.c
-+++ linux-2.6.35/drivers/scst/dev_handlers/scst_disk.c
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_disk.c linux-2.6.36/drivers/scst/dev_handlers/scst_disk.c
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_disk.c
++++ linux-2.6.36/drivers/scst/dev_handlers/scst_disk.c
@@ -0,0 +1,379 @@
+/*
+ * scst_disk.c
@@ -47321,9 +47384,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_disk.c linux-2.6.35/
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("SCSI disk (type 0) dev handler for SCST");
+MODULE_VERSION(SCST_VERSION_STRING);
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_modisk.c linux-2.6.35/drivers/scst/dev_handlers/scst_modisk.c
---- orig/linux-2.6.35/drivers/scst/dev_handlers/scst_modisk.c
-+++ linux-2.6.35/drivers/scst/dev_handlers/scst_modisk.c
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_modisk.c linux-2.6.36/drivers/scst/dev_handlers/scst_modisk.c
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_modisk.c
++++ linux-2.6.36/drivers/scst/dev_handlers/scst_modisk.c
@@ -0,0 +1,398 @@
+/*
+ * scst_modisk.c
@@ -47723,9 +47786,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_modisk.c linux-2.6.3
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("SCSI MO disk (type 7) dev handler for SCST");
+MODULE_VERSION(SCST_VERSION_STRING);
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_processor.c linux-2.6.35/drivers/scst/dev_handlers/scst_processor.c
---- orig/linux-2.6.35/drivers/scst/dev_handlers/scst_processor.c
-+++ linux-2.6.35/drivers/scst/dev_handlers/scst_processor.c
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_processor.c linux-2.6.36/drivers/scst/dev_handlers/scst_processor.c
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_processor.c
++++ linux-2.6.36/drivers/scst/dev_handlers/scst_processor.c
@@ -0,0 +1,222 @@
+/*
+ * scst_processor.c
@@ -47949,9 +48012,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_processor.c linux-2.
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("SCSI medium processor (type 3) dev handler for SCST");
+MODULE_VERSION(SCST_VERSION_STRING);
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_raid.c linux-2.6.35/drivers/scst/dev_handlers/scst_raid.c
---- orig/linux-2.6.35/drivers/scst/dev_handlers/scst_raid.c
-+++ linux-2.6.35/drivers/scst/dev_handlers/scst_raid.c
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_raid.c linux-2.6.36/drivers/scst/dev_handlers/scst_raid.c
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_raid.c
++++ linux-2.6.36/drivers/scst/dev_handlers/scst_raid.c
@@ -0,0 +1,223 @@
+/*
+ * scst_raid.c
@@ -48176,9 +48239,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_raid.c linux-2.6.35/
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("SCSI raid(controller) (type 0xC) dev handler for SCST");
+MODULE_VERSION(SCST_VERSION_STRING);
-diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_tape.c linux-2.6.35/drivers/scst/dev_handlers/scst_tape.c
---- orig/linux-2.6.35/drivers/scst/dev_handlers/scst_tape.c
-+++ linux-2.6.35/drivers/scst/dev_handlers/scst_tape.c
+diff -uprN orig/linux-2.6.36/drivers/scst/dev_handlers/scst_tape.c linux-2.6.36/drivers/scst/dev_handlers/scst_tape.c
+--- orig/linux-2.6.36/drivers/scst/dev_handlers/scst_tape.c
++++ linux-2.6.36/drivers/scst/dev_handlers/scst_tape.c
@@ -0,0 +1,431 @@
+/*
+ * scst_tape.c
@@ -48611,796 +48674,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/dev_handlers/scst_tape.c linux-2.6.35/
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("SCSI tape (type 1) dev handler for SCST");
+MODULE_VERSION(SCST_VERSION_STRING);
-libfc: add hook for FC-4 provider registration
-
-Allow FC-4 provider modules to hook into libfc, mostly for targets.
-This should allow any FC-4 module to handle PRLI requests and maintain
-process-association states.
-
-Each provider registers its ops with libfc and then will be called for
-any incoming PRLI for that FC-4 type on any instance. The provider
-can decide whether to handle that particular instance using any method
-it likes, such as ACLs or other configuration information.
-
-A count is kept of the number of successful PRLIs from the remote port.
-Providers are called back with an implicit PRLO when the remote port
-is about to be deleted or has been reset.
-
-fc_lport_recv_req() now sends incoming FC-4 requests to FC-4 providers,
-and there is a built-in provider always registered for handling
-incoming ELS requests.
-
-The call to provider recv() routines uses rcu_read_lock()
-so that providers aren't removed during the call. That lock is very
-cheap and shouldn't affect any performance on ELS requests.
-Providers can rely on the RCU lock to protect a session lookup as well.
-
-Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
-
----
- drivers/scsi/libfc/fc_libfc.c | 60 ++++++++++++++++++
- drivers/scsi/libfc/fc_libfc.h | 11 +++
- drivers/scsi/libfc/fc_lport.c | 63 ++++++++++++++++---
- drivers/scsi/libfc/fc_rport.c | 133 +++++++++++++++++++++++++++++++++--------
- include/scsi/libfc.h | 26 ++++++++
- 5 files changed, 255 insertions(+), 38 deletions(-)
-
-
----
-diff --git a/drivers/scsi/libfc/fc_libfc.c b/drivers/scsi/libfc/fc_libfc.c
-index 39f4b6a..ce0de44 100644
---- a/drivers/scsi/libfc/fc_libfc.c
-+++ b/drivers/scsi/libfc/fc_libfc.c
-@@ -34,6 +34,23 @@ unsigned int fc_debug_logging;
- module_param_named(debug_logging, fc_debug_logging, int, S_IRUGO|S_IWUSR);
- MODULE_PARM_DESC(debug_logging, "a bit mask of logging levels");
-
-+DEFINE_MUTEX(fc_prov_mutex);
-+
-+/*
-+ * Providers which primarily send requests and PRLIs.
-+ */
-+struct fc4_prov *fc_active_prov[FC_FC4_PROV_SIZE] = {
-+ [0] = &fc_rport_t0_prov,
-+ [FC_TYPE_FCP] = &fc_rport_fcp_init,
-+};
-+
-+/*
-+ * Providers which receive requests.
-+ */
-+struct fc4_prov *fc_passive_prov[FC_FC4_PROV_SIZE] = {
-+ [FC_TYPE_ELS] = &fc_lport_els_prov,
-+};
-+
- /**
- * libfc_init() - Initialize libfc.ko
- */
-@@ -132,3 +149,46 @@ u32 fc_copy_buffer_to_sglist(void *buf, size_t len,
- }
- return copy_len;
- }
-+
-+/**
-+ * fc_fc4_register_provider() - register FC-4 upper-level provider.
-+ * @type: FC-4 type, such as FC_TYPE_FCP
-+ * @prov: structure describing provider including ops vector.
-+ *
-+ * Returns 0 on success, negative error otherwise.
-+ */
-+int fc_fc4_register_provider(enum fc_fh_type type, struct fc4_prov *prov)
-+{
-+ struct fc4_prov **prov_entry;
-+ int ret = 0;
-+
-+ if (type >= FC_FC4_PROV_SIZE)
-+ return -EINVAL;
-+ mutex_lock(&fc_prov_mutex);
-+ prov_entry = (prov->recv ? fc_passive_prov : fc_active_prov) + type;
-+ if (*prov_entry)
-+ ret = -EBUSY;
-+ else
-+ *prov_entry = prov;
-+ mutex_unlock(&fc_prov_mutex);
-+ return ret;
-+}
-+EXPORT_SYMBOL(fc_fc4_register_provider);
-+
-+/**
-+ * fc_fc4_deregister_provider() - deregister FC-4 upper-level provider.
-+ * @type: FC-4 type, such as FC_TYPE_FCP
-+ * @prov: structure describing provider including ops vector.
-+ */
-+void fc_fc4_deregister_provider(enum fc_fh_type type, struct fc4_prov *prov)
-+{
-+ BUG_ON(type >= FC_FC4_PROV_SIZE);
-+ mutex_lock(&fc_prov_mutex);
-+ if (prov->recv)
-+ rcu_assign_pointer(fc_passive_prov[type], NULL);
-+ else
-+ rcu_assign_pointer(fc_active_prov[type], NULL);
-+ mutex_unlock(&fc_prov_mutex);
-+ synchronize_rcu();
-+}
-+EXPORT_SYMBOL(fc_fc4_deregister_provider);
-diff --git a/drivers/scsi/libfc/fc_libfc.h b/drivers/scsi/libfc/fc_libfc.h
-index f5c0ca4..2323c80 100644
---- a/drivers/scsi/libfc/fc_libfc.h
-+++ b/drivers/scsi/libfc/fc_libfc.h
-@@ -82,6 +82,17 @@ extern unsigned int fc_debug_logging;
- (lport)->host->host_no, ##args))
-
- /*
-+ * FC-4 Providers.
-+ */
-+extern struct fc4_prov *fc_active_prov[]; /* providers without recv */
-+extern struct fc4_prov *fc_passive_prov[]; /* providers with recv */
-+extern struct mutex fc_prov_mutex; /* lock over table changes */
-+
-+extern struct fc4_prov fc_rport_t0_prov; /* type 0 provider */
-+extern struct fc4_prov fc_lport_els_prov; /* ELS provider */
-+extern struct fc4_prov fc_rport_fcp_init; /* FCP initiator provider */
-+
-+/*
- * Set up direct-data placement for this I/O request
- */
- void fc_fcp_ddp_setup(struct fc_fcp_pkt *fsp, u16 xid);
-diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
-index 79c9e3c..b05329c 100644
---- a/drivers/scsi/libfc/fc_lport.c
-+++ b/drivers/scsi/libfc/fc_lport.c
-@@ -844,7 +844,7 @@ out:
- }
-
- /**
-- * fc_lport_recv_req() - The generic lport request handler
-+ * fc_lport_recv_els_req() - The generic lport ELS request handler
- * @lport: The local port that received the request
- * @sp: The sequence the request is on
- * @fp: The request frame
-@@ -855,8 +855,8 @@ out:
- * Locking Note: This function should not be called with the lport
- * lock held becuase it will grab the lock.
- */
--static void fc_lport_recv_req(struct fc_lport *lport, struct fc_seq *sp,
-- struct fc_frame *fp)
-+static void fc_lport_recv_els_req(struct fc_lport *lport, struct fc_seq *sp,
-+ struct fc_frame *fp)
- {
- struct fc_frame_header *fh = fc_frame_header_get(fp);
- void (*recv) (struct fc_seq *, struct fc_frame *, struct fc_lport *);
-@@ -870,8 +870,7 @@ static void fc_lport_recv_req(struct fc_lport *lport, struct fc_seq *sp,
- */
- if (!lport->link_up)
- fc_frame_free(fp);
-- else if (fh->fh_type == FC_TYPE_ELS &&
-- fh->fh_r_ctl == FC_RCTL_ELS_REQ) {
-+ else {
- /*
- * Check opcode.
- */
-@@ -900,17 +899,59 @@ static void fc_lport_recv_req(struct fc_lport *lport, struct fc_seq *sp,
- }
-
- recv(sp, fp, lport);
-- } else {
-- FC_LPORT_DBG(lport, "dropping invalid frame (eof %x)\n",
-- fr_eof(fp));
-- fc_frame_free(fp);
- }
- mutex_unlock(&lport->lp_mutex);
-+ lport->tt.exch_done(sp);
-+}
-+
-+static int fc_lport_els_prli(struct fc_rport_priv *rdata, u32 spp_len,
-+ const struct fc_els_spp *spp_in,
-+ struct fc_els_spp *spp_out)
-+{
-+ return FC_SPP_RESP_INVL;
-+}
-+
-+struct fc4_prov fc_lport_els_prov = {
-+ .prli = fc_lport_els_prli,
-+ .recv = fc_lport_recv_els_req,
-+};
-+
-+/**
-+ * fc_lport_recv_req() - The generic lport request handler
-+ * @lport: The lport that received the request
-+ * @sp: The sequence the request is on
-+ * @fp: The frame the request is in
-+ *
-+ * Locking Note: This function should not be called with the lport
-+ * lock held becuase it may grab the lock.
-+ */
-+static void fc_lport_recv_req(struct fc_lport *lport, struct fc_seq *sp,
-+ struct fc_frame *fp)
-+{
-+ struct fc_frame_header *fh = fc_frame_header_get(fp);
-+ struct fc4_prov *prov;
-
- /*
-- * The common exch_done for all request may not be good
-- * if any request requires longer hold on exhange. XXX
-+ * Use RCU read lock and module_lock to be sure module doesn't
-+ * deregister and get unloaded while we're calling it.
-+ * try_module_get() is inlined and accepts a NULL parameter.
-+ * Only ELSes and FCP target ops should come through here.
-+ * The locking is unfortunate, and a better scheme is being sought.
- */
-+ rcu_read_lock();
-+ if (fh->fh_type >= FC_FC4_PROV_SIZE)
-+ goto drop;
-+ prov = rcu_dereference(fc_passive_prov[fh->fh_type]);
-+ if (!prov || !try_module_get(prov->module))
-+ goto drop;
-+ rcu_read_unlock();
-+ prov->recv(lport, sp, fp);
-+ module_put(prov->module);
-+ return;
-+drop:
-+ rcu_read_unlock();
-+ FC_LPORT_DBG(lport, "dropping unexpected frame type %x\n", fh->fh_type);
-+ fc_frame_free(fp);
- lport->tt.exch_done(sp);
- }
-
-diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
-index 39e440f..3ec4aa5 100644
---- a/drivers/scsi/libfc/fc_rport.c
-+++ b/drivers/scsi/libfc/fc_rport.c
-@@ -246,6 +246,8 @@ static void fc_rport_work(struct work_struct *work)
- struct fc_rport_operations *rport_ops;
- struct fc_rport_identifiers ids;
- struct fc_rport *rport;
-+ struct fc4_prov *prov;
-+ u8 type;
- int restart = 0;
-
- mutex_lock(&rdata->rp_mutex);
-@@ -295,6 +297,15 @@ static void fc_rport_work(struct work_struct *work)
- case RPORT_EV_FAILED:
- case RPORT_EV_LOGO:
- case RPORT_EV_STOP:
-+ if (rdata->prli_count) {
-+ mutex_lock(&fc_prov_mutex);
-+ for (type = 1; type < FC_FC4_PROV_SIZE; type++) {
-+ prov = fc_passive_prov[type];
-+ if (prov && prov->prlo)
-+ prov->prlo(rdata);
-+ }
-+ mutex_unlock(&fc_prov_mutex);
-+ }
- port_id = rdata->ids.port_id;
- mutex_unlock(&rdata->rp_mutex);
-
-@@ -1434,6 +1445,7 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *rdata,
- struct fc_exch *ep;
- struct fc_frame *fp;
- struct fc_frame_header *fh;
-+ struct fc4_prov *prov;
- struct {
- struct fc_els_prli prli;
- struct fc_els_spp spp;
-@@ -1443,10 +1455,9 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *rdata,
- unsigned int len;
- unsigned int plen;
- enum fc_els_spp_resp resp;
-+ enum fc_els_spp_resp passive;
- struct fc_seq_els_data rjt_data;
- u32 f_ctl;
-- u32 fcp_parm;
-- u32 roles = FC_RPORT_ROLE_UNKNOWN;
-
- rjt_data.fp = NULL;
- fh = fc_frame_header_get(rx_fp);
-@@ -1485,46 +1496,41 @@ static void fc_rport_recv_prli_req(struct fc_rport_priv *rdata,
- pp->prli.prli_len = htons(len);
- len -= sizeof(struct fc_els_prli);
-
-- /* reinitialize remote port roles */
-- rdata->ids.roles = FC_RPORT_ROLE_UNKNOWN;
--
- /*
- * Go through all the service parameter pages and build
- * response. If plen indicates longer SPP than standard,
- * use that. The entire response has been pre-cleared above.
- */
- spp = &pp->spp;
-+ mutex_lock(&fc_prov_mutex);
- while (len >= plen) {
- spp->spp_type = rspp->spp_type;
- spp->spp_type_ext = rspp->spp_type_ext;
-- spp->spp_flags = rspp->spp_flags & FC_SPP_EST_IMG_PAIR;
-- resp = FC_SPP_RESP_ACK;
--
-- switch (rspp->spp_type) {
-- case 0: /* common to all FC-4 types */
-- break;
-- case FC_TYPE_FCP:
-- fcp_parm = ntohl(rspp->spp_params);
-- if (fcp_parm & FCP_SPPF_RETRY)
-- rdata->flags |= FC_RP_FLAGS_RETRY;
-- rdata->supported_classes = FC_COS_CLASS3;
-- if (fcp_parm & FCP_SPPF_INIT_FCN)
-- roles |= FC_RPORT_ROLE_FCP_INITIATOR;
-- if (fcp_parm & FCP_SPPF_TARG_FCN)
-- roles |= FC_RPORT_ROLE_FCP_TARGET;
-- rdata->ids.roles = roles;
--
-- spp->spp_params = htonl(lport->service_params);
-- break;
-- default:
-- resp = FC_SPP_RESP_INVL;
-- break;
-+ resp = 0;
-+
-+ if (rspp->spp_type < FC_FC4_PROV_SIZE) {
-+ prov = fc_active_prov[rspp->spp_type];
-+ if (prov)
-+ resp = prov->prli(rdata, plen, rspp, spp);
-+ prov = fc_passive_prov[rspp->spp_type];
-+ if (prov) {
-+ passive = prov->prli(rdata, plen, rspp, spp);
-+ if (!resp || passive == FC_SPP_RESP_ACK)
-+ resp = passive;
-+ }
-+ }
-+ if (!resp) {
-+ if (spp->spp_flags & FC_SPP_EST_IMG_PAIR)
-+ resp |= FC_SPP_RESP_CONF;
-+ else
-+ resp |= FC_SPP_RESP_INVL;
- }
- spp->spp_flags |= resp;
- len -= plen;
- rspp = (struct fc_els_spp *)((char *)rspp + plen);
- spp = (struct fc_els_spp *)((char *)spp + plen);
- }
-+ mutex_unlock(&fc_prov_mutex);
-
- /*
- * Send LS_ACC. If this fails, the originator should retry.
-@@ -1669,6 +1675,79 @@ int fc_rport_init(struct fc_lport *lport)
- EXPORT_SYMBOL(fc_rport_init);
-
- /**
-+ * fc_rport_fcp_prli() - Handle incoming PRLI for the FCP initiator.
-+ * @rdata: remote port private
-+ * @spp_len: service parameter page length
-+ * @rspp: received service parameter page
-+ * @spp: response service parameter page
-+ *
-+ * Returns the value for the response code to be placed in spp_flags;
-+ * Returns 0 if not an initiator.
-+ */
-+static int fc_rport_fcp_prli(struct fc_rport_priv *rdata, u32 spp_len,
-+ const struct fc_els_spp *rspp,
-+ struct fc_els_spp *spp)
-+{
-+ struct fc_lport *lport = rdata->local_port;
-+ u32 fcp_parm;
-+
-+ fcp_parm = ntohl(rspp->spp_params);
-+ rdata->ids.roles = FC_RPORT_ROLE_UNKNOWN;
-+ if (fcp_parm & FCP_SPPF_INIT_FCN)
-+ rdata->ids.roles |= FC_RPORT_ROLE_FCP_INITIATOR;
-+ if (fcp_parm & FCP_SPPF_TARG_FCN)
-+ rdata->ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
-+ if (fcp_parm & FCP_SPPF_RETRY)
-+ rdata->flags |= FC_RP_FLAGS_RETRY;
-+ rdata->supported_classes = FC_COS_CLASS3;
-+
-+ if (!(lport->service_params & FC_RPORT_ROLE_FCP_INITIATOR))
-+ return 0;
-+
-+ spp->spp_flags |= rspp->spp_flags & FC_SPP_EST_IMG_PAIR;
-+
-+ /*
-+ * OR in our service parameters with other providers (target), if any.
-+ */
-+ fcp_parm = ntohl(spp->spp_params);
-+ spp->spp_params = htonl(fcp_parm | lport->service_params);
-+ return FC_SPP_RESP_ACK;
-+}
-+
-+/*
-+ * FC-4 provider ops for FCP initiator.
-+ */
-+struct fc4_prov fc_rport_fcp_init = {
-+ .prli = fc_rport_fcp_prli,
-+};
-+
-+/**
-+ * fc_rport_t0_prli() - Handle incoming PRLI parameters for type 0
-+ * @rdata: remote port private
-+ * @spp_len: service parameter page length
-+ * @rspp: received service parameter page
-+ * @spp: response service parameter page
-+ */
-+static int fc_rport_t0_prli(struct fc_rport_priv *rdata, u32 spp_len,
-+ const struct fc_els_spp *rspp,
-+ struct fc_els_spp *spp)
-+{
-+ if (rspp->spp_flags & FC_SPP_EST_IMG_PAIR)
-+ return FC_SPP_RESP_INVL;
-+ return FC_SPP_RESP_ACK;
-+}
-+
-+/*
-+ * FC-4 provider ops for type 0 service parameters.
-+ *
-+ * This handles the special case of type 0 which is always successful
-+ * but doesn't do anything otherwise.
-+ */
-+struct fc4_prov fc_rport_t0_prov = {
-+ .prli = fc_rport_t0_prli,
-+};
-+
-+/**
- * fc_setup_rport() - Initialize the rport_event_queue
- */
- int fc_setup_rport()
-diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
-index 7495c0b..4ac290f 100644
---- a/include/scsi/libfc.h
-+++ b/include/scsi/libfc.h
-@@ -35,6 +35,8 @@
-
- #include <scsi/fc_frame.h>
-
-+#define FC_FC4_PROV_SIZE (FC_TYPE_FCP + 1) /* size of tables */
-+
- /*
- * libfc error codes
- */
-@@ -195,6 +197,7 @@ struct fc_rport_libfc_priv {
- * @rp_mutex: The mutex that protects the remote port
- * @retry_work: Handle for retries
- * @event_callback: Callback when READY, FAILED or LOGO states complete
-+ * @prli_count: Count of open PRLI sessions in providers
- */
- struct fc_rport_priv {
- struct fc_lport *local_port;
-@@ -216,6 +219,7 @@ struct fc_rport_priv {
- struct list_head peers;
- struct work_struct event_work;
- u32 supported_classes;
-+ u16 prli_count;
- };
-
- /**
-@@ -857,6 +861,28 @@ struct fc_lport {
- struct delayed_work retry_work;
- };
-
-+/**
-+ * struct fc4_prov - FC-4 provider registration
-+ * @prli: Handler for incoming PRLI
-+ * @prlo: Handler for session reset
-+ * @recv: Handler for incoming request
-+ * @module: Pointer to module. May be NULL.
-+ */
-+struct fc4_prov {
-+ int (*prli)(struct fc_rport_priv *, u32 spp_len,
-+ const struct fc_els_spp *spp_in,
-+ struct fc_els_spp *spp_out);
-+ void (*prlo)(struct fc_rport_priv *);
-+ void (*recv)(struct fc_lport *, struct fc_seq *, struct fc_frame *);
-+ struct module *module;
-+};
-+
-+/*
-+ * Register FC-4 provider with libfc.
-+ */
-+int fc_fc4_register_provider(enum fc_fh_type type, struct fc4_prov *);
-+void fc_fc4_deregister_provider(enum fc_fh_type type, struct fc4_prov *);
-+
- /*
- * FC_LPORT HELPER FUNCTIONS
- *****************************/
-libfc: add method for setting handler for incoming exchange
-
-Add a method for setting handler for incoming exchange.
-For multi-sequence exchanges, this allows the target driver
-to add a response handler for handling subsequent sequences,
-and exchange manager resets.
-
-The new function is called fc_seq_set_resp().
-
-Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
-
----
- drivers/scsi/libfc/fc_exch.c | 19 +++++++++++++++++++
- include/scsi/libfc.h | 11 ++++++++++-
- 2 files changed, 29 insertions(+), 1 deletions(-)
-
-
----
-diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
-index 104e0fb..1828d1d 100644
---- a/drivers/scsi/libfc/fc_exch.c
-+++ b/drivers/scsi/libfc/fc_exch.c
-@@ -545,6 +545,22 @@ static struct fc_seq *fc_seq_start_next(struct fc_seq *sp)
- return sp;
- }
-
-+/*
-+ * Set the response handler for the exchange associated with a sequence.
-+ */
-+static void fc_seq_set_resp(struct fc_seq *sp,
-+ void (*resp)(struct fc_seq *, struct fc_frame *,
-+ void *),
-+ void *arg)
-+{
-+ struct fc_exch *ep = fc_seq_exch(sp);
-+
-+ spin_lock_bh(&ep->ex_lock);
-+ ep->resp = resp;
-+ ep->arg = arg;
-+ spin_unlock_bh(&ep->ex_lock);
-+}
-+
- /**
- * fc_seq_exch_abort() - Abort an exchange and sequence
- * @req_sp: The sequence to be aborted
-@@ -2263,6 +2279,9 @@ int fc_exch_init(struct fc_lport *lport)
- if (!lport->tt.seq_start_next)
- lport->tt.seq_start_next = fc_seq_start_next;
-
-+ if (!lport->tt.seq_set_resp)
-+ lport->tt.seq_set_resp = fc_seq_set_resp;
-+
- if (!lport->tt.exch_seq_send)
- lport->tt.exch_seq_send = fc_exch_seq_send;
-
-diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
-index 4ac290f..64a4756 100644
---- a/include/scsi/libfc.h
-+++ b/include/scsi/libfc.h
-@@ -571,6 +571,16 @@ struct libfc_function_template {
- struct fc_seq *(*seq_start_next)(struct fc_seq *);
-
- /*
-+ * Set a response handler for the exchange of the sequence.
-+ *
-+ * STATUS: OPTIONAL
-+ */
-+ void (*seq_set_resp)(struct fc_seq *sp,
-+ void (*resp)(struct fc_seq *, struct fc_frame *,
-+ void *),
-+ void *arg);
-+
-+ /*
- * Reset an exchange manager, completing all sequences and exchanges.
- * If s_id is non-zero, reset only exchanges originating from that FID.
- * If d_id is non-zero, reset only exchanges sending to that FID.
-@@ -1056,7 +1066,6 @@ struct fc_seq *fc_elsct_send(struct fc_lport *, u32 did,
- void fc_lport_flogi_resp(struct fc_seq *, struct fc_frame *, void *);
- void fc_lport_logo_resp(struct fc_seq *, struct fc_frame *, void *);
-
--
- /*
- * EXCHANGE MANAGER LAYER
- *****************************/
-libfc: add local port hook for provider session lookup
-
-The target provider needs a per-instance lookup table
-or other way to lookup sessions quickly without going through
-a linear list or serializing too much.
-
-Add a simple void * array indexed by FC-4 type to the fc_lport.
-
-Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
-
----
- include/scsi/libfc.h | 2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-
----
-diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
-index 64a4756..9d7c8e3 100644
---- a/include/scsi/libfc.h
-+++ b/include/scsi/libfc.h
-@@ -816,6 +816,7 @@ struct fc_disc {
- * @lp_mutex: Mutex to protect the local port
- * @list: Handle for list of local ports
- * @retry_work: Handle to local port for delayed retry context
-+ * @prov: Pointers available for use by passive FC-4 providers
- */
- struct fc_lport {
- /* Associations */
-@@ -869,6 +870,7 @@ struct fc_lport {
- struct mutex lp_mutex;
- struct list_head list;
- struct delayed_work retry_work;
-+ void *prov[FC_FC4_PROV_SIZE];
- };
-
- /**
-libfc: add hook to notify providers of local port changes
-
-When an SCST provider is registered, it needs to know what
-local ports are available for configuration as targets.
-
-Add a notifier chain that is invoked when any local port
-that is added or deleted.
-
-Maintain a global list of local ports and add an
-interator function that calls a given function for
-every existing local port. This is used when first
-loading a provider.
-
-Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
-
----
- drivers/scsi/libfc/fc_libfc.c | 41 +++++++++++++++++++++++++++++++++++++++++
- drivers/scsi/libfc/fc_libfc.h | 2 ++
- drivers/scsi/libfc/fc_lport.c | 2 ++
- include/scsi/libfc.h | 14 +++++++++++++-
- 4 files changed, 58 insertions(+), 1 deletions(-)
-
-
----
-diff --git a/drivers/scsi/libfc/fc_libfc.c b/drivers/scsi/libfc/fc_libfc.c
-index ce0de44..abd108a 100644
---- a/drivers/scsi/libfc/fc_libfc.c
-+++ b/drivers/scsi/libfc/fc_libfc.c
-@@ -35,6 +35,10 @@ module_param_named(debug_logging, fc_debug_logging, int, S_IRUGO|S_IWUSR);
- MODULE_PARM_DESC(debug_logging, "a bit mask of logging levels");
-
- DEFINE_MUTEX(fc_prov_mutex);
-+static LIST_HEAD(fc_local_ports);
-+struct blocking_notifier_head fc_lport_notifier_head =
-+ BLOCKING_NOTIFIER_INIT(fc_lport_notifier_head);
-+EXPORT_SYMBOL(fc_lport_notifier_head);
-
- /*
- * Providers which primarily send requests and PRLIs.
-@@ -150,6 +154,17 @@ u32 fc_copy_buffer_to_sglist(void *buf, size_t len,
- return copy_len;
- }
-
-+void fc_lport_iterate(void (*notify)(struct fc_lport *, void *), void *arg)
-+{
-+ struct fc_lport *lport;
-+
-+ mutex_lock(&fc_prov_mutex);
-+ list_for_each_entry(lport, &fc_local_ports, lport_list)
-+ notify(lport, arg);
-+ mutex_unlock(&fc_prov_mutex);
-+}
-+EXPORT_SYMBOL(fc_lport_iterate);
-+
- /**
- * fc_fc4_register_provider() - register FC-4 upper-level provider.
- * @type: FC-4 type, such as FC_TYPE_FCP
-@@ -192,3 +207,29 @@ void fc_fc4_deregister_provider(enum fc_fh_type type, struct fc4_prov *prov)
- synchronize_rcu();
- }
- EXPORT_SYMBOL(fc_fc4_deregister_provider);
-+
-+/**
-+ * fc_fc4_add_lport() - add new local port to list and run notifiers.
-+ * @lport: The new local port.
-+ */
-+void fc_fc4_add_lport(struct fc_lport *lport)
-+{
-+ mutex_lock(&fc_prov_mutex);
-+ list_add_tail(&lport->lport_list, &fc_local_ports);
-+ blocking_notifier_call_chain(&fc_lport_notifier_head,
-+ FC_LPORT_EV_ADD, lport);
-+ mutex_unlock(&fc_prov_mutex);
-+}
-+
-+/**
-+ * fc_fc4_del_lport() - remove local port from list and run notifiers.
-+ * @lport: The new local port.
-+ */
-+void fc_fc4_del_lport(struct fc_lport *lport)
-+{
-+ mutex_lock(&fc_prov_mutex);
-+ list_del(&lport->lport_list);
-+ blocking_notifier_call_chain(&fc_lport_notifier_head,
-+ FC_LPORT_EV_DEL, lport);
-+ mutex_unlock(&fc_prov_mutex);
-+}
-diff --git a/drivers/scsi/libfc/fc_libfc.h b/drivers/scsi/libfc/fc_libfc.h
-index 2323c80..85ce01e 100644
---- a/drivers/scsi/libfc/fc_libfc.h
-+++ b/drivers/scsi/libfc/fc_libfc.h
-@@ -111,6 +111,8 @@ void fc_destroy_fcp(void);
- * Internal libfc functions
- */
- const char *fc_els_resp_type(struct fc_frame *);
-+extern void fc_fc4_add_lport(struct fc_lport *);
-+extern void fc_fc4_del_lport(struct fc_lport *);
-
- /*
- * Copies a buffer into an sg list
-diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
-index b05329c..375a2a7 100644
---- a/drivers/scsi/libfc/fc_lport.c
-+++ b/drivers/scsi/libfc/fc_lport.c
-@@ -647,6 +647,7 @@ int fc_lport_destroy(struct fc_lport *lport)
- lport->tt.fcp_abort_io(lport);
- lport->tt.disc_stop_final(lport);
- lport->tt.exch_mgr_reset(lport, 0, 0);
-+ fc_fc4_del_lport(lport);
- return 0;
- }
- EXPORT_SYMBOL(fc_lport_destroy);
-@@ -1639,6 +1640,7 @@ int fc_lport_init(struct fc_lport *lport)
- fc_host_supported_speeds(lport->host) |= FC_PORTSPEED_1GBIT;
- if (lport->link_supported_speeds & FC_PORTSPEED_10GBIT)
- fc_host_supported_speeds(lport->host) |= FC_PORTSPEED_10GBIT;
-+ fc_fc4_add_lport(lport);
-
- return 0;
- }
-diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
-index 9d7c8e3..2fa3538 100644
---- a/include/scsi/libfc.h
-+++ b/include/scsi/libfc.h
-@@ -775,6 +775,15 @@ struct fc_disc {
- enum fc_disc_event);
- };
-
-+/*
-+ * Local port notifier and events.
-+ */
-+extern struct blocking_notifier_head fc_lport_notifier_head;
-+enum fc_lport_event {
-+ FC_LPORT_EV_ADD,
-+ FC_LPORT_EV_DEL,
-+};
-+
- /**
- * struct fc_lport - Local port
- * @host: The SCSI host associated with a local port
-@@ -814,8 +823,9 @@ struct fc_disc {
- * @lso_max: The maximum large offload send size
- * @fcts: FC-4 type mask
- * @lp_mutex: Mutex to protect the local port
-- * @list: Handle for list of local ports
-+ * @list: Linkage on list of vport peers
- * @retry_work: Handle to local port for delayed retry context
-+ * @lport_list: Linkage on module-wide list of local ports
- * @prov: Pointers available for use by passive FC-4 providers
- */
- struct fc_lport {
-@@ -870,6 +880,7 @@ struct fc_lport {
- struct mutex lp_mutex;
- struct list_head list;
- struct delayed_work retry_work;
-+ struct list_head lport_list;
- void *prov[FC_FC4_PROV_SIZE];
- };
-
-@@ -1024,6 +1035,7 @@ int fc_set_mfs(struct fc_lport *, u32 mfs);
- struct fc_lport *libfc_vport_create(struct fc_vport *, int privsize);
- struct fc_lport *fc_vport_id_lookup(struct fc_lport *, u32 port_id);
- int fc_lport_bsg_request(struct fc_bsg_job *);
-+void fc_lport_iterate(void (*func)(struct fc_lport *, void *), void *);
-
- /*
- * REMOTE PORT LAYER
---- a/include/scsi/fc_frame.h 2010-06-13 11:08:26.000000000 +0200
-+++ b/include/scsi/fc_frame.h 2010-06-13 11:08:53.000000000 +0200
-@@ -66,8 +66,8 @@ struct fcoe_rcv_info {
- struct fc_fcp_pkt *fr_fsp; /* for the corresponding fcp I/O */
- u32 fr_crc;
- u16 fr_max_payload; /* max FC payload */
-- enum fc_sof fr_sof; /* start of frame delimiter */
-- enum fc_eof fr_eof; /* end of frame delimiter */
-+ u8 fr_sof; /* start of frame delimiter */
-+ u8 fr_eof; /* end of frame delimiter */
- u8 fr_flags; /* flags - see below */
- u8 granted_mac[ETH_ALEN]; /* FCoE MAC address */
- };
-diff -uprN orig/linux-2.6.35/drivers/scst/fcst/Makefile linux-2.6.35/drivers/scst/fcst/Makefile
---- orig/linux-2.6.35/drivers/scst/fcst/Makefile
-+++ linux-2.6.35/drivers/scst/fcst/Makefile
+diff -uprN orig/linux-2.6.36/drivers/scst/fcst/Makefile linux-2.6.36/drivers/scst/fcst/Makefile
+--- orig/linux-2.6.36/drivers/scst/fcst/Makefile
++++ linux-2.6.36/drivers/scst/fcst/Makefile
@@ -0,0 +1,7 @@
+obj-$(CONFIG_FCST) += fcst.o
+
@@ -49409,18 +48685,18 @@ diff -uprN orig/linux-2.6.35/drivers/scst/fcst/Makefile linux-2.6.35/drivers/scs
+ ft_io.o \
+ ft_scst.o \
+ ft_sess.o
-diff -uprN orig/linux-2.6.35/drivers/scst/fcst/Kconfig linux-2.6.35/drivers/scst/fcst/Kconfig
---- orig/linux-2.6.35/drivers/scst/fcst/Kconfig
-+++ linux-2.6.35/drivers/scst/fcst/Kconfig
+diff -uprN orig/linux-2.6.36/drivers/scst/fcst/Kconfig linux-2.6.36/drivers/scst/fcst/Kconfig
+--- orig/linux-2.6.36/drivers/scst/fcst/Kconfig
++++ linux-2.6.36/drivers/scst/fcst/Kconfig
@@ -0,0 +1,5 @@
+config FCST
+ tristate "SCST target module for Fibre Channel using libfc"
+ depends on LIBFC && SCST
+ ---help---
+ Supports using libfc HBAs as target adapters with SCST
-diff -uprN orig/linux-2.6.35/drivers/scst/fcst/fcst.h linux-2.6.35/drivers/scst/fcst/fcst.h
---- orig/linux-2.6.35/drivers/scst/fcst/fcst.h
-+++ linux-2.6.35/drivers/scst/fcst/fcst.h
+diff -uprN orig/linux-2.6.36/drivers/scst/fcst/fcst.h linux-2.6.36/drivers/scst/fcst/fcst.h
+--- orig/linux-2.6.36/drivers/scst/fcst/fcst.h
++++ linux-2.6.36/drivers/scst/fcst/fcst.h
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2010 Cisco Systems, Inc.
@@ -49573,9 +48849,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/fcst/fcst.h linux-2.6.35/drivers/scst/
+void ft_cmd_dump(struct scst_cmd *, const char *);
+
+#endif /* __SCSI_FCST_H__ */
-diff -uprN orig/linux-2.6.35/drivers/scst/fcst/ft_cmd.c linux-2.6.35/drivers/scst/fcst/ft_cmd.c
---- orig/linux-2.6.35/drivers/scst/fcst/ft_cmd.c
-+++ linux-2.6.35/drivers/scst/fcst/ft_cmd.c
+diff -uprN orig/linux-2.6.36/drivers/scst/fcst/ft_cmd.c linux-2.6.36/drivers/scst/fcst/ft_cmd.c
+--- orig/linux-2.6.36/drivers/scst/fcst/ft_cmd.c
++++ linux-2.6.36/drivers/scst/fcst/ft_cmd.c
@@ -0,0 +1,686 @@
+/*
+ * Copyright (c) 2010 Cisco Systems, Inc.
@@ -50263,9 +49539,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/fcst/ft_cmd.c linux-2.6.35/drivers/scs
+ break;
+ }
+}
-diff -uprN orig/linux-2.6.35/drivers/scst/fcst/ft_io.c linux-2.6.35/drivers/scst/fcst/ft_io.c
---- orig/linux-2.6.35/drivers/scst/fcst/ft_io.c
-+++ linux-2.6.35/drivers/scst/fcst/ft_io.c
+diff -uprN orig/linux-2.6.36/drivers/scst/fcst/ft_io.c linux-2.6.36/drivers/scst/fcst/ft_io.c
+--- orig/linux-2.6.36/drivers/scst/fcst/ft_io.c
++++ linux-2.6.36/drivers/scst/fcst/ft_io.c
@@ -0,0 +1,272 @@
+/*
+ * Copyright (c) 2010 Cisco Systems, Inc.
@@ -50539,9 +49815,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/fcst/ft_io.c linux-2.6.35/drivers/scst
+ }
+ return SCST_TGT_RES_SUCCESS;
+}
-diff -uprN orig/linux-2.6.35/drivers/scst/fcst/ft_scst.c linux-2.6.35/drivers/scst/fcst/ft_scst.c
---- orig/linux-2.6.35/drivers/scst/fcst/ft_scst.c
-+++ linux-2.6.35/drivers/scst/fcst/ft_scst.c
+diff -uprN orig/linux-2.6.36/drivers/scst/fcst/ft_scst.c linux-2.6.36/drivers/scst/fcst/ft_scst.c
+--- orig/linux-2.6.36/drivers/scst/fcst/ft_scst.c
++++ linux-2.6.36/drivers/scst/fcst/ft_scst.c
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2010 Cisco Systems, Inc.
@@ -50639,9 +49915,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/fcst/ft_scst.c linux-2.6.35/drivers/sc
+ synchronize_rcu();
+}
+module_exit(ft_module_exit);
-diff -uprN orig/linux-2.6.35/drivers/scst/fcst/ft_sess.c linux-2.6.35/drivers/scst/fcst/ft_sess.c
---- orig/linux-2.6.35/drivers/scst/fcst/ft_sess.c
-+++ linux-2.6.35/drivers/scst/fcst/ft_sess.c
+diff -uprN orig/linux-2.6.36/drivers/scst/fcst/ft_sess.c linux-2.6.36/drivers/scst/fcst/ft_sess.c
+--- orig/linux-2.6.36/drivers/scst/fcst/ft_sess.c
++++ linux-2.6.36/drivers/scst/fcst/ft_sess.c
@@ -0,0 +1,570 @@
+/*
+ * Copyright (c) 2010 Cisco Systems, Inc.
@@ -51213,9 +50489,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/fcst/ft_sess.c linux-2.6.35/drivers/sc
+ aen->event_fn, sess->port_id, scst_aen_get_lun(aen));
+ return SCST_AEN_RES_FAILED; /* XXX TBD */
+}
-diff -uprN orig/linux-2.6.35/Documentation/scst/README.fcst linux-2.6.35/Documentation/scst/README.fcst
---- orig/linux-2.6.35/Documentation/scst/README.fcst
-+++ linux-2.6.35/Documentation/scst/README.fcst
+diff -uprN orig/linux-2.6.36/Documentation/scst/README.fcst linux-2.6.36/Documentation/scst/README.fcst
+--- orig/linux-2.6.36/Documentation/scst/README.fcst
++++ linux-2.6.36/Documentation/scst/README.fcst
@@ -0,0 +1,99 @@
+fcst README v1.0 06/10/2010
+
@@ -51316,9 +50592,9 @@ diff -uprN orig/linux-2.6.35/Documentation/scst/README.fcst linux-2.6.35/Documen
+14. As a temporary workaround, you may need to reset the interface
+ on the initiator side so it sees the SCST device as a target and
+ discovers LUNs. You can avoid this by bringing up the initiator last.
-diff -uprN orig/linux-2.6.35/include/scst/iscsi_scst.h linux-2.6.35/include/scst/iscsi_scst.h
---- orig/linux-2.6.35/include/scst/iscsi_scst.h
-+++ linux-2.6.35/include/scst/iscsi_scst.h
+diff -uprN orig/linux-2.6.36/include/scst/iscsi_scst.h linux-2.6.36/include/scst/iscsi_scst.h
+--- orig/linux-2.6.36/include/scst/iscsi_scst.h
++++ linux-2.6.36/include/scst/iscsi_scst.h
@@ -0,0 +1,220 @@
+/*
+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
@@ -51540,9 +50816,9 @@ diff -uprN orig/linux-2.6.35/include/scst/iscsi_scst.h linux-2.6.35/include/scst
+}
+
+#endif
-diff -uprN orig/linux-2.6.35/include/scst/iscsi_scst_ver.h linux-2.6.35/include/scst/iscsi_scst_ver.h
---- orig/linux-2.6.35/include/scst/iscsi_scst_ver.h
-+++ linux-2.6.35/include/scst/iscsi_scst_ver.h
+diff -uprN orig/linux-2.6.36/include/scst/iscsi_scst_ver.h linux-2.6.36/include/scst/iscsi_scst_ver.h
+--- orig/linux-2.6.36/include/scst/iscsi_scst_ver.h
++++ linux-2.6.36/include/scst/iscsi_scst_ver.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
@@ -51563,25 +50839,25 @@ diff -uprN orig/linux-2.6.35/include/scst/iscsi_scst_ver.h linux-2.6.35/include/
+
+#define ISCSI_VERSION_STRING_SUFFIX
+
-+#define ISCSI_VERSION_STRING "2.0.0-rc3" ISCSI_VERSION_STRING_SUFFIX
-diff -uprN orig/linux-2.6.35/include/scst/iscsi_scst_itf_ver.h linux-2.6.35/include/scst/iscsi_scst_itf_ver.h
---- orig/linux-2.6.35/include/scst/iscsi_scst_itf_ver.h
-+++ linux-2.6.35/include/scst/iscsi_scst_itf_ver.h
++#define ISCSI_VERSION_STRING "2.0.0" ISCSI_VERSION_STRING_SUFFIX
+diff -uprN orig/linux-2.6.36/include/scst/iscsi_scst_itf_ver.h linux-2.6.36/include/scst/iscsi_scst_itf_ver.h
+--- orig/linux-2.6.36/include/scst/iscsi_scst_itf_ver.h
++++ linux-2.6.36/include/scst/iscsi_scst_itf_ver.h
@@ -0,0 +1,3 @@
+/* Autogenerated, don't edit */
+
+#define ISCSI_SCST_INTERFACE_VERSION ISCSI_VERSION_STRING "_" "31815603fdea2196eb9774eac0e41bf15c9a9130"
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/Makefile linux-2.6.35/drivers/scst/iscsi-scst/Makefile
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/Makefile
-+++ linux-2.6.35/drivers/scst/iscsi-scst/Makefile
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/Makefile linux-2.6.36/drivers/scst/iscsi-scst/Makefile
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/Makefile
++++ linux-2.6.36/drivers/scst/iscsi-scst/Makefile
@@ -0,0 +1,4 @@
+iscsi-scst-y := iscsi.o nthread.o config.o digest.o \
+ conn.o session.o target.o event.o param.o
+
+obj-$(CONFIG_SCST_ISCSI) += iscsi-scst.o
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/Kconfig linux-2.6.35/drivers/scst/iscsi-scst/Kconfig
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/Kconfig
-+++ linux-2.6.35/drivers/scst/iscsi-scst/Kconfig
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/Kconfig linux-2.6.36/drivers/scst/iscsi-scst/Kconfig
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/Kconfig
++++ linux-2.6.36/drivers/scst/iscsi-scst/Kconfig
@@ -0,0 +1,25 @@
+config SCST_ISCSI
+ tristate "ISCSI Target"
@@ -51608,10 +50884,10 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/Kconfig linux-2.6.35/driver
+ iSCSI initiator that is talking to SCST.
+
+ If unsure, say "N".
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/config.c linux-2.6.35/drivers/scst/iscsi-scst/config.c
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/config.c
-+++ linux-2.6.35/drivers/scst/iscsi-scst/config.c
-@@ -0,0 +1,1033 @@
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/config.c linux-2.6.36/drivers/scst/iscsi-scst/config.c
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/config.c
++++ linux-2.6.36/drivers/scst/iscsi-scst/config.c
+@@ -0,0 +1,1032 @@
+/*
+ * Copyright (C) 2004 - 2005 FUJITA Tomonori <tomof@acm.org>
+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
@@ -52140,7 +51416,6 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/config.c linux-2.6.35/drive
+ list_add(&tgt_attr->attrs_list_entry, attrs_list);
+
+ tgt_attr->attr.attr.name = tgt_attr->name;
-+ tgt_attr->attr.attr.owner = THIS_MODULE;
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+ tgt_attr->attr.attr.key = &__key;
+#endif
@@ -52645,9 +51920,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/config.c linux-2.6.35/drive
+}
+
+#endif /* CONFIG_SCST_DEBUG */
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/conn.c linux-2.6.35/drivers/scst/iscsi-scst/conn.c
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/conn.c
-+++ linux-2.6.35/drivers/scst/iscsi-scst/conn.c
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/conn.c linux-2.6.36/drivers/scst/iscsi-scst/conn.c
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/conn.c
++++ linux-2.6.36/drivers/scst/iscsi-scst/conn.c
@@ -0,0 +1,910 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
@@ -53559,9 +52834,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/conn.c linux-2.6.35/drivers
+}
+
+#endif /* CONFIG_SCST_EXTRACHECKS */
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/digest.c linux-2.6.35/drivers/scst/iscsi-scst/digest.c
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/digest.c
-+++ linux-2.6.35/drivers/scst/iscsi-scst/digest.c
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/digest.c linux-2.6.36/drivers/scst/iscsi-scst/digest.c
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/digest.c
++++ linux-2.6.36/drivers/scst/iscsi-scst/digest.c
@@ -0,0 +1,244 @@
+/*
+ * iSCSI digest handling.
@@ -53807,9 +53082,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/digest.c linux-2.6.35/drive
+ TRACE_DBG("TX data digest for cmd %p: %x (offset %d, opcode %x)", cmnd,
+ cmnd->ddigest, offset, cmnd_opcode(cmnd));
+}
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/digest.h linux-2.6.35/drivers/scst/iscsi-scst/digest.h
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/digest.h
-+++ linux-2.6.35/drivers/scst/iscsi-scst/digest.h
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/digest.h linux-2.6.36/drivers/scst/iscsi-scst/digest.h
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/digest.h
++++ linux-2.6.36/drivers/scst/iscsi-scst/digest.h
@@ -0,0 +1,31 @@
+/*
+ * iSCSI digest handling.
@@ -53842,9 +53117,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/digest.h linux-2.6.35/drive
+extern void digest_tx_data(struct iscsi_cmnd *cmnd);
+
+#endif /* __ISCSI_DIGEST_H__ */
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/event.c linux-2.6.35/drivers/scst/iscsi-scst/event.c
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/event.c
-+++ linux-2.6.35/drivers/scst/iscsi-scst/event.c
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/event.c linux-2.6.36/drivers/scst/iscsi-scst/event.c
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/event.c
++++ linux-2.6.36/drivers/scst/iscsi-scst/event.c
@@ -0,0 +1,165 @@
+/*
+ * Event notification code.
@@ -54011,9 +53286,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/event.c linux-2.6.35/driver
+{
+ netlink_kernel_release(nl);
+}
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi.c linux-2.6.35/drivers/scst/iscsi-scst/iscsi.c
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi.c
-+++ linux-2.6.35/drivers/scst/iscsi-scst/iscsi.c
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi.c linux-2.6.36/drivers/scst/iscsi-scst/iscsi.c
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi.c
++++ linux-2.6.36/drivers/scst/iscsi-scst/iscsi.c
@@ -0,0 +1,3956 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
@@ -57971,9 +57246,73 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi.c linux-2.6.35/driver
+MODULE_VERSION(ISCSI_VERSION_STRING);
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("SCST iSCSI Target");
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi.h linux-2.6.35/drivers/scst/iscsi-scst/iscsi.h
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi.h
-+++ linux-2.6.35/drivers/scst/iscsi-scst/iscsi.h
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h
++++ linux-2.6.36/drivers/scst/iscsi-scst/iscsi_dbg.h
+@@ -0,0 +1,60 @@
++/*
++ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
++ * Copyright (C) 2007 - 2010 ID7 Ltd.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation, version 2
++ * of the License.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ */
++
++#ifndef ISCSI_DBG_H
++#define ISCSI_DBG_H
++
++#define LOG_PREFIX "iscsi-scst"
++
++#include <scst/scst_debug.h>
++
++#define TRACE_D_WRITE 0x80000000
++#define TRACE_CONN_OC 0x40000000
++#define TRACE_D_IOV 0x20000000
++#define TRACE_D_DUMP_PDU 0x10000000
++#define TRACE_NET_PG 0x08000000
++#define TRACE_CONN_OC_DBG 0x04000000
++
++#ifdef CONFIG_SCST_DEBUG
++#define ISCSI_DEFAULT_LOG_FLAGS (TRACE_FUNCTION | TRACE_LINE | TRACE_PID | \
++ TRACE_OUT_OF_MEM | TRACE_MGMT | TRACE_MGMT_DEBUG | \
++ TRACE_MINOR | TRACE_SPECIAL | TRACE_CONN_OC)
++#else
++#define ISCSI_DEFAULT_LOG_FLAGS (TRACE_OUT_OF_MEM | TRACE_MGMT | \
++ TRACE_SPECIAL)
++#endif
++
++#ifdef CONFIG_SCST_DEBUG
++struct iscsi_pdu;
++struct iscsi_cmnd;
++extern void iscsi_dump_pdu(struct iscsi_pdu *pdu);
++extern unsigned long iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(
++ struct iscsi_cmnd *cmnd);
++#else
++#define iscsi_dump_pdu(x) do {} while (0)
++#define iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(x) do {} while (0)
++#endif
++
++#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
++extern unsigned long iscsi_trace_flag;
++#define trace_flag iscsi_trace_flag
++#endif
++
++#define TRACE_CONN_CLOSE(args...) TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_CONN_OC, args)
++#define TRACE_CONN_CLOSE_DBG(args...) TRACE(TRACE_CONN_OC_DBG, args)
++#define TRACE_NET_PAGE(args...) TRACE_DBG_FLAG(TRACE_NET_PG, args)
++#define TRACE_WRITE(args...) TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_D_WRITE, args)
++
++#endif
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi.h linux-2.6.36/drivers/scst/iscsi-scst/iscsi.h
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi.h
++++ linux-2.6.36/drivers/scst/iscsi-scst/iscsi.h
@@ -0,0 +1,743 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
@@ -58718,73 +58057,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi.h linux-2.6.35/driver
+#endif
+
+#endif /* __ISCSI_H__ */
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi_dbg.h linux-2.6.35/drivers/scst/iscsi-scst/iscsi_dbg.h
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi_dbg.h
-+++ linux-2.6.35/drivers/scst/iscsi-scst/iscsi_dbg.h
-@@ -0,0 +1,60 @@
-+/*
-+ * Copyright (C) 2007 - 2010 Vladislav Bolkhovitin
-+ * Copyright (C) 2007 - 2010 ID7 Ltd.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation, version 2
-+ * of the License.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ */
-+
-+#ifndef ISCSI_DBG_H
-+#define ISCSI_DBG_H
-+
-+#define LOG_PREFIX "iscsi-scst"
-+
-+#include <scst/scst_debug.h>
-+
-+#define TRACE_D_WRITE 0x80000000
-+#define TRACE_CONN_OC 0x40000000
-+#define TRACE_D_IOV 0x20000000
-+#define TRACE_D_DUMP_PDU 0x10000000
-+#define TRACE_NET_PG 0x08000000
-+#define TRACE_CONN_OC_DBG 0x04000000
-+
-+#ifdef CONFIG_SCST_DEBUG
-+#define ISCSI_DEFAULT_LOG_FLAGS (TRACE_FUNCTION | TRACE_LINE | TRACE_PID | \
-+ TRACE_OUT_OF_MEM | TRACE_MGMT | TRACE_MGMT_DEBUG | \
-+ TRACE_MINOR | TRACE_SPECIAL | TRACE_CONN_OC)
-+#else
-+#define ISCSI_DEFAULT_LOG_FLAGS (TRACE_OUT_OF_MEM | TRACE_MGMT | \
-+ TRACE_SPECIAL)
-+#endif
-+
-+#ifdef CONFIG_SCST_DEBUG
-+struct iscsi_pdu;
-+struct iscsi_cmnd;
-+extern void iscsi_dump_pdu(struct iscsi_pdu *pdu);
-+extern unsigned long iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(
-+ struct iscsi_cmnd *cmnd);
-+#else
-+#define iscsi_dump_pdu(x) do {} while (0)
-+#define iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(x) do {} while (0)
-+#endif
-+
-+#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
-+extern unsigned long iscsi_trace_flag;
-+#define trace_flag iscsi_trace_flag
-+#endif
-+
-+#define TRACE_CONN_CLOSE(args...) TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_CONN_OC, args)
-+#define TRACE_CONN_CLOSE_DBG(args...) TRACE(TRACE_CONN_OC_DBG, args)
-+#define TRACE_NET_PAGE(args...) TRACE_DBG_FLAG(TRACE_NET_PG, args)
-+#define TRACE_WRITE(args...) TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_D_WRITE, args)
-+
-+#endif
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi_hdr.h linux-2.6.35/drivers/scst/iscsi-scst/iscsi_hdr.h
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi_hdr.h
-+++ linux-2.6.35/drivers/scst/iscsi-scst/iscsi_hdr.h
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_hdr.h linux-2.6.36/drivers/scst/iscsi-scst/iscsi_hdr.h
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/iscsi_hdr.h
++++ linux-2.6.36/drivers/scst/iscsi-scst/iscsi_hdr.h
@@ -0,0 +1,525 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
@@ -59311,9 +58586,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/iscsi_hdr.h linux-2.6.35/dr
+#define cmnd_scsicode(cmnd) (cmnd_hdr((cmnd))->scb[0])
+
+#endif /* __ISCSI_HDR_H__ */
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/nthread.c linux-2.6.35/drivers/scst/iscsi-scst/nthread.c
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/nthread.c
-+++ linux-2.6.35/drivers/scst/iscsi-scst/nthread.c
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/nthread.c linux-2.6.36/drivers/scst/iscsi-scst/nthread.c
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/nthread.c
++++ linux-2.6.36/drivers/scst/iscsi-scst/nthread.c
@@ -0,0 +1,1838 @@
+/*
+ * Network threads.
@@ -61153,9 +60428,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/nthread.c linux-2.6.35/driv
+ TRACE_EXIT();
+ return 0;
+}
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/param.c linux-2.6.35/drivers/scst/iscsi-scst/param.c
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/param.c
-+++ linux-2.6.35/drivers/scst/iscsi-scst/param.c
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/param.c linux-2.6.36/drivers/scst/iscsi-scst/param.c
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/param.c
++++ linux-2.6.36/drivers/scst/iscsi-scst/param.c
@@ -0,0 +1,306 @@
+/*
+ * Copyright (C) 2005 FUJITA Tomonori <tomof@acm.org>
@@ -61463,9 +60738,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/param.c linux-2.6.35/driver
+out:
+ return err;
+}
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/session.c linux-2.6.35/drivers/scst/iscsi-scst/session.c
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/session.c
-+++ linux-2.6.35/drivers/scst/iscsi-scst/session.c
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/session.c linux-2.6.36/drivers/scst/iscsi-scst/session.c
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/session.c
++++ linux-2.6.36/drivers/scst/iscsi-scst/session.c
@@ -0,0 +1,499 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
@@ -61966,9 +61241,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/session.c linux-2.6.35/driv
+ NULL,
+};
+
-diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/target.c linux-2.6.35/drivers/scst/iscsi-scst/target.c
---- orig/linux-2.6.35/drivers/scst/iscsi-scst/target.c
-+++ linux-2.6.35/drivers/scst/iscsi-scst/target.c
+diff -uprN orig/linux-2.6.36/drivers/scst/iscsi-scst/target.c linux-2.6.36/drivers/scst/iscsi-scst/target.c
+--- orig/linux-2.6.36/drivers/scst/iscsi-scst/target.c
++++ linux-2.6.36/drivers/scst/iscsi-scst/target.c
@@ -0,0 +1,533 @@
+/*
+ * Copyright (C) 2002 - 2003 Ardis Technolgies <roman@ardistech.com>
@@ -62503,9 +61778,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/iscsi-scst/target.c linux-2.6.35/drive
+ return res;
+}
+
-diff -uprN orig/linux-2.6.35/Documentation/scst/README.iscsi linux-2.6.35/Documentation/scst/README.iscsi
---- orig/linux-2.6.35/Documentation/scst/README.iscsi
-+++ linux-2.6.35/Documentation/scst/README.iscsi
+diff -uprN orig/linux-2.6.36/Documentation/scst/README.iscsi linux-2.6.36/Documentation/scst/README.iscsi
+--- orig/linux-2.6.36/Documentation/scst/README.iscsi
++++ linux-2.6.36/Documentation/scst/README.iscsi
@@ -0,0 +1,741 @@
+iSCSI SCST target driver
+========================
@@ -63248,9 +62523,9 @@ diff -uprN orig/linux-2.6.35/Documentation/scst/README.iscsi linux-2.6.35/Docume
+
+Vladislav Bolkhovitin <vst@vlnb.net>, http://scst.sourceforge.net
+
-diff -uprN orig/linux-2.6.35/drivers/scsi/qla2xxx/qla2x_tgt.h linux-2.6.35/drivers/scsi/qla2xxx/qla2x_tgt.h
---- orig/linux-2.6.35/drivers/scsi/qla2xxx/qla2x_tgt.h
-+++ linux-2.6.35/drivers/scsi/qla2xxx/qla2x_tgt.h
+diff -uprN orig/linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt.h linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt.h
+--- orig/linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt.h
++++ linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt.h
@@ -0,0 +1,131 @@
+/*
+ * qla2x_tgt.h
@@ -63383,9 +62658,9 @@ diff -uprN orig/linux-2.6.35/drivers/scsi/qla2xxx/qla2x_tgt.h linux-2.6.35/drive
+#endif /* CONFIG_SCSI_QLA2XXX_TARGET */
+
+#endif /* __QLA2X_TGT_H */
-diff -uprN orig/linux-2.6.35/drivers/scsi/qla2xxx/qla2x_tgt_def.h linux-2.6.35/drivers/scsi/qla2xxx/qla2x_tgt_def.h
---- orig/linux-2.6.35/drivers/scsi/qla2xxx/qla2x_tgt_def.h
-+++ linux-2.6.35/drivers/scsi/qla2xxx/qla2x_tgt_def.h
+diff -uprN orig/linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt_def.h linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt_def.h
+--- orig/linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt_def.h
++++ linux-2.6.36/drivers/scsi/qla2xxx/qla2x_tgt_def.h
@@ -0,0 +1,729 @@
+/*
+ * qla2x_tgt_def.h
@@ -64116,18 +63391,18 @@ diff -uprN orig/linux-2.6.35/drivers/scsi/qla2xxx/qla2x_tgt_def.h linux-2.6.35/d
+int qla2x00_wait_for_hba_online(scsi_qla_host_t *ha);
+
+#endif /* __QLA2X_TGT_DEF_H */
-diff -uprN orig/linux-2.6.35/drivers/scst/qla2xxx-target/Makefile linux-2.6.35/drivers/scst/qla2xxx-target/Makefile
---- orig/linux-2.6.35/drivers/scst/qla2xxx-target/Makefile
-+++ linux-2.6.35/drivers/scst/qla2xxx-target/Makefile
+diff -uprN orig/linux-2.6.36/drivers/scst/qla2xxx-target/Makefile linux-2.6.36/drivers/scst/qla2xxx-target/Makefile
+--- orig/linux-2.6.36/drivers/scst/qla2xxx-target/Makefile
++++ linux-2.6.36/drivers/scst/qla2xxx-target/Makefile
@@ -0,0 +1,5 @@
+ccflags-y += -Idrivers/scsi/qla2xxx
+
+qla2x00tgt-y := qla2x00t.o
+
+obj-$(CONFIG_SCST_QLA_TGT_ADDON) += qla2x00tgt.o
-diff -uprN orig/linux-2.6.35/drivers/scst/qla2xxx-target/Kconfig linux-2.6.35/drivers/scst/qla2xxx-target/Kconfig
---- orig/linux-2.6.35/drivers/scst/qla2xxx-target/Kconfig
-+++ linux-2.6.35/drivers/scst/qla2xxx-target/Kconfig
+diff -uprN orig/linux-2.6.36/drivers/scst/qla2xxx-target/Kconfig linux-2.6.36/drivers/scst/qla2xxx-target/Kconfig
+--- orig/linux-2.6.36/drivers/scst/qla2xxx-target/Kconfig
++++ linux-2.6.36/drivers/scst/qla2xxx-target/Kconfig
@@ -0,0 +1,30 @@
+config SCST_QLA_TGT_ADDON
+ tristate "QLogic 2XXX Target Mode Add-On"
@@ -64159,9 +63434,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/qla2xxx-target/Kconfig linux-2.6.35/dr
+ performance loss.
+
+ If unsure, say "N".
-diff -uprN orig/linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.c linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.c
---- orig/linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.c
-+++ linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.c
+diff -uprN orig/linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.c linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.c
+--- orig/linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.c
++++ linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.c
@@ -0,0 +1,5486 @@
+/*
+ * qla2x00t.c
@@ -69649,9 +68924,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.c linux-2.6.35
+MODULE_DESCRIPTION("Target mode addon for qla2[2,3,4,5+]xx");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(Q2T_VERSION_STRING);
-diff -uprN orig/linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.h linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.h
---- orig/linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.h
-+++ linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.h
+diff -uprN orig/linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.h linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.h
+--- orig/linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.h
++++ linux-2.6.36/drivers/scst/qla2xxx-target/qla2x00t.h
@@ -0,0 +1,273 @@
+/*
+ * qla2x00t.h
@@ -69686,7 +68961,7 @@ diff -uprN orig/linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.h linux-2.6.35
+/* Version numbers, the same as for the kernel */
+#define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d))
+#define Q2T_VERSION_CODE Q2T_VERSION(1, 0, 2, 0)
-+#define Q2T_VERSION_STRING "2.0.0-rc3"
++#define Q2T_VERSION_STRING "2.0.0"
+#define Q2T_PROC_VERSION_NAME "version"
+
+#define Q2T_MAX_CDB_LEN 16
@@ -69926,9 +69201,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/qla2xxx-target/qla2x00t.h linux-2.6.35
+#define Q2T_XMIT_ALL (Q2T_XMIT_STATUS|Q2T_XMIT_DATA)
+
+#endif /* __QLA2X00T_H */
-diff -uprN orig/linux-2.6.35/Documentation/scst/README.qla2x00t linux-2.6.35/Documentation/scst/README.qla2x00t
---- orig/linux-2.6.35/Documentation/scst/README.qla2x00t
-+++ linux-2.6.35/Documentation/scst/README.qla2x00t
+diff -uprN orig/linux-2.6.36/Documentation/scst/README.qla2x00t linux-2.6.36/Documentation/scst/README.qla2x00t
+--- orig/linux-2.6.36/Documentation/scst/README.qla2x00t
++++ linux-2.6.36/Documentation/scst/README.qla2x00t
@@ -0,0 +1,526 @@
+Target driver for Qlogic 22xx/23xx/24xx/25xx Fibre Channel cards
+================================================================
@@ -70456,9 +69731,9 @@ diff -uprN orig/linux-2.6.35/Documentation/scst/README.qla2x00t linux-2.6.35/Doc
+ * Ming Zhang <mingz@ele.uri.edu> for fixes.
+
+Vladislav Bolkhovitin <vst@vlnb.net>, http://scst.sourceforge.net
-diff -uprN orig/linux-2.6.35/drivers/scst/srpt/Kconfig linux-2.6.35/drivers/scst/srpt/Kconfig
---- orig/linux-2.6.35/drivers/scst/srpt/Kconfig
-+++ linux-2.6.35/drivers/scst/srpt/Kconfig
+diff -uprN orig/linux-2.6.36/drivers/scst/srpt/Kconfig linux-2.6.36/drivers/scst/srpt/Kconfig
+--- orig/linux-2.6.36/drivers/scst/srpt/Kconfig
++++ linux-2.6.36/drivers/scst/srpt/Kconfig
@@ -0,0 +1,12 @@
+config SCST_SRPT
+ tristate "InfiniBand SCSI RDMA Protocol target support"
@@ -70472,14 +69747,14 @@ diff -uprN orig/linux-2.6.35/drivers/scst/srpt/Kconfig linux-2.6.35/drivers/scst
+ supported by InfiniBand and by iWarp network hardware. More
+ information about the SRP protocol can be found on the website
+ of the INCITS T10 technical committee (http://www.t10.org/).
-diff -uprN orig/linux-2.6.35/drivers/scst/srpt/Makefile linux-2.6.35/drivers/scst/srpt/Makefile
---- orig/linux-2.6.35/drivers/scst/srpt/Makefile
-+++ linux-2.6.35/drivers/scst/srpt/Makefile
+diff -uprN orig/linux-2.6.36/drivers/scst/srpt/Makefile linux-2.6.36/drivers/scst/srpt/Makefile
+--- orig/linux-2.6.36/drivers/scst/srpt/Makefile
++++ linux-2.6.36/drivers/scst/srpt/Makefile
@@ -0,0 +1,1 @@
+obj-$(CONFIG_SCST_SRPT) += ib_srpt.o
-diff -uprN orig/linux-2.6.35/drivers/scst/srpt/ib_dm_mad.h linux-2.6.35/drivers/scst/srpt/ib_dm_mad.h
---- orig/linux-2.6.35/drivers/scst/srpt/ib_dm_mad.h
-+++ linux-2.6.35/drivers/scst/srpt/ib_dm_mad.h
+diff -uprN orig/linux-2.6.36/drivers/scst/srpt/ib_dm_mad.h linux-2.6.36/drivers/scst/srpt/ib_dm_mad.h
+--- orig/linux-2.6.36/drivers/scst/srpt/ib_dm_mad.h
++++ linux-2.6.36/drivers/scst/srpt/ib_dm_mad.h
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2006 - 2009 Mellanox Technology Inc. All rights reserved.
@@ -70620,9 +69895,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/srpt/ib_dm_mad.h linux-2.6.35/drivers/
+};
+
+#endif
-diff -uprN orig/linux-2.6.35/drivers/scst/srpt/ib_srpt.c linux-2.6.35/drivers/scst/srpt/ib_srpt.c
---- orig/linux-2.6.35/drivers/scst/srpt/ib_srpt.c
-+++ linux-2.6.35/drivers/scst/srpt/ib_srpt.c
+diff -uprN orig/linux-2.6.36/drivers/scst/srpt/ib_srpt.c linux-2.6.36/drivers/scst/srpt/ib_srpt.c
+--- orig/linux-2.6.36/drivers/scst/srpt/ib_srpt.c
++++ linux-2.6.36/drivers/scst/srpt/ib_srpt.c
@@ -0,0 +1,3698 @@
+/*
+ * Copyright (c) 2006 - 2009 Mellanox Technology Inc. All rights reserved.
@@ -74322,9 +73597,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/srpt/ib_srpt.c linux-2.6.35/drivers/sc
+ * indent-tabs-mode: t
+ * End:
+ */
-diff -uprN orig/linux-2.6.35/drivers/scst/srpt/ib_srpt.h linux-2.6.35/drivers/scst/srpt/ib_srpt.h
---- orig/linux-2.6.35/drivers/scst/srpt/ib_srpt.h
-+++ linux-2.6.35/drivers/scst/srpt/ib_srpt.h
+diff -uprN orig/linux-2.6.36/drivers/scst/srpt/ib_srpt.h linux-2.6.36/drivers/scst/srpt/ib_srpt.h
+--- orig/linux-2.6.36/drivers/scst/srpt/ib_srpt.h
++++ linux-2.6.36/drivers/scst/srpt/ib_srpt.h
@@ -0,0 +1,353 @@
+/*
+ * Copyright (c) 2006 - 2009 Mellanox Technology Inc. All rights reserved.
@@ -74679,9 +73954,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/srpt/ib_srpt.h linux-2.6.35/drivers/sc
+ * indent-tabs-mode: t
+ * End:
+ */
-diff -uprN orig/linux-2.6.35/Documentation/scst/README.srpt linux-2.6.35/Documentation/scst/README.srpt
---- orig/linux-2.6.35/Documentation/scst/README.srpt
-+++ linux-2.6.35/Documentation/scst/README.srpt
+diff -uprN orig/linux-2.6.36/Documentation/scst/README.srpt linux-2.6.36/Documentation/scst/README.srpt
+--- orig/linux-2.6.36/Documentation/scst/README.srpt
++++ linux-2.6.36/Documentation/scst/README.srpt
@@ -0,0 +1,109 @@
+SCSI RDMA Protocol (SRP) Target driver for Linux
+=================================================
@@ -74792,9 +74067,9 @@ diff -uprN orig/linux-2.6.35/Documentation/scst/README.srpt linux-2.6.35/Documen
+
+Send questions about this driver to scst-devel@lists.sourceforge.net, CC:
+Vu Pham <vuhuong@mellanox.com> and Bart Van Assche <bart.vanassche@gmail.com>.
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_local/Kconfig linux-2.6.35/drivers/scst/scst_local/Kconfig
---- orig/linux-2.6.35/drivers/scst/scst_local/Kconfig
-+++ linux-2.6.35/drivers/scst/scst_local/Kconfig
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_local/Kconfig linux-2.6.36/drivers/scst/scst_local/Kconfig
+--- orig/linux-2.6.36/drivers/scst/scst_local/Kconfig
++++ linux-2.6.36/drivers/scst/scst_local/Kconfig
@@ -0,0 +1,22 @@
+config SCST_LOCAL
+ tristate "SCST Local driver"
@@ -74818,15 +74093,15 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_local/Kconfig linux-2.6.35/driver
+ unsafe.
+
+ If unsure, say "N".
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_local/Makefile linux-2.6.35/drivers/scst/scst_local/Makefile
---- orig/linux-2.6.35/drivers/scst/scst_local/Makefile
-+++ linux-2.6.35/drivers/scst/scst_local/Makefile
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_local/Makefile linux-2.6.36/drivers/scst/scst_local/Makefile
+--- orig/linux-2.6.36/drivers/scst/scst_local/Makefile
++++ linux-2.6.36/drivers/scst/scst_local/Makefile
@@ -0,0 +1,2 @@
+obj-$(CONFIG_SCST_LOCAL) += scst_local.o
+
-diff -uprN orig/linux-2.6.35/drivers/scst/scst_local/scst_local.c linux-2.6.35/drivers/scst/scst_local/scst_local.c
---- orig/linux-2.6.35/drivers/scst/scst_local/scst_local.c
-+++ linux-2.6.35/drivers/scst/scst_local/scst_local.c
+diff -uprN orig/linux-2.6.36/drivers/scst/scst_local/scst_local.c linux-2.6.36/drivers/scst/scst_local/scst_local.c
+--- orig/linux-2.6.36/drivers/scst/scst_local/scst_local.c
++++ linux-2.6.36/drivers/scst/scst_local/scst_local.c
@@ -0,0 +1,1563 @@
+/*
+ * Copyright (C) 2008 - 2010 Richard Sharpe
@@ -76391,9 +75666,9 @@ diff -uprN orig/linux-2.6.35/drivers/scst/scst_local/scst_local.c linux-2.6.35/d
+device_initcall(scst_local_init);
+module_exit(scst_local_exit);
+
-diff -uprN orig/linux-2.6.35/Documentation/scst/README.scst_local linux-2.6.35/Documentation/scst/README.scst_local
---- orig/linux-2.6.35/Documentation/scst/README.scst_local
-+++ linux-2.6.35/Documentation/scst/README.scst_local
+diff -uprN orig/linux-2.6.36/Documentation/scst/README.scst_local linux-2.6.36/Documentation/scst/README.scst_local
+--- orig/linux-2.6.36/Documentation/scst/README.scst_local
++++ linux-2.6.36/Documentation/scst/README.scst_local
@@ -0,0 +1,259 @@
+SCST Local ...
+Richard Sharpe, 30-Nov-2008
diff --git a/testing/linux-scst/unionfs-2.5.7_for_2.6.35.8.patch b/testing/linux-scst/unionfs-2.5.7_for_2.6.36.diff
index 52fd9d8aa1..fabe758098 100644
--- a/testing/linux-scst/unionfs-2.5.7_for_2.6.35.8.patch
+++ b/testing/linux-scst/unionfs-2.5.7_for_2.6.36.diff
@@ -532,10 +532,10 @@ index 0000000..1adde69
+
+For more information, see <http://unionfs.filesystems.org/>.
diff --git a/MAINTAINERS b/MAINTAINERS
-index 02f75fc..8c5efe7 100644
+index f2a2b8e..11d7f45 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -5766,6 +5766,14 @@ F: Documentation/cdrom/
+@@ -5917,6 +5917,14 @@ F: Documentation/cdrom/
F: drivers/cdrom/cdrom.c
F: include/linux/cdrom.h
@@ -551,7 +551,7 @@ index 02f75fc..8c5efe7 100644
M: Artem Bityutskiy <dedekind1@gmail.com>
W: http://www.linux-mtd.infradead.org/
diff --git a/fs/Kconfig b/fs/Kconfig
-index 5f85b59..7b4501b 100644
+index 3d18530..65b6aa1 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -169,6 +169,7 @@ if MISC_FILESYSTEMS
@@ -575,10 +575,10 @@ index e6ec1d3..787332e 100644
obj-$(CONFIG_NFS_FS) += nfs/
obj-$(CONFIG_EXPORTFS) += exportfs/
diff --git a/fs/namei.c b/fs/namei.c
-index 868d0cb..b5e09e1 100644
+index 24896e8..db22420 100644
--- a/fs/namei.c
+++ b/fs/namei.c
-@@ -386,6 +386,7 @@ void release_open_intent(struct nameidata *nd)
+@@ -385,6 +385,7 @@ void release_open_intent(struct nameidata *nd)
else
fput(nd->intent.open.file);
}
@@ -587,10 +587,10 @@ index 868d0cb..b5e09e1 100644
static inline struct dentry *
do_revalidate(struct dentry *dentry, struct nameidata *nd)
diff --git a/fs/splice.c b/fs/splice.c
-index efdbfec..1ff6bca 100644
+index 8f1dfae..7a57fab 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -1104,8 +1104,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -1092,8 +1092,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
@@ -601,7 +601,7 @@ index efdbfec..1ff6bca 100644
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
-@@ -1128,13 +1128,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1116,13 +1116,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
@@ -619,7 +619,7 @@ index efdbfec..1ff6bca 100644
{
ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int);
-@@ -1154,6 +1155,7 @@ static long do_splice_to(struct file *in, loff_t *ppos,
+@@ -1142,6 +1143,7 @@ static long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
@@ -627,7 +627,7 @@ index efdbfec..1ff6bca 100644
/**
* splice_direct_to_actor - splices data directly between two non-pipes
-@@ -1223,7 +1225,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
+@@ -1211,7 +1213,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
size_t read_len;
loff_t pos = sd->pos, prev_pos = pos;
@@ -636,7 +636,7 @@ index efdbfec..1ff6bca 100644
if (unlikely(ret <= 0))
goto out_release;
-@@ -1282,8 +1284,8 @@ static int direct_splice_actor(struct pipe_inode_info *pipe,
+@@ -1270,8 +1272,8 @@ static int direct_splice_actor(struct pipe_inode_info *pipe,
{
struct file *file = sd->u.file;
@@ -647,7 +647,7 @@ index efdbfec..1ff6bca 100644
}
/**
-@@ -1380,7 +1382,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
+@@ -1368,7 +1370,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
} else
off = &out->f_pos;
@@ -656,7 +656,7 @@ index efdbfec..1ff6bca 100644
if (off_out && copy_to_user(off_out, off, sizeof(loff_t)))
ret = -EFAULT;
-@@ -1400,7 +1402,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
+@@ -1388,7 +1390,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
} else
off = &in->f_pos;
@@ -723,11 +723,11 @@ index 0000000..f3c1ac4
+ If you say Y here, you can turn on debugging output from Unionfs.
diff --git a/fs/unionfs/Makefile b/fs/unionfs/Makefile
new file mode 100644
-index 0000000..d34e085
+index 0000000..86c32ba
--- /dev/null
+++ b/fs/unionfs/Makefile
@@ -0,0 +1,17 @@
-+UNIONFS_VERSION="2.5.7 (for 2.6.35.8)"
++UNIONFS_VERSION="2.5.7 (for 2.6.36)"
+
+EXTRA_CFLAGS += -DUNIONFS_VERSION=\"$(UNIONFS_VERSION)\"
+
@@ -746,7 +746,7 @@ index 0000000..d34e085
+endif
diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
new file mode 100644
-index 0000000..740c4ad
+index 0000000..51ea65e
--- /dev/null
+++ b/fs/unionfs/commonfops.c
@@ -0,0 +1,896 @@
@@ -1491,12 +1491,12 @@ index 0000000..740c4ad
+ goto out;
+ if (lower_file->f_op->unlocked_ioctl) {
+ err = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg);
++#ifdef CONFIG_COMPAT
+ } else if (lower_file->f_op->ioctl) {
-+ lock_kernel();
-+ err = lower_file->f_op->ioctl(
++ err = lower_file->f_op->compat_ioctl(
+ lower_file->f_path.dentry->d_inode,
+ lower_file, cmd, arg);
-+ unlock_kernel();
++#endif
+ }
+
+out:
@@ -4376,10 +4376,10 @@ index 0000000..5b77eac
+#endif /* not _FANOUT_H */
diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c
new file mode 100644
-index 0000000..5a8f4e0
+index 0000000..1c694c3
--- /dev/null
+++ b/fs/unionfs/file.c
-@@ -0,0 +1,379 @@
+@@ -0,0 +1,382 @@
+/*
+ * Copyright (c) 2003-2010 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
@@ -4750,6 +4750,9 @@ index 0000000..5a8f4e0
+ .write = unionfs_write,
+ .readdir = unionfs_file_readdir,
+ .unlocked_ioctl = unionfs_ioctl,
++#ifdef CONFIG_COMPAT
++ .compat_ioctl = unionfs_ioctl,
++#endif
+ .mmap = unionfs_mmap,
+ .open = unionfs_open,
+ .flush = unionfs_flush,
@@ -8381,10 +8384,10 @@ index 0000000..570a344
+}
diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
new file mode 100644
-index 0000000..a8f5571
+index 0000000..45bb9bf
--- /dev/null
+++ b/fs/unionfs/super.c
-@@ -0,0 +1,1048 @@
+@@ -0,0 +1,1029 @@
+/*
+ * Copyright (c) 2003-2010 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
@@ -8461,31 +8464,6 @@ index 0000000..a8f5571
+}
+
+/*
-+ * we now define delete_inode, because there are two VFS paths that may
-+ * destroy an inode: one of them calls clear inode before doing everything
-+ * else that's needed, and the other is fine. This way we truncate the inode
-+ * size (and its pages) and then clear our own inode, which will do an iput
-+ * on our and the lower inode.
-+ *
-+ * No need to lock sb info's rwsem.
-+ */
-+static void unionfs_delete_inode(struct inode *inode)
-+{
-+#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
-+ spin_lock(&inode->i_lock);
-+#endif
-+ i_size_write(inode, 0); /* every f/s seems to do that */
-+#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
-+ spin_unlock(&inode->i_lock);
-+#endif
-+
-+ if (inode->i_data.nrpages)
-+ truncate_inode_pages(&inode->i_data, 0);
-+
-+ clear_inode(inode);
-+}
-+
-+/*
+ * final actions when unmounting a file system
+ *
+ * No need to lock rwsem.
@@ -8538,6 +8516,7 @@ index 0000000..a8f5571
+ struct super_block *sb;
+ struct dentry *lower_dentry;
+ struct dentry *parent;
++ struct path lower_path;
+ bool valid;
+
+ sb = dentry->d_sb;
@@ -8554,7 +8533,10 @@ index 0000000..a8f5571
+ unionfs_check_dentry(dentry);
+
+ lower_dentry = unionfs_lower_dentry(sb->s_root);
-+ err = vfs_statfs(lower_dentry, buf);
++ lower_path.dentry = lower_dentry;
++ lower_path.mnt = unionfs_mntget(sb->s_root, 0);
++ err = vfs_statfs(&lower_path, buf);
++ mntput(lower_path.mnt);
+
+ /* set return buf to our f/s to avoid confusing user-level utils */
+ buf->f_type = UNIONFS_SUPER_MAGIC;
@@ -9235,13 +9217,16 @@ index 0000000..a8f5571
+ *
+ * No need to lock sb info's rwsem.
+ */
-+static void unionfs_clear_inode(struct inode *inode)
++static void unionfs_evict_inode(struct inode *inode)
+{
+ int bindex, bstart, bend;
+ struct inode *lower_inode;
+ struct list_head *pos, *n;
+ struct unionfs_dir_state *rdstate;
+
++ truncate_inode_pages(&inode->i_data, 0);
++ end_writeback(inode);
++
+ list_for_each_safe(pos, n, &UNIONFS_I(inode)->readdircache) {
+ rdstate = list_entry(pos, struct unionfs_dir_state, cache);
+ list_del(&rdstate->cache);
@@ -9422,11 +9407,10 @@ index 0000000..a8f5571
+}
+
+struct super_operations unionfs_sops = {
-+ .delete_inode = unionfs_delete_inode,
+ .put_super = unionfs_put_super,
+ .statfs = unionfs_statfs,
+ .remount_fs = unionfs_remount_fs,
-+ .clear_inode = unionfs_clear_inode,
++ .evict_inode = unionfs_evict_inode,
+ .umount_begin = unionfs_umount_begin,
+ .show_options = unionfs_show_options,
+ .write_inode = unionfs_write_inode,
@@ -11256,10 +11240,10 @@ index 0000000..c84d97e
+#endif /* _LINUX_UNIONFS_H */
+
diff --git a/security/security.c b/security/security.c
-index 351942a..69505f7 100644
+index c53949f..eb71394 100644
--- a/security/security.c
+++ b/security/security.c
-@@ -529,6 +529,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -528,6 +528,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return security_ops->inode_permission(inode, mask);
}