[ewg] [PATCH] iser backports for OFED1.4
Doron Shoham
dorons at voltaire.com
Tue Jun 17 08:30:07 PDT 2008
Add iser backports for OFED1.4
Signed-off-by: Doron Shoham <dorons at voltaire.com>
---
..._da9c0c770e775e655e3f77c96d91ee557b117adb.patch | 44 ++++++++++++
..._d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch | 12 +++
..._1548271ece9e9312fd5feb41fd58773b56a71d39.patch | 74 ++++++++++++++++++++
..._77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch | 38 ++++++++++
..._b2c6416736b847b91950bd43cc5153e11a1f83ee.patch | 18 +++++
..._857ae0bdb72999936a28ce621e38e2e288c485da.patch | 16 ++++
..._8ad5781ae9702a8f95cfdf30967752e4297613ee.patch | 14 ++++
..._0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch | 22 ++++++
.../2.6.9_U4/iser_09_fix_inclusion_order.patch | 13 ++++
..._da9c0c770e775e655e3f77c96d91ee557b117adb.patch | 44 ++++++++++++
..._d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch | 12 +++
..._1548271ece9e9312fd5feb41fd58773b56a71d39.patch | 74 ++++++++++++++++++++
..._77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch | 38 ++++++++++
..._b2c6416736b847b91950bd43cc5153e11a1f83ee.patch | 18 +++++
..._857ae0bdb72999936a28ce621e38e2e288c485da.patch | 16 ++++
..._8ad5781ae9702a8f95cfdf30967752e4297613ee.patch | 14 ++++
..._0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch | 22 ++++++
.../2.6.9_U5/iser_09_fix_inclusion_order.patch | 13 ++++
..._da9c0c770e775e655e3f77c96d91ee557b117adb.patch | 44 ++++++++++++
..._d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch | 12 +++
..._1548271ece9e9312fd5feb41fd58773b56a71d39.patch | 74 ++++++++++++++++++++
..._77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch | 38 ++++++++++
..._b2c6416736b847b91950bd43cc5153e11a1f83ee.patch | 18 +++++
..._857ae0bdb72999936a28ce621e38e2e288c485da.patch | 16 ++++
..._8ad5781ae9702a8f95cfdf30967752e4297613ee.patch | 14 ++++
..._0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch | 22 ++++++
.../2.6.9_U6/iser_09_fix_inclusion_order.patch | 13 ++++
27 files changed, 753 insertions(+), 0 deletions(-)
create mode 100644 kernel_patches/backport/2.6.9_U4/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch
create mode 100644 kernel_patches/backport/2.6.9_U4/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch
create mode 100644 kernel_patches/backport/2.6.9_U4/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch
create mode 100644 kernel_patches/backport/2.6.9_U4/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch
create mode 100644 kernel_patches/backport/2.6.9_U4/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch
create mode 100644 kernel_patches/backport/2.6.9_U4/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch
create mode 100644 kernel_patches/backport/2.6.9_U4/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch
create mode 100644 kernel_patches/backport/2.6.9_U4/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch
create mode 100644 kernel_patches/backport/2.6.9_U4/iser_09_fix_inclusion_order.patch
create mode 100644 kernel_patches/backport/2.6.9_U5/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch
create mode 100644 kernel_patches/backport/2.6.9_U5/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch
create mode 100644 kernel_patches/backport/2.6.9_U5/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch
create mode 100644 kernel_patches/backport/2.6.9_U5/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch
create mode 100644 kernel_patches/backport/2.6.9_U5/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch
create mode 100644 kernel_patches/backport/2.6.9_U5/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch
create mode 100644 kernel_patches/backport/2.6.9_U5/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch
create mode 100644 kernel_patches/backport/2.6.9_U5/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch
create mode 100644 kernel_patches/backport/2.6.9_U5/iser_09_fix_inclusion_order.patch
create mode 100644 kernel_patches/backport/2.6.9_U6/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch
create mode 100644 kernel_patches/backport/2.6.9_U6/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch
create mode 100644 kernel_patches/backport/2.6.9_U6/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch
create mode 100644 kernel_patches/backport/2.6.9_U6/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch
create mode 100644 kernel_patches/backport/2.6.9_U6/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch
create mode 100644 kernel_patches/backport/2.6.9_U6/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch
create mode 100644 kernel_patches/backport/2.6.9_U6/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch
create mode 100644 kernel_patches/backport/2.6.9_U6/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch
create mode 100644 kernel_patches/backport/2.6.9_U6/iser_09_fix_inclusion_order.patch
diff --git a/kernel_patches/backport/2.6.9_U4/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch b/kernel_patches/backport/2.6.9_U4/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch
new file mode 100644
index 0000000..101fdc6
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch
@@ -0,0 +1,44 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index bad8dac..75ecabe 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -211,10 +211,10 @@ iscsi_iser_ctask_xmit(struct iscsi_conn *conn,
+ int error = 0;
+
+ if (ctask->sc->sc_data_direction == DMA_TO_DEVICE) {
+- BUG_ON(scsi_bufflen(ctask->sc) == 0);
++ BUG_ON(ctask->sc->request_bufflen == 0);
+
+ debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
+- ctask->itt, scsi_bufflen(ctask->sc),
++ ctask->itt, ctask->sc->request_bufflen,
+ ctask->imm_count, ctask->unsol_count);
+ }
+
+diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
+index 5d62cc0..1ae80d8 100644
+--- a/drivers/infiniband/ulp/iser/iser_initiator.c
++++ b/drivers/infiniband/ulp/iser/iser_initiator.c
+@@ -349,12 +349,18 @@ int iser_send_command(struct iscsi_conn *conn,
+ else
+ data_buf = &iser_ctask->data[ISER_DIR_OUT];
+
+- if (scsi_sg_count(sc)) { /* using a scatter list */
+- data_buf->buf = scsi_sglist(sc);
+- data_buf->size = scsi_sg_count(sc);
++ if (sc->use_sg) { /* using a scatter list */
++ data_buf->buf = sc->request_buffer;
++ data_buf->size = sc->use_sg;
++ } else if (sc->request_bufflen) {
++ /* using a single buffer - convert it into one entry SG */
++ sg_init_one(&data_buf->sg_single,
++ sc->request_buffer, sc->request_bufflen);
++ data_buf->buf = &data_buf->sg_single;
++ data_buf->size = 1;
+ }
+
+- data_buf->data_len = scsi_bufflen(sc);
++ data_buf->data_len = sc->request_bufflen;
+
+ if (hdr->flags & ISCSI_FLAG_CMD_READ) {
+ err = iser_prepare_read_cmd(ctask, edtl);
diff --git a/kernel_patches/backport/2.6.9_U4/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch b/kernel_patches/backport/2.6.9_U4/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch
new file mode 100644
index 0000000..7b21cba
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch
@@ -0,0 +1,12 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index bad8dac..933429b 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -586,7 +586,6 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_FAST_ABORT | ISCSI_ABORT_TMO |
+ ISCSI_PING_TMO | ISCSI_RECV_TMO,
+ .host_param_mask = ISCSI_HOST_HWADDRESS |
+- ISCSI_HOST_NETDEV_NAME |
+ ISCSI_HOST_INITIATOR_NAME,
+ .host_template = &iscsi_iser_sht,
+ .conndata_size = sizeof(struct iscsi_conn),
diff --git a/kernel_patches/backport/2.6.9_U4/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch b/kernel_patches/backport/2.6.9_U4/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch
new file mode 100644
index 0000000..d72eb5a
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch
@@ -0,0 +1,74 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index bad8dac..7baac99 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -368,8 +368,7 @@ static struct iscsi_transport iscsi_iser_transport;
+ static struct iscsi_cls_session *
+ iscsi_iser_session_create(struct iscsi_transport *iscsit,
+ struct scsi_transport_template *scsit,
+- uint16_t cmds_max, uint16_t qdepth,
+- uint32_t initial_cmdsn, uint32_t *hostno)
++ uint32_t initial_cmdsn, uint32_t *hostno)
+ {
+ struct iscsi_cls_session *cls_session;
+ struct iscsi_session *session;
+@@ -380,13 +380,7 @@ iscsi_iser_session_create(struct iscsi_transport *iscsit,
+ struct iscsi_iser_cmd_task *iser_ctask;
+ struct iser_desc *desc;
+
+- /*
+- * we do not support setting can_queue cmd_per_lun from userspace yet
+- * because we preallocate so many resources
+- */
+ cls_session = iscsi_session_setup(iscsit, scsit,
+- ISCSI_DEF_XMIT_CMDS_MAX,
+- ISCSI_MAX_CMD_PER_LUN,
+ sizeof(struct iscsi_iser_cmd_task),
+ sizeof(struct iser_desc),
+ initial_cmdsn, &hn);
+@@ -550,7 +550,7 @@ static struct scsi_host_template iscsi_iser_sht = {
+ .name = "iSCSI Initiator over iSER, v." DRV_VER,
+ .queuecommand = iscsi_queuecommand,
+ .change_queue_depth = iscsi_change_queue_depth,
+- .can_queue = ISCSI_DEF_XMIT_CMDS_MAX - 1,
++ .can_queue = ISCSI_XMIT_CMDS_MAX - 1,
+ .sg_tablesize = ISCSI_ISER_SG_TABLESIZE,
+ .max_sectors = 1024,
+ .cmd_per_lun = ISCSI_MAX_CMD_PER_LUN,
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
+index 1ee867b..671faff 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
+@@ -105,7 +105,7 @@
+ #define ISER_MAX_TX_MISC_PDUS 6 /* NOOP_OUT(2), TEXT(1), *
+ * SCSI_TMFUNC(2), LOGOUT(1) */
+
+-#define ISER_QP_MAX_RECV_DTOS (ISCSI_DEF_XMIT_CMDS_MAX + \
++#define ISER_QP_MAX_RECV_DTOS (ISCSI_XMIT_CMDS_MAX + \
+ ISER_MAX_RX_MISC_PDUS + \
+ ISER_MAX_TX_MISC_PDUS)
+
+@@ -117,7 +117,7 @@
+
+ #define ISER_INFLIGHT_DATAOUTS 8
+
+-#define ISER_QP_MAX_REQ_DTOS (ISCSI_DEF_XMIT_CMDS_MAX * \
++#define ISER_QP_MAX_REQ_DTOS (ISCSI_XMIT_CMDS_MAX * \
+ (1 + ISER_INFLIGHT_DATAOUTS) + \
+ ISER_MAX_TX_MISC_PDUS + \
+ ISER_MAX_RX_MISC_PDUS)
+diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
+index 654a4dc..f3d8ba5 100644
+--- a/drivers/infiniband/ulp/iser/iser_verbs.c
++++ b/drivers/infiniband/ulp/iser/iser_verbs.c
+@@ -154,8 +154,8 @@ static int iser_create_ib_conn_res(struct iser_conn *ib_conn)
+ params.max_pages_per_fmr = ISCSI_ISER_SG_TABLESIZE + 1;
+ /* make the pool size twice the max number of SCSI commands *
+ * the ML is expected to queue, watermark for unmap at 50% */
+- params.pool_size = ISCSI_DEF_XMIT_CMDS_MAX * 2;
+- params.dirty_watermark = ISCSI_DEF_XMIT_CMDS_MAX;
++ params.pool_size = ISCSI_XMIT_CMDS_MAX * 2;
++ params.dirty_watermark = ISCSI_XMIT_CMDS_MAX;
+ params.cache = 0;
+ params.flush_function = NULL;
+ params.access = (IB_ACCESS_LOCAL_WRITE |
diff --git a/kernel_patches/backport/2.6.9_U4/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch b/kernel_patches/backport/2.6.9_U4/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch
new file mode 100644
index 0000000..26fa09c
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch
@@ -0,0 +1,38 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 8f7b859..5f82d6c 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -134,9 +134,18 @@ iscsi_iser_cmd_init(struct iscsi_cmd_task *ctask)
+ {
+ struct iscsi_iser_conn *iser_conn = ctask->conn->dd_data;
+ struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data;
++ struct scsi_cmnd *sc = ctask->sc;
+
+ iser_ctask->command_sent = 0;
+ iser_ctask->iser_conn = iser_conn;
++ if (sc->sc_data_direction == DMA_TO_DEVICE) {
++ BUG_ON(sc->request_bufflen == 0);
++
++ debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
++ ctask->itt, sc->request_bufflen, ctask->imm_count,
++ ctask->unsol_count);
++ }
++
+ iser_ctask_rdma_init(iser_ctask);
+ return 0;
+ }
+@@ -210,14 +219,6 @@ iscsi_iser_ctask_xmit(struct iscsi_conn *conn,
+ struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data;
+ int error = 0;
+
+- if (ctask->sc->sc_data_direction == DMA_TO_DEVICE) {
+- BUG_ON(ctask->sc->request_bufflen == 0);
+-
+- debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
+- ctask->itt, ctask->sc->request_bufflen,
+- ctask->imm_count, ctask->unsol_count);
+- }
+-
+ debug_scsi("ctask deq [cid %d itt 0x%x]\n",
+ conn->id, ctask->itt);
+
diff --git a/kernel_patches/backport/2.6.9_U4/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch b/kernel_patches/backport/2.6.9_U4/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch
new file mode 100644
index 0000000..417415f
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch
@@ -0,0 +1,18 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 5f82d6c..3a67d76 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -574,11 +574,8 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_EXP_STATSN |
+ ISCSI_PERSISTENT_PORT |
+ ISCSI_PERSISTENT_ADDRESS |
+- ISCSI_TARGET_NAME | ISCSI_TPGT |
+- ISCSI_USERNAME | ISCSI_PASSWORD |
+- ISCSI_USERNAME_IN | ISCSI_PASSWORD_IN |
+- ISCSI_FAST_ABORT | ISCSI_ABORT_TMO |
+- ISCSI_PING_TMO | ISCSI_RECV_TMO,
++ ISCSI_TARGET_NAME |
++ ISCSI_TPGT,
+ .host_param_mask = ISCSI_HOST_HWADDRESS |
+ ISCSI_HOST_INITIATOR_NAME,
+ .host_template = &iscsi_iser_sht,
diff --git a/kernel_patches/backport/2.6.9_U4/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch b/kernel_patches/backport/2.6.9_U4/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch
new file mode 100644
index 0000000..0b1a4c4
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch
@@ -0,0 +1,16 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index c5941fa..2f4f125 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -140,8 +140,8 @@ iscsi_iser_cmd_init(struct iscsi_cmd_task *ctask)
+ iser_ctask->iser_conn = iser_conn;
+ if (sc->sc_data_direction == DMA_TO_DEVICE) {
+- BUG_ON(sc->request_bufflen == 0);
++ BUG_ON(ctask->total_length == 0);
+
+ debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
+- ctask->itt, sc->request_bufflen, ctask->imm_count,
++ ctask->itt, ctask->total_length, ctask->imm_count,
+ ctask->unsol_count);
+ }
+
diff --git a/kernel_patches/backport/2.6.9_U4/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch b/kernel_patches/backport/2.6.9_U4/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch
new file mode 100644
index 0000000..f207af3
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch
@@ -0,0 +1,14 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 2f4f125..940bf98 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -576,8 +576,7 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_PERSISTENT_ADDRESS |
+ ISCSI_TARGET_NAME |
+ ISCSI_TPGT,
+- .host_param_mask = ISCSI_HOST_HWADDRESS |
+- ISCSI_HOST_INITIATOR_NAME,
++ .host_param_mask = ISCSI_HOST_HWADDRESS,
+ .host_template = &iscsi_iser_sht,
+ .conndata_size = sizeof(struct iscsi_conn),
+ .max_lun = ISCSI_ISER_MAX_LUN,
diff --git a/kernel_patches/backport/2.6.9_U4/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch b/kernel_patches/backport/2.6.9_U4/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch
new file mode 100644
index 0000000..f9dceb1
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch
@@ -0,0 +1,22 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 940bf98..6a35eff 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -576,7 +576,6 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_PERSISTENT_ADDRESS |
+ ISCSI_TARGET_NAME |
+ ISCSI_TPGT,
+- .host_param_mask = ISCSI_HOST_HWADDRESS,
+ .host_template = &iscsi_iser_sht,
+ .conndata_size = sizeof(struct iscsi_conn),
+ .max_lun = ISCSI_ISER_MAX_LUN,
+@@ -593,9 +593,6 @@ static struct iscsi_transport iscsi_iser_transport = {
+ .get_session_param = iscsi_session_get_param,
+ .start_conn = iscsi_iser_conn_start,
+ .stop_conn = iscsi_conn_stop,
+- /* iscsi host params */
+- .get_host_param = iscsi_host_get_param,
+- .set_host_param = iscsi_host_set_param,
+ /* IO */
+ .send_pdu = iscsi_conn_send_pdu,
+ .get_stats = iscsi_iser_conn_get_stats,
diff --git a/kernel_patches/backport/2.6.9_U4/iser_09_fix_inclusion_order.patch b/kernel_patches/backport/2.6.9_U4/iser_09_fix_inclusion_order.patch
new file mode 100644
index 0000000..3c2a969
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/iser_09_fix_inclusion_order.patch
@@ -0,0 +1,13 @@
+--- linux-2.6.20-rc7-orig/drivers/infiniband/ulp/iser/iscsi_iser.c 2007-02-08 09:13:43.000000000 +0200
++++ linux-2.6.20-rc7/drivers/infiniband/ulp/iser/iscsi_iser.c 2007-02-08 09:14:31.000000000 +0200
+@@ -70,9 +70,8 @@
+ #include <scsi/scsi_tcq.h>
+ #include <scsi/scsi_host.h>
+ #include <scsi/scsi.h>
+-#include <scsi/scsi_transport_iscsi.h>
+-
+ #include "iscsi_iser.h"
++#include <scsi/scsi_transport_iscsi.h>
+
+ static unsigned int iscsi_max_lun = 512;
+ module_param_named(max_lun, iscsi_max_lun, uint, S_IRUGO);
diff --git a/kernel_patches/backport/2.6.9_U5/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch b/kernel_patches/backport/2.6.9_U5/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch
new file mode 100644
index 0000000..101fdc6
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch
@@ -0,0 +1,44 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index bad8dac..75ecabe 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -211,10 +211,10 @@ iscsi_iser_ctask_xmit(struct iscsi_conn *conn,
+ int error = 0;
+
+ if (ctask->sc->sc_data_direction == DMA_TO_DEVICE) {
+- BUG_ON(scsi_bufflen(ctask->sc) == 0);
++ BUG_ON(ctask->sc->request_bufflen == 0);
+
+ debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
+- ctask->itt, scsi_bufflen(ctask->sc),
++ ctask->itt, ctask->sc->request_bufflen,
+ ctask->imm_count, ctask->unsol_count);
+ }
+
+diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
+index 5d62cc0..1ae80d8 100644
+--- a/drivers/infiniband/ulp/iser/iser_initiator.c
++++ b/drivers/infiniband/ulp/iser/iser_initiator.c
+@@ -349,12 +349,18 @@ int iser_send_command(struct iscsi_conn *conn,
+ else
+ data_buf = &iser_ctask->data[ISER_DIR_OUT];
+
+- if (scsi_sg_count(sc)) { /* using a scatter list */
+- data_buf->buf = scsi_sglist(sc);
+- data_buf->size = scsi_sg_count(sc);
++ if (sc->use_sg) { /* using a scatter list */
++ data_buf->buf = sc->request_buffer;
++ data_buf->size = sc->use_sg;
++ } else if (sc->request_bufflen) {
++ /* using a single buffer - convert it into one entry SG */
++ sg_init_one(&data_buf->sg_single,
++ sc->request_buffer, sc->request_bufflen);
++ data_buf->buf = &data_buf->sg_single;
++ data_buf->size = 1;
+ }
+
+- data_buf->data_len = scsi_bufflen(sc);
++ data_buf->data_len = sc->request_bufflen;
+
+ if (hdr->flags & ISCSI_FLAG_CMD_READ) {
+ err = iser_prepare_read_cmd(ctask, edtl);
diff --git a/kernel_patches/backport/2.6.9_U5/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch b/kernel_patches/backport/2.6.9_U5/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch
new file mode 100644
index 0000000..7b21cba
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch
@@ -0,0 +1,12 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index bad8dac..933429b 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -586,7 +586,6 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_FAST_ABORT | ISCSI_ABORT_TMO |
+ ISCSI_PING_TMO | ISCSI_RECV_TMO,
+ .host_param_mask = ISCSI_HOST_HWADDRESS |
+- ISCSI_HOST_NETDEV_NAME |
+ ISCSI_HOST_INITIATOR_NAME,
+ .host_template = &iscsi_iser_sht,
+ .conndata_size = sizeof(struct iscsi_conn),
diff --git a/kernel_patches/backport/2.6.9_U5/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch b/kernel_patches/backport/2.6.9_U5/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch
new file mode 100644
index 0000000..d72eb5a
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch
@@ -0,0 +1,74 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index bad8dac..7baac99 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -368,8 +368,7 @@ static struct iscsi_transport iscsi_iser_transport;
+ static struct iscsi_cls_session *
+ iscsi_iser_session_create(struct iscsi_transport *iscsit,
+ struct scsi_transport_template *scsit,
+- uint16_t cmds_max, uint16_t qdepth,
+- uint32_t initial_cmdsn, uint32_t *hostno)
++ uint32_t initial_cmdsn, uint32_t *hostno)
+ {
+ struct iscsi_cls_session *cls_session;
+ struct iscsi_session *session;
+@@ -380,13 +380,7 @@ iscsi_iser_session_create(struct iscsi_transport *iscsit,
+ struct iscsi_iser_cmd_task *iser_ctask;
+ struct iser_desc *desc;
+
+- /*
+- * we do not support setting can_queue cmd_per_lun from userspace yet
+- * because we preallocate so many resources
+- */
+ cls_session = iscsi_session_setup(iscsit, scsit,
+- ISCSI_DEF_XMIT_CMDS_MAX,
+- ISCSI_MAX_CMD_PER_LUN,
+ sizeof(struct iscsi_iser_cmd_task),
+ sizeof(struct iser_desc),
+ initial_cmdsn, &hn);
+@@ -550,7 +550,7 @@ static struct scsi_host_template iscsi_iser_sht = {
+ .name = "iSCSI Initiator over iSER, v." DRV_VER,
+ .queuecommand = iscsi_queuecommand,
+ .change_queue_depth = iscsi_change_queue_depth,
+- .can_queue = ISCSI_DEF_XMIT_CMDS_MAX - 1,
++ .can_queue = ISCSI_XMIT_CMDS_MAX - 1,
+ .sg_tablesize = ISCSI_ISER_SG_TABLESIZE,
+ .max_sectors = 1024,
+ .cmd_per_lun = ISCSI_MAX_CMD_PER_LUN,
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
+index 1ee867b..671faff 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
+@@ -105,7 +105,7 @@
+ #define ISER_MAX_TX_MISC_PDUS 6 /* NOOP_OUT(2), TEXT(1), *
+ * SCSI_TMFUNC(2), LOGOUT(1) */
+
+-#define ISER_QP_MAX_RECV_DTOS (ISCSI_DEF_XMIT_CMDS_MAX + \
++#define ISER_QP_MAX_RECV_DTOS (ISCSI_XMIT_CMDS_MAX + \
+ ISER_MAX_RX_MISC_PDUS + \
+ ISER_MAX_TX_MISC_PDUS)
+
+@@ -117,7 +117,7 @@
+
+ #define ISER_INFLIGHT_DATAOUTS 8
+
+-#define ISER_QP_MAX_REQ_DTOS (ISCSI_DEF_XMIT_CMDS_MAX * \
++#define ISER_QP_MAX_REQ_DTOS (ISCSI_XMIT_CMDS_MAX * \
+ (1 + ISER_INFLIGHT_DATAOUTS) + \
+ ISER_MAX_TX_MISC_PDUS + \
+ ISER_MAX_RX_MISC_PDUS)
+diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
+index 654a4dc..f3d8ba5 100644
+--- a/drivers/infiniband/ulp/iser/iser_verbs.c
++++ b/drivers/infiniband/ulp/iser/iser_verbs.c
+@@ -154,8 +154,8 @@ static int iser_create_ib_conn_res(struct iser_conn *ib_conn)
+ params.max_pages_per_fmr = ISCSI_ISER_SG_TABLESIZE + 1;
+ /* make the pool size twice the max number of SCSI commands *
+ * the ML is expected to queue, watermark for unmap at 50% */
+- params.pool_size = ISCSI_DEF_XMIT_CMDS_MAX * 2;
+- params.dirty_watermark = ISCSI_DEF_XMIT_CMDS_MAX;
++ params.pool_size = ISCSI_XMIT_CMDS_MAX * 2;
++ params.dirty_watermark = ISCSI_XMIT_CMDS_MAX;
+ params.cache = 0;
+ params.flush_function = NULL;
+ params.access = (IB_ACCESS_LOCAL_WRITE |
diff --git a/kernel_patches/backport/2.6.9_U5/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch b/kernel_patches/backport/2.6.9_U5/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch
new file mode 100644
index 0000000..26fa09c
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch
@@ -0,0 +1,38 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 8f7b859..5f82d6c 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -134,9 +134,18 @@ iscsi_iser_cmd_init(struct iscsi_cmd_task *ctask)
+ {
+ struct iscsi_iser_conn *iser_conn = ctask->conn->dd_data;
+ struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data;
++ struct scsi_cmnd *sc = ctask->sc;
+
+ iser_ctask->command_sent = 0;
+ iser_ctask->iser_conn = iser_conn;
++ if (sc->sc_data_direction == DMA_TO_DEVICE) {
++ BUG_ON(sc->request_bufflen == 0);
++
++ debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
++ ctask->itt, sc->request_bufflen, ctask->imm_count,
++ ctask->unsol_count);
++ }
++
+ iser_ctask_rdma_init(iser_ctask);
+ return 0;
+ }
+@@ -210,14 +219,6 @@ iscsi_iser_ctask_xmit(struct iscsi_conn *conn,
+ struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data;
+ int error = 0;
+
+- if (ctask->sc->sc_data_direction == DMA_TO_DEVICE) {
+- BUG_ON(ctask->sc->request_bufflen == 0);
+-
+- debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
+- ctask->itt, ctask->sc->request_bufflen,
+- ctask->imm_count, ctask->unsol_count);
+- }
+-
+ debug_scsi("ctask deq [cid %d itt 0x%x]\n",
+ conn->id, ctask->itt);
+
diff --git a/kernel_patches/backport/2.6.9_U5/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch b/kernel_patches/backport/2.6.9_U5/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch
new file mode 100644
index 0000000..417415f
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch
@@ -0,0 +1,18 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 5f82d6c..3a67d76 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -574,11 +574,8 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_EXP_STATSN |
+ ISCSI_PERSISTENT_PORT |
+ ISCSI_PERSISTENT_ADDRESS |
+- ISCSI_TARGET_NAME | ISCSI_TPGT |
+- ISCSI_USERNAME | ISCSI_PASSWORD |
+- ISCSI_USERNAME_IN | ISCSI_PASSWORD_IN |
+- ISCSI_FAST_ABORT | ISCSI_ABORT_TMO |
+- ISCSI_PING_TMO | ISCSI_RECV_TMO,
++ ISCSI_TARGET_NAME |
++ ISCSI_TPGT,
+ .host_param_mask = ISCSI_HOST_HWADDRESS |
+ ISCSI_HOST_INITIATOR_NAME,
+ .host_template = &iscsi_iser_sht,
diff --git a/kernel_patches/backport/2.6.9_U5/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch b/kernel_patches/backport/2.6.9_U5/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch
new file mode 100644
index 0000000..0b1a4c4
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch
@@ -0,0 +1,16 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index c5941fa..2f4f125 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -140,8 +140,8 @@ iscsi_iser_cmd_init(struct iscsi_cmd_task *ctask)
+ iser_ctask->iser_conn = iser_conn;
+ if (sc->sc_data_direction == DMA_TO_DEVICE) {
+- BUG_ON(sc->request_bufflen == 0);
++ BUG_ON(ctask->total_length == 0);
+
+ debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
+- ctask->itt, sc->request_bufflen, ctask->imm_count,
++ ctask->itt, ctask->total_length, ctask->imm_count,
+ ctask->unsol_count);
+ }
+
diff --git a/kernel_patches/backport/2.6.9_U5/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch b/kernel_patches/backport/2.6.9_U5/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch
new file mode 100644
index 0000000..f207af3
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch
@@ -0,0 +1,14 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 2f4f125..940bf98 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -576,8 +576,7 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_PERSISTENT_ADDRESS |
+ ISCSI_TARGET_NAME |
+ ISCSI_TPGT,
+- .host_param_mask = ISCSI_HOST_HWADDRESS |
+- ISCSI_HOST_INITIATOR_NAME,
++ .host_param_mask = ISCSI_HOST_HWADDRESS,
+ .host_template = &iscsi_iser_sht,
+ .conndata_size = sizeof(struct iscsi_conn),
+ .max_lun = ISCSI_ISER_MAX_LUN,
diff --git a/kernel_patches/backport/2.6.9_U5/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch b/kernel_patches/backport/2.6.9_U5/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch
new file mode 100644
index 0000000..f9dceb1
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch
@@ -0,0 +1,22 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 940bf98..6a35eff 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -576,7 +576,6 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_PERSISTENT_ADDRESS |
+ ISCSI_TARGET_NAME |
+ ISCSI_TPGT,
+- .host_param_mask = ISCSI_HOST_HWADDRESS,
+ .host_template = &iscsi_iser_sht,
+ .conndata_size = sizeof(struct iscsi_conn),
+ .max_lun = ISCSI_ISER_MAX_LUN,
+@@ -593,9 +593,6 @@ static struct iscsi_transport iscsi_iser_transport = {
+ .get_session_param = iscsi_session_get_param,
+ .start_conn = iscsi_iser_conn_start,
+ .stop_conn = iscsi_conn_stop,
+- /* iscsi host params */
+- .get_host_param = iscsi_host_get_param,
+- .set_host_param = iscsi_host_set_param,
+ /* IO */
+ .send_pdu = iscsi_conn_send_pdu,
+ .get_stats = iscsi_iser_conn_get_stats,
diff --git a/kernel_patches/backport/2.6.9_U5/iser_09_fix_inclusion_order.patch b/kernel_patches/backport/2.6.9_U5/iser_09_fix_inclusion_order.patch
new file mode 100644
index 0000000..3c2a969
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/iser_09_fix_inclusion_order.patch
@@ -0,0 +1,13 @@
+--- linux-2.6.20-rc7-orig/drivers/infiniband/ulp/iser/iscsi_iser.c 2007-02-08 09:13:43.000000000 +0200
++++ linux-2.6.20-rc7/drivers/infiniband/ulp/iser/iscsi_iser.c 2007-02-08 09:14:31.000000000 +0200
+@@ -70,9 +70,8 @@
+ #include <scsi/scsi_tcq.h>
+ #include <scsi/scsi_host.h>
+ #include <scsi/scsi.h>
+-#include <scsi/scsi_transport_iscsi.h>
+-
+ #include "iscsi_iser.h"
++#include <scsi/scsi_transport_iscsi.h>
+
+ static unsigned int iscsi_max_lun = 512;
+ module_param_named(max_lun, iscsi_max_lun, uint, S_IRUGO);
diff --git a/kernel_patches/backport/2.6.9_U6/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch b/kernel_patches/backport/2.6.9_U6/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch
new file mode 100644
index 0000000..101fdc6
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U6/iser_01_revert_da9c0c770e775e655e3f77c96d91ee557b117adb.patch
@@ -0,0 +1,44 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index bad8dac..75ecabe 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -211,10 +211,10 @@ iscsi_iser_ctask_xmit(struct iscsi_conn *conn,
+ int error = 0;
+
+ if (ctask->sc->sc_data_direction == DMA_TO_DEVICE) {
+- BUG_ON(scsi_bufflen(ctask->sc) == 0);
++ BUG_ON(ctask->sc->request_bufflen == 0);
+
+ debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
+- ctask->itt, scsi_bufflen(ctask->sc),
++ ctask->itt, ctask->sc->request_bufflen,
+ ctask->imm_count, ctask->unsol_count);
+ }
+
+diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
+index 5d62cc0..1ae80d8 100644
+--- a/drivers/infiniband/ulp/iser/iser_initiator.c
++++ b/drivers/infiniband/ulp/iser/iser_initiator.c
+@@ -349,12 +349,18 @@ int iser_send_command(struct iscsi_conn *conn,
+ else
+ data_buf = &iser_ctask->data[ISER_DIR_OUT];
+
+- if (scsi_sg_count(sc)) { /* using a scatter list */
+- data_buf->buf = scsi_sglist(sc);
+- data_buf->size = scsi_sg_count(sc);
++ if (sc->use_sg) { /* using a scatter list */
++ data_buf->buf = sc->request_buffer;
++ data_buf->size = sc->use_sg;
++ } else if (sc->request_bufflen) {
++ /* using a single buffer - convert it into one entry SG */
++ sg_init_one(&data_buf->sg_single,
++ sc->request_buffer, sc->request_bufflen);
++ data_buf->buf = &data_buf->sg_single;
++ data_buf->size = 1;
+ }
+
+- data_buf->data_len = scsi_bufflen(sc);
++ data_buf->data_len = sc->request_bufflen;
+
+ if (hdr->flags & ISCSI_FLAG_CMD_READ) {
+ err = iser_prepare_read_cmd(ctask, edtl);
diff --git a/kernel_patches/backport/2.6.9_U6/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch b/kernel_patches/backport/2.6.9_U6/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch
new file mode 100644
index 0000000..7b21cba
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U6/iser_02_revert_d8196ed2181b4595eaf464a5bcbddb6c28649a39.patch
@@ -0,0 +1,12 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index bad8dac..933429b 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -586,7 +586,6 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_FAST_ABORT | ISCSI_ABORT_TMO |
+ ISCSI_PING_TMO | ISCSI_RECV_TMO,
+ .host_param_mask = ISCSI_HOST_HWADDRESS |
+- ISCSI_HOST_NETDEV_NAME |
+ ISCSI_HOST_INITIATOR_NAME,
+ .host_template = &iscsi_iser_sht,
+ .conndata_size = sizeof(struct iscsi_conn),
diff --git a/kernel_patches/backport/2.6.9_U6/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch b/kernel_patches/backport/2.6.9_U6/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch
new file mode 100644
index 0000000..d72eb5a
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U6/iser_03_revert_1548271ece9e9312fd5feb41fd58773b56a71d39.patch
@@ -0,0 +1,74 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index bad8dac..7baac99 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -368,8 +368,7 @@ static struct iscsi_transport iscsi_iser_transport;
+ static struct iscsi_cls_session *
+ iscsi_iser_session_create(struct iscsi_transport *iscsit,
+ struct scsi_transport_template *scsit,
+- uint16_t cmds_max, uint16_t qdepth,
+- uint32_t initial_cmdsn, uint32_t *hostno)
++ uint32_t initial_cmdsn, uint32_t *hostno)
+ {
+ struct iscsi_cls_session *cls_session;
+ struct iscsi_session *session;
+@@ -380,13 +380,7 @@ iscsi_iser_session_create(struct iscsi_transport *iscsit,
+ struct iscsi_iser_cmd_task *iser_ctask;
+ struct iser_desc *desc;
+
+- /*
+- * we do not support setting can_queue cmd_per_lun from userspace yet
+- * because we preallocate so many resources
+- */
+ cls_session = iscsi_session_setup(iscsit, scsit,
+- ISCSI_DEF_XMIT_CMDS_MAX,
+- ISCSI_MAX_CMD_PER_LUN,
+ sizeof(struct iscsi_iser_cmd_task),
+ sizeof(struct iser_desc),
+ initial_cmdsn, &hn);
+@@ -550,7 +550,7 @@ static struct scsi_host_template iscsi_iser_sht = {
+ .name = "iSCSI Initiator over iSER, v." DRV_VER,
+ .queuecommand = iscsi_queuecommand,
+ .change_queue_depth = iscsi_change_queue_depth,
+- .can_queue = ISCSI_DEF_XMIT_CMDS_MAX - 1,
++ .can_queue = ISCSI_XMIT_CMDS_MAX - 1,
+ .sg_tablesize = ISCSI_ISER_SG_TABLESIZE,
+ .max_sectors = 1024,
+ .cmd_per_lun = ISCSI_MAX_CMD_PER_LUN,
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
+index 1ee867b..671faff 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
+@@ -105,7 +105,7 @@
+ #define ISER_MAX_TX_MISC_PDUS 6 /* NOOP_OUT(2), TEXT(1), *
+ * SCSI_TMFUNC(2), LOGOUT(1) */
+
+-#define ISER_QP_MAX_RECV_DTOS (ISCSI_DEF_XMIT_CMDS_MAX + \
++#define ISER_QP_MAX_RECV_DTOS (ISCSI_XMIT_CMDS_MAX + \
+ ISER_MAX_RX_MISC_PDUS + \
+ ISER_MAX_TX_MISC_PDUS)
+
+@@ -117,7 +117,7 @@
+
+ #define ISER_INFLIGHT_DATAOUTS 8
+
+-#define ISER_QP_MAX_REQ_DTOS (ISCSI_DEF_XMIT_CMDS_MAX * \
++#define ISER_QP_MAX_REQ_DTOS (ISCSI_XMIT_CMDS_MAX * \
+ (1 + ISER_INFLIGHT_DATAOUTS) + \
+ ISER_MAX_TX_MISC_PDUS + \
+ ISER_MAX_RX_MISC_PDUS)
+diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
+index 654a4dc..f3d8ba5 100644
+--- a/drivers/infiniband/ulp/iser/iser_verbs.c
++++ b/drivers/infiniband/ulp/iser/iser_verbs.c
+@@ -154,8 +154,8 @@ static int iser_create_ib_conn_res(struct iser_conn *ib_conn)
+ params.max_pages_per_fmr = ISCSI_ISER_SG_TABLESIZE + 1;
+ /* make the pool size twice the max number of SCSI commands *
+ * the ML is expected to queue, watermark for unmap at 50% */
+- params.pool_size = ISCSI_DEF_XMIT_CMDS_MAX * 2;
+- params.dirty_watermark = ISCSI_DEF_XMIT_CMDS_MAX;
++ params.pool_size = ISCSI_XMIT_CMDS_MAX * 2;
++ params.dirty_watermark = ISCSI_XMIT_CMDS_MAX;
+ params.cache = 0;
+ params.flush_function = NULL;
+ params.access = (IB_ACCESS_LOCAL_WRITE |
diff --git a/kernel_patches/backport/2.6.9_U6/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch b/kernel_patches/backport/2.6.9_U6/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch
new file mode 100644
index 0000000..26fa09c
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U6/iser_04_revert_77a23c21aaa723f6b0ffc4a701be8c8e5a32346d.patch
@@ -0,0 +1,38 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 8f7b859..5f82d6c 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -134,9 +134,18 @@ iscsi_iser_cmd_init(struct iscsi_cmd_task *ctask)
+ {
+ struct iscsi_iser_conn *iser_conn = ctask->conn->dd_data;
+ struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data;
++ struct scsi_cmnd *sc = ctask->sc;
+
+ iser_ctask->command_sent = 0;
+ iser_ctask->iser_conn = iser_conn;
++ if (sc->sc_data_direction == DMA_TO_DEVICE) {
++ BUG_ON(sc->request_bufflen == 0);
++
++ debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
++ ctask->itt, sc->request_bufflen, ctask->imm_count,
++ ctask->unsol_count);
++ }
++
+ iser_ctask_rdma_init(iser_ctask);
+ return 0;
+ }
+@@ -210,14 +219,6 @@ iscsi_iser_ctask_xmit(struct iscsi_conn *conn,
+ struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data;
+ int error = 0;
+
+- if (ctask->sc->sc_data_direction == DMA_TO_DEVICE) {
+- BUG_ON(ctask->sc->request_bufflen == 0);
+-
+- debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
+- ctask->itt, ctask->sc->request_bufflen,
+- ctask->imm_count, ctask->unsol_count);
+- }
+-
+ debug_scsi("ctask deq [cid %d itt 0x%x]\n",
+ conn->id, ctask->itt);
+
diff --git a/kernel_patches/backport/2.6.9_U6/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch b/kernel_patches/backport/2.6.9_U6/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch
new file mode 100644
index 0000000..417415f
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U6/iser_05_revert_b2c6416736b847b91950bd43cc5153e11a1f83ee.patch
@@ -0,0 +1,18 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 5f82d6c..3a67d76 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -574,11 +574,8 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_EXP_STATSN |
+ ISCSI_PERSISTENT_PORT |
+ ISCSI_PERSISTENT_ADDRESS |
+- ISCSI_TARGET_NAME | ISCSI_TPGT |
+- ISCSI_USERNAME | ISCSI_PASSWORD |
+- ISCSI_USERNAME_IN | ISCSI_PASSWORD_IN |
+- ISCSI_FAST_ABORT | ISCSI_ABORT_TMO |
+- ISCSI_PING_TMO | ISCSI_RECV_TMO,
++ ISCSI_TARGET_NAME |
++ ISCSI_TPGT,
+ .host_param_mask = ISCSI_HOST_HWADDRESS |
+ ISCSI_HOST_INITIATOR_NAME,
+ .host_template = &iscsi_iser_sht,
diff --git a/kernel_patches/backport/2.6.9_U6/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch b/kernel_patches/backport/2.6.9_U6/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch
new file mode 100644
index 0000000..0b1a4c4
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U6/iser_06_revert_857ae0bdb72999936a28ce621e38e2e288c485da.patch
@@ -0,0 +1,16 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index c5941fa..2f4f125 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -140,8 +140,8 @@ iscsi_iser_cmd_init(struct iscsi_cmd_task *ctask)
+ iser_ctask->iser_conn = iser_conn;
+ if (sc->sc_data_direction == DMA_TO_DEVICE) {
+- BUG_ON(sc->request_bufflen == 0);
++ BUG_ON(ctask->total_length == 0);
+
+ debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n",
+- ctask->itt, sc->request_bufflen, ctask->imm_count,
++ ctask->itt, ctask->total_length, ctask->imm_count,
+ ctask->unsol_count);
+ }
+
diff --git a/kernel_patches/backport/2.6.9_U6/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch b/kernel_patches/backport/2.6.9_U6/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch
new file mode 100644
index 0000000..f207af3
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U6/iser_07_revert_8ad5781ae9702a8f95cfdf30967752e4297613ee.patch
@@ -0,0 +1,14 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 2f4f125..940bf98 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -576,8 +576,7 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_PERSISTENT_ADDRESS |
+ ISCSI_TARGET_NAME |
+ ISCSI_TPGT,
+- .host_param_mask = ISCSI_HOST_HWADDRESS |
+- ISCSI_HOST_INITIATOR_NAME,
++ .host_param_mask = ISCSI_HOST_HWADDRESS,
+ .host_template = &iscsi_iser_sht,
+ .conndata_size = sizeof(struct iscsi_conn),
+ .max_lun = ISCSI_ISER_MAX_LUN,
diff --git a/kernel_patches/backport/2.6.9_U6/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch b/kernel_patches/backport/2.6.9_U6/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch
new file mode 100644
index 0000000..f9dceb1
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U6/iser_08_revert_0801c242a33426fddc005c2f559a3d2fa6fca7eb.patch
@@ -0,0 +1,22 @@
+diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
+index 940bf98..6a35eff 100644
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
+@@ -576,7 +576,6 @@ static struct iscsi_transport iscsi_iser_transport = {
+ ISCSI_PERSISTENT_ADDRESS |
+ ISCSI_TARGET_NAME |
+ ISCSI_TPGT,
+- .host_param_mask = ISCSI_HOST_HWADDRESS,
+ .host_template = &iscsi_iser_sht,
+ .conndata_size = sizeof(struct iscsi_conn),
+ .max_lun = ISCSI_ISER_MAX_LUN,
+@@ -593,9 +593,6 @@ static struct iscsi_transport iscsi_iser_transport = {
+ .get_session_param = iscsi_session_get_param,
+ .start_conn = iscsi_iser_conn_start,
+ .stop_conn = iscsi_conn_stop,
+- /* iscsi host params */
+- .get_host_param = iscsi_host_get_param,
+- .set_host_param = iscsi_host_set_param,
+ /* IO */
+ .send_pdu = iscsi_conn_send_pdu,
+ .get_stats = iscsi_iser_conn_get_stats,
diff --git a/kernel_patches/backport/2.6.9_U6/iser_09_fix_inclusion_order.patch b/kernel_patches/backport/2.6.9_U6/iser_09_fix_inclusion_order.patch
new file mode 100644
index 0000000..3c2a969
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U6/iser_09_fix_inclusion_order.patch
@@ -0,0 +1,13 @@
+--- linux-2.6.20-rc7-orig/drivers/infiniband/ulp/iser/iscsi_iser.c 2007-02-08 09:13:43.000000000 +0200
++++ linux-2.6.20-rc7/drivers/infiniband/ulp/iser/iscsi_iser.c 2007-02-08 09:14:31.000000000 +0200
+@@ -70,9 +70,8 @@
+ #include <scsi/scsi_tcq.h>
+ #include <scsi/scsi_host.h>
+ #include <scsi/scsi.h>
+-#include <scsi/scsi_transport_iscsi.h>
+-
+ #include "iscsi_iser.h"
++#include <scsi/scsi_transport_iscsi.h>
+
+ static unsigned int iscsi_max_lun = 512;
+ module_param_named(max_lun, iscsi_max_lun, uint, S_IRUGO);
--
1.5.3.8
More information about the ewg
mailing list