Commit 7626c06b authored by Jayamohan Kallickal's avatar Jayamohan Kallickal Committed by James Bottomley

[SCSI] be2iscsi: Invalidate WRB in Abort/Reset Path

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: default avatarJohn Soni Jose <sony.john-n@emulex.com>
Signed-off-by: default avatarJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 1f536d49
...@@ -246,6 +246,11 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc) ...@@ -246,6 +246,11 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
return SUCCESS; return SUCCESS;
} }
spin_unlock_bh(&session->lock); 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; conn = aborted_task->conn;
beiscsi_conn = conn->dd_data; beiscsi_conn = conn->dd_data;
phba = beiscsi_conn->phba; phba = beiscsi_conn->phba;
...@@ -323,6 +328,11 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc) ...@@ -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) if (abrt_task->sc->device->lun != abrt_task->sc->device->lun)
continue; 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->cid = cid;
inv_tbl->icd = abrt_io_task->psgl_handle->sgl_index; inv_tbl->icd = abrt_io_task->psgl_handle->sgl_index;
num_invalidate++; num_invalidate++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment