diff options
author | Richard Yao <ryao@gentoo.org> | 2013-01-03 11:09:59 +0000 |
---|---|---|
committer | Richard Yao <ryao@gentoo.org> | 2013-01-03 11:09:59 +0000 |
commit | ddd44baec7c25e5b286ef05342dafe7a56a8b064 (patch) | |
tree | 53d80277d5a5bfed19d88ae4f59f682f3d990c7c /sys-block/iscsitarget/files | |
parent | Stable for amd64, wrt bug #449912 (diff) | |
download | historical-ddd44baec7c25e5b286ef05342dafe7a56a8b064.tar.gz historical-ddd44baec7c25e5b286ef05342dafe7a56a8b064.tar.bz2 historical-ddd44baec7c25e5b286ef05342dafe7a56a8b064.zip |
Change primary maintainer to ryao (as per Chainsaw) and import snapshot of upstream SVN to add support for Linux 2.6.38 to Linux 3.6
Package-Manager: portage-2.1.11.31/cvs/Linux x86_64
Diffstat (limited to 'sys-block/iscsitarget/files')
-rw-r--r-- | sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch | 135 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch | 96 |
2 files changed, 231 insertions, 0 deletions
diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch new file mode 100644 index 000000000000..d41751535d31 --- /dev/null +++ b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch @@ -0,0 +1,135 @@ +diff --git a/Makefile b/Makefile +index df41642..f2f17c8 100644 +--- a/Makefile ++++ b/Makefile +@@ -46,18 +46,10 @@ kver_lt = $(shell [ $(KMAJ) -lt $(1) -o \ + $(KMAJ) -eq $(1) -a $(KMIN) -lt $(2) -o \ + $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -lt $(3) ] && \ + echo 1 || echo 0) +-kver_le = $(shell [ $(KMAJ) -lt $(1) -o \ +- $(KMAJ) -eq $(1) -a $(KMIN) -lt $(2) -o \ +- $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -le $(3) ] && \ +- echo 1 || echo 0) +-kver_gt = $(shell [ ( $(KMAJ) -gt $(1) ) -o \ ++kver_gt = $(shell [ $(KMAJ) -gt $(1) -o \ + $(KMAJ) -eq $(1) -a $(KMIN) -gt $(2) -o \ + $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -gt $(3) ] && \ + echo 1 || echo 0) +-kver_ge = $(shell [ ( $(KMAJ) -gt $(1) ) -o \ +- $(KMAJ) -eq $(1) -a $(KMIN) -gt $(2) -o \ +- $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -ge $(3) ] && \ +- echo 1 || echo 0) + kver_lk = $(shell [ `echo $(KVER) | egrep $(1)` ] && echo 1 || echo 0) + + # +@@ -66,85 +58,93 @@ kver_lk = $(shell [ `echo $(KVER) | egrep $(1)` ] && echo 1 || echo 0) + # base first the earlier patch sets will not need to be modified. + # + +-ifeq ($(call kver_le,3,5,0),1) ++ifeq ($(call kver_lt,3,6,0),1) + PATCHES := $(PATCHES) compat-3.5.patch + endif + +-ifeq ($(call kver_le,3,4,0),1) ++ifeq ($(call kver_lt,3,5,0),1) + PATCHES := $(PATCHES) compat-3.2-3.4.patch + endif + +-ifeq ($(call kver_le,3,2,0),1) ++ifeq ($(call kver_lt,3,3,0),1) + PATCHES := $(PATCHES) compat-2.6.39-3.2.patch + endif + +-ifeq ($(call kver_le,2,6,38),1) ++ifeq ($(call kver_lt,2,6,39),1) + PATCHES := $(PATCHES) compat-2.6.38.patch + endif + +-ifeq ($(call kver_le,2,6,37),1) ++ifeq ($(call kver_lt,2,6,38),1) + PATCHES := $(PATCHES) compat-2.6.36-2.6.37.patch + endif + + # Compatibility patch for kernels > 2.6.32 <= 2.6.35 +-ifeq ($(call kver_le,2,6,35),1) ++ifeq ($(call kver_lt,2,6,36),1) ++ifeq ($(call kver_gt,2,6,32),1) + PATCHES := $(PATCHES) compat-2.6.33-2.6.35.patch + endif ++endif + + # Compatibility patch for kernels <= 2.6.32 +-ifeq ($(call kver_le,2,6,32),1) ++ifeq ($(call kver_lt,2,6,33),1) + PATCHES := $(PATCHES) compat-2.6.32.patch + endif + + # Compatibility patch for kernels <= 2.6.31 +-ifeq ($(call kver_le,2,6,31),1) ++ifeq ($(call kver_lt,2,6,32),1) + PATCHES := $(PATCHES) compat-2.6.31.patch + endif + + # Compatibility patch for kernels <= 2.6.30 +-ifeq ($(call kver_le,2,6,30),1) ++ifeq ($(call kver_lt,2,6,31),1) + PATCHES := $(PATCHES) compat-2.6.30.patch + endif + + # Compatibility patch for kernels <= 2.6.29 +-ifeq ($(call kver_le,2,6,29),1) ++ifeq ($(call kver_lt,2,6,30),1) + PATCHES := $(PATCHES) compat-2.6.29.patch + endif + + # Compatibility patch for kernels <= 2.6.28 +-ifeq ($(call kver_le,2,6,28),1) ++ifeq ($(call kver_lt,2,6,29),1) + PATCHES := $(PATCHES) compat-2.6.28.patch + endif + + # Compatibility patch for kernels >= 2.6.25 and <= 2.6.27 +-ifeq ($(call kver_le,2,6,27),1) ++ifeq ($(call kver_lt,2,6,28),1) ++ifeq ($(call kver_gt,2,6,24),1) + PATCHES := $(PATCHES) compat-2.6.25-2.6.27.patch + endif ++endif + + # Compatibility patch for kernels <= 2.6.24 +-ifeq ($(call kver_le,2,6,24),1) ++ifeq ($(call kver_lt,2,6,25),1) + PATCHES := $(PATCHES) compat-2.6.24.patch + endif + + # Compatibility patch for kernels <= 2.6.23 +-ifeq ($(call kver_le,2,6,23),1) ++ifeq ($(call kver_lt,2,6,24),1) + PATCHES := $(PATCHES) compat-2.6.23.patch + endif + + # Compatibility patch for kernels <= 2.6.22 +-ifeq ($(call kver_le,2,6,22),1) ++ifeq ($(call kver_lt,2,6,23),1) + PATCHES := $(PATCHES) compat-2.6.22.patch + endif + + # Compatibility patch for kernels >= 2.6.19 and <= 2.6.21 +-ifeq ($(call kver_le,2,6,21),1) ++ifeq ($(call kver_lt,2,6,22),1) ++ifeq ($(call kver_gt,2,6,18),1) + PATCHES := $(PATCHES) compat-2.6.19-2.6.21.patch + endif ++endif + + # Compatibility patch for kernels >= 2.6.14 and <= 2.6.18 +-ifeq ($(call kver_le,2,6,18),1) ++ifeq ($(call kver_lt,2,6,19),1) ++ifeq ($(call kver_gt,2,6,13),1) + PATCHES := $(PATCHES) compat-2.6.14-2.6.18.patch + endif ++endif + + # We don't support kernels < 2.6.14 except for explicit distros + ifeq ($(call kver_lt,2,6,14),1) diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch new file mode 100644 index 000000000000..cc6a0b8c7e3c --- /dev/null +++ b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch @@ -0,0 +1,96 @@ +diff --git a/kernel/iscsi.c b/kernel/iscsi.c +index 9ad3047..37d7753 100644 +--- a/kernel/iscsi.c ++++ b/kernel/iscsi.c +@@ -773,6 +773,7 @@ static void set_offset_and_length(const struct iet_volume *lu, + break; + case READ_16: + case WRITE_16: ++#ifdef WRITE_SAME_16 + case WRITE_SAME_16: + *off = (u64)cmd[2] << 56 | (u64)cmd[3] << 48 | + (u64)cmd[4] << 40 | (u64)cmd[5] << 32 | +@@ -781,6 +782,7 @@ static void set_offset_and_length(const struct iet_volume *lu, + *len = (u32)cmd[10] << 24 | (u32)cmd[11] << 16 | + (u32)cmd[12] << 8 | (u32)cmd[13]; + break; ++#endif + case PERSISTENT_RESERVE_OUT: + { + const struct persistent_reserve_out *pr_out = +@@ -1036,6 +1038,7 @@ static void scsi_cmnd_start(struct iscsi_conn *conn, struct iscsi_cmnd *req) + case WRITE_10: + case WRITE_16: + case WRITE_VERIFY: ++#ifdef WRITE_SAME_16 + case WRITE_SAME_16: + { + struct iscsi_sess_param *param = &conn->session->param; +@@ -1104,6 +1107,7 @@ static void scsi_cmnd_start(struct iscsi_conn *conn, struct iscsi_cmnd *req) + } + break; + } ++#endif + error: + default: + eprintk("Unsupported %x\n", req_hdr->scb[0]); +diff --git a/kernel/iscsi_dbg.h b/kernel/iscsi_dbg.h +index 8c9b928..ad5c6d4 100644 +--- a/kernel/iscsi_dbg.h ++++ b/kernel/iscsi_dbg.h +@@ -12,7 +12,9 @@ + #define D_IOMODE (1UL << 8) + #define D_UAC (1UL << 9) + #define D_PR (1UL << 10) ++#ifdef WRITE_SAME_16 + #define D_VAAI (1UL << 11) ++#endif + + #define D_DATA (D_READ | D_WRITE) + +diff --git a/kernel/target_disk.c b/kernel/target_disk.c +index 6b1de2c..ca28e4e 100644 +--- a/kernel/target_disk.c ++++ b/kernel/target_disk.c +@@ -408,6 +408,7 @@ static void build_write_response(struct iscsi_cmnd *cmnd) + iscsi_cmnd_set_sense(cmnd, MEDIUM_ERROR, 0x03, 0x0); + } + ++#ifdef WRITE_SAME_16 + static void build_write_same_response(struct iscsi_cmnd *cmnd) { + int err; + struct tio *target_tio; +@@ -475,6 +476,7 @@ static void build_write_same_response(struct iscsi_cmnd *cmnd) { + + tio_put(target_tio); + } ++#endif + + static void build_sync_cache_response(struct iscsi_cmnd *cmnd) + { +@@ -618,9 +620,11 @@ static int disk_execute_cmnd(struct iscsi_cmnd *cmnd) + case WRITE_VERIFY: + send_scsi_rsp(cmnd, build_write_response); + break; ++#ifdef WRITE_SAME_16 + case WRITE_SAME_16: + send_scsi_rsp(cmnd, build_write_same_response); + break; ++#endif + case SYNCHRONIZE_CACHE: + send_scsi_rsp(cmnd, build_sync_cache_response); + break; +diff --git a/kernel/volume.c b/kernel/volume.c +index 8beeb1e..6ad2a3d 100644 +--- a/kernel/volume.c ++++ b/kernel/volume.c +@@ -446,7 +446,9 @@ int is_volume_reserved(struct iet_volume *volume, u64 sid, u8 *scb) + case WRITE_10: + case WRITE_12: + case WRITE_16: ++#ifdef WRITE_SAME_16 + case WRITE_SAME_16: ++#endif + case WRITE_VERIFY: + case SYNCHRONIZE_CACHE: + if (write_excl || excl_access) |