1 diff -Naur base.linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iscsi_iser.c linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iscsi_iser.c
2 --- base.linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iscsi_iser.c 2010-09-09 16:57:15.000000000 -0400
3 +++ linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iscsi_iser.c 2010-09-09 17:02:17.000000000 -0400
5 iser_conn_terminate(ib_conn);
8 +static int iscsi_iser_slave_configure(struct scsi_device *sdev)
10 + blk_queue_dma_alignment(sdev->request_queue, 0);
14 static struct scsi_host_template iscsi_iser_sht = {
15 .module = THIS_MODULE,
16 .name = "iSCSI Initiator over iSER, v." DRV_VER,
17 .queuecommand = iscsi2_queuecommand,
18 .change_queue_depth = iscsi2_change_queue_depth,
19 .sg_tablesize = ISCSI_ISER_SG_TABLESIZE,
20 - .max_sectors = 1024,
21 + .max_sectors = 0xffff,
22 .cmd_per_lun = ISER_DEF_CMD_PER_LUN,
23 .eh_abort_handler = iscsi2_eh_abort,
24 .eh_device_reset_handler= iscsi2_eh_device_reset,
25 .eh_host_reset_handler= iscsi2_eh_target_reset,
26 .use_clustering = DISABLE_CLUSTERING,
27 + .slave_configure = iscsi_iser_slave_configure,
28 .proc_name = "iscsi_iser",
31 diff -Naur base.linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iscsi_iser.h linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iscsi_iser.h
32 --- base.linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iscsi_iser.h 2010-09-09 16:57:15.000000000 -0400
33 +++ linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iscsi_iser.h 2010-09-09 17:03:17.000000000 -0400
35 #define MASK_4K (~(SIZE_4K-1))
37 /* support upto 512KB in one RDMA */
38 -#define ISCSI_ISER_SG_TABLESIZE (0x80000 >> SHIFT_4K)
39 +/* FMR space for 1 MB of 4k-page transfers, plus 1 if not page aligned */
40 +#define ISCSI_ISER_SG_TABLESIZE (((1<<20) >> SHIFT_4K) + 1)
41 #define ISER_DEF_CMD_PER_LUN 128
44 diff -Naur base.linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iser_verbs.c linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iser_verbs.c
45 --- base.linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iser_verbs.c 2010-09-09 16:57:15.000000000 -0400
46 +++ linux-2.6.18.x86_64/drivers/infiniband/ulp/iser/iser_verbs.c 2010-09-09 17:04:44.000000000 -0400
48 device = ib_conn->device;
50 ib_conn->page_vec = kmalloc(sizeof(struct iser_page_vec) +
51 - (sizeof(u64) * (ISCSI_ISER_SG_TABLESIZE +1)),
52 + sizeof(u64) * ISCSI_ISER_SG_TABLESIZE,
54 if (!ib_conn->page_vec) {
57 ib_conn->page_vec->pages = (u64 *) (ib_conn->page_vec + 1);
59 params.page_shift = SHIFT_4K;
60 - /* when the first/last SG element are not start/end *
61 - * page aligned, the map whould be of N+1 pages */
62 - params.max_pages_per_fmr = ISCSI_ISER_SG_TABLESIZE + 1;
63 + params.max_pages_per_fmr = ISCSI_ISER_SG_TABLESIZE;
64 /* make the pool size twice the max number of SCSI commands *
65 * the ML is expected to queue, watermark for unmap at 50% */
66 params.pool_size = ISCSI_DEF_XMIT_CMDS_MAX * 2;
67 diff -Naur base.linux-2.6.18.x86_64/include/scsi/libiscsi2.h linux-2.6.18.x86_64/include/scsi/libiscsi2.h
68 --- base.linux-2.6.18.x86_64/include/scsi/libiscsi2.h 2010-09-09 16:57:35.000000000 -0400
69 +++ linux-2.6.18.x86_64/include/scsi/libiscsi2.h 2010-09-09 17:05:34.000000000 -0400
74 -#define ISCSI_DEF_XMIT_CMDS_MAX 128 /* must be power of 2 */
75 +#define ISCSI_DEF_XMIT_CMDS_MAX 256 /* must be power of 2 */
76 #define ISCSI_MGMT_CMDS_MAX 15
78 #define ISCSI_DEF_CMD_PER_LUN 32