[SCSI] be2iscsi: Invalidate WRB in Abort/Reset Path
authorJayamohan Kallickal <jayamohank@gmail.com>
Sat, 28 Sep 2013 22:35:57 +0000 (15:35 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 25 Oct 2013 08:58:10 +0000 (09:58 +0100)
When iSCSI stack invokes Abort or Reset handlers, the aborted tasks
Invalid Bit in WRB needs to be set. Else FW will not be aware of
the command invalidated which leads to BAD_WRB error posted by FW.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/be2iscsi/be_main.c

index 7e470a322e3593ebb8330e4813871083b1c7b39f..8f300534fc327ac73b72cb8f105c9ac54a61c08b 100644 (file)
@@ -246,6 +246,11 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
                return SUCCESS;
        }
        spin_unlock_bh(&session->lock);
+       /* Invalidate WRB Posted for this Task */
+       AMAP_SET_BITS(struct amap_iscsi_wrb, invld,
+                     aborted_io_task->pwrb_handle->pwrb,
+                     1);
+
        conn = aborted_task->conn;
        beiscsi_conn = conn->dd_data;
        phba = beiscsi_conn->phba;
@@ -323,6 +328,11 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
                if (abrt_task->sc->device->lun != abrt_task->sc->device->lun)
                        continue;
 
+               /* Invalidate WRB Posted for this Task */
+               AMAP_SET_BITS(struct amap_iscsi_wrb, invld,
+                             abrt_io_task->pwrb_handle->pwrb,
+                             1);
+
                inv_tbl->cid = cid;
                inv_tbl->icd = abrt_io_task->psgl_handle->sgl_index;
                num_invalidate++;