summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla4xxx/ql4_iocb.c
diff options
context:
space:
mode:
authorDavid C Somayajulu <david.somayajulu@qlogic.com>2008-03-19 11:23:03 -0700
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-07 12:19:00 -0500
commit9d56291366cd6ab156be722e42cf487bef20f5fd (patch)
treed85fadb003a7ed4a3ac8380487423a2b6ce31bb2 /drivers/scsi/qla4xxx/ql4_iocb.c
parentaf7a5647c03c18f5ea58033710ccb23d71727e0c (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_iocb.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_iocb.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_iocb.c b/drivers/scsi/qla4xxx/ql4_iocb.c
index e4461b5d767a..912a67494adf 100644
--- a/drivers/scsi/qla4xxx/ql4_iocb.c
+++ b/drivers/scsi/qla4xxx/ql4_iocb.c
@@ -66,8 +66,8 @@ static int qla4xxx_get_req_pkt(struct scsi_qla_host *ha,
*
* This routine issues a marker IOCB.
**/
-static int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha,
- struct ddb_entry *ddb_entry, int lun)
+int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha,
+ struct ddb_entry *ddb_entry, int lun, uint16_t mrkr_mod)
{
struct qla4_marker_entry *marker_entry;
unsigned long flags = 0;
@@ -87,7 +87,7 @@ static int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha,
marker_entry->hdr.entryType = ET_MARKER;
marker_entry->hdr.entryCount = 1;
marker_entry->target = cpu_to_le16(ddb_entry->fw_ddb_index);
- marker_entry->modifier = cpu_to_le16(MM_LUN_RESET);
+ marker_entry->modifier = cpu_to_le16(mrkr_mod);
int_to_scsilun(lun, &marker_entry->lun);
wmb();
@@ -210,14 +210,6 @@ int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb)
/* Get real lun and adapter */
ddb_entry = srb->ddb;
- /* Send marker(s) if needed. */
- if (ha->marker_needed == 1) {
- if (qla4xxx_send_marker_iocb(ha, ddb_entry,
- cmd->device->lun) != QLA_SUCCESS)
- return QLA_ERROR;
-
- ha->marker_needed = 0;
- }
tot_dsds = 0;
/* Acquire hardware specific lock */