Skip to content

Commit

Permalink
[SCSI] qla2xxx: Group CS_RESET return status with other link level ev…
Browse files Browse the repository at this point in the history
…ent statuses.

Currently when we receive a CS_RESET as a response for a SCSI command the
driver will return DID_TRANSPORT_DISRUPTED back to the SCSI mid-layer.  There
are certain circumstances where this could cause the mid-layer to exhaust all of
its retries if the FC port goes away for a short time.  This will result in
commands being prematurly failed.  Moving the CS_RESET return code to be
grouped with other link level events will cause the FC transport layer to block
that target's queue thus preventing the premature exhaustion of retries.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Chad Dupuis authored and James Bottomley committed Oct 25, 2010
1 parent 4d97cc5 commit ff454b0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/scsi/qla2xxx/qla_isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,8 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
case CS_INCOMPLETE:
case CS_PORT_UNAVAILABLE:
case CS_TIMEOUT:
case CS_RESET:

/*
* We are going to have the fc class block the rport
* while we try to recover so instruct the mid layer
Expand All @@ -1781,10 +1783,6 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
qla2x00_mark_device_lost(fcport->vha, fcport, 1, 1);
break;

case CS_RESET:
cp->result = DID_TRANSPORT_DISRUPTED << 16;
break;

case CS_ABORTED:
cp->result = DID_RESET << 16;
break;
Expand Down

0 comments on commit ff454b0

Please sign in to comment.