diff options
author | David C Somayajulu <david.somayajulu@qlogic.com> | 2008-03-19 11:23:03 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 12:19:00 -0500 |
commit | 9d56291366cd6ab156be722e42cf487bef20f5fd (patch) | |
tree | d85fadb003a7ed4a3ac8380487423a2b6ce31bb2 /drivers/scsi/qla4xxx/ql4_os.c | |
parent | af7a5647c03c18f5ea58033710ccb23d71727e0c (diff) |
[SCSI] qla4xxx: fix scsi command completion, lun reset and target reset code
This patch contains the following:
1. when hba completion status is good, check for iscsi transport
errors (underflow/overflow) prior to checking the scsi status
2. New firmware requires that one marker iocb be issued for each task
management command. The patch issues marker iocb immediately
following a LUN or Target reset.
Signed-off-by: David C Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_os.c')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 31e605caf0f..0c786944d2c 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -1552,9 +1552,6 @@ static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd) goto eh_dev_reset_done; } - /* Send marker. */ - ha->marker_needed = 1; - if (qla4xxx_eh_wait_for_commands(ha, scsi_target(cmd->device), cmd->device)) { dev_info(&ha->pdev->dev, @@ -1563,6 +1560,11 @@ static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd) goto eh_dev_reset_done; } + /* Send marker. */ + if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun, + MM_LUN_RESET) != QLA_SUCCESS) + goto eh_dev_reset_done; + dev_info(&ha->pdev->dev, "scsi(%ld:%d:%d:%d): DEVICE RESET SUCCEEDED.\n", ha->host_no, cmd->device->channel, cmd->device->id, @@ -1606,9 +1608,6 @@ static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd) return FAILED; } - /* Send marker. */ - ha->marker_needed = 1; - if (qla4xxx_eh_wait_for_commands(ha, scsi_target(cmd->device), NULL)) { starget_printk(KERN_INFO, scsi_target(cmd->device), @@ -1617,6 +1616,15 @@ static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd) return FAILED; } + /* Send marker. */ + if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun, + MM_TGT_WARM_RESET) != QLA_SUCCESS) { + starget_printk(KERN_INFO, scsi_target(cmd->device), + "WARM TARGET DEVICE RESET FAILED - " + "marker iocb failed.\n"); + return FAILED; + } + starget_printk(KERN_INFO, scsi_target(cmd->device), "WARM TARGET RESET SUCCEEDED.\n"); return SUCCESS; |