Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[sfrench/cifs-2.6.git] / drivers / infiniband / ulp / iser / iscsi_iser.c
index 841b66397a570f73a601084965375ae6b3813d3a..2e72fc5af15732db4f349917ffe6ad4fad946190 100644 (file)
@@ -205,7 +205,8 @@ iser_initialize_task_headers(struct iscsi_task *task,
                goto out;
        }
 
-       tx_desc->wr_idx = 0;
+       tx_desc->inv_wr.next = NULL;
+       tx_desc->reg_wr.wr.next = NULL;
        tx_desc->mapped = true;
        tx_desc->dma_addr = dma_addr;
        tx_desc->tx_sg[0].addr   = tx_desc->dma_addr;
@@ -406,13 +407,10 @@ static u8
 iscsi_iser_check_protection(struct iscsi_task *task, sector_t *sector)
 {
        struct iscsi_iser_task *iser_task = task->dd_data;
+       enum iser_data_dir dir = iser_task->dir[ISER_DIR_IN] ?
+                                       ISER_DIR_IN : ISER_DIR_OUT;
 
-       if (iser_task->dir[ISER_DIR_IN])
-               return iser_check_task_pi_status(iser_task, ISER_DIR_IN,
-                                                sector);
-       else
-               return iser_check_task_pi_status(iser_task, ISER_DIR_OUT,
-                                                sector);
+       return iser_check_task_pi_status(iser_task, dir, sector);
 }
 
 /**