Commit b9202b4a authored by Satish Kharat's avatar Satish Kharat Committed by Martin K. Petersen

scsi: fnic: Avoid false out-of-order detection for aborted command

If SCSI-ML has already issued abort on a command i.e
FNIC_IOREQ_ABTS_PENDING is set and we get a IO completion, avoid this
being flagged as out-of-order completion by setting the FNIC_IO_DONE
flag in fnic_fcpio_icmnd_cmpl_handler
Signed-off-by: default avatarSatish Kharat <satishkh@cisco.com>
Signed-off-by: default avatarSesidhar Baddela <sebaddel@cisco.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7ef539c8
...@@ -876,32 +876,28 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic, ...@@ -876,32 +876,28 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
/* /*
* if SCSI-ML has already issued abort on this command, * if SCSI-ML has already issued abort on this command,
* ignore completion of the IO. The abts path will clean it up * set completion of the IO. The abts path will clean it up
*/ */
if (CMD_STATE(sc) == FNIC_IOREQ_ABTS_PENDING) { if (CMD_STATE(sc) == FNIC_IOREQ_ABTS_PENDING) {
spin_unlock_irqrestore(io_lock, flags);
CMD_FLAGS(sc) |= FNIC_IO_ABTS_PENDING; /*
switch (hdr_status) { * set the FNIC_IO_DONE so that this doesn't get
case FCPIO_SUCCESS: * flagged as 'out of order' if it was not aborted
*/
CMD_FLAGS(sc) |= FNIC_IO_DONE; CMD_FLAGS(sc) |= FNIC_IO_DONE;
FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, CMD_FLAGS(sc) |= FNIC_IO_ABTS_PENDING;
"icmnd_cmpl ABTS pending hdr status = %s " spin_unlock_irqrestore(io_lock, flags);
"sc 0x%p scsi_status %x residual %d\n", if(FCPIO_ABORTED == hdr_status)
fnic_fcpio_status_to_str(hdr_status), sc,
icmnd_cmpl->scsi_status,
icmnd_cmpl->residual);
break;
case FCPIO_ABORTED:
CMD_FLAGS(sc) |= FNIC_IO_ABORTED; CMD_FLAGS(sc) |= FNIC_IO_ABORTED;
break;
default:
FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host,
"icmnd_cmpl abts pending " "icmnd_cmpl abts pending "
"hdr status = %s tag = 0x%x sc = 0x%p\n", "hdr status = %s tag = 0x%x sc = 0x%p"
"scsi_status = %x residual = %d\n",
fnic_fcpio_status_to_str(hdr_status), fnic_fcpio_status_to_str(hdr_status),
id, sc); id, sc,
break; icmnd_cmpl->scsi_status,
} icmnd_cmpl->residual);
return; return;
} }
......
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