aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Ma <steve.ma@intel.com>2009-05-06 13:52:29 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-08 14:29:11 -0400
commit30121d14f503dac056ee7f68d99eb5d548899b59 (patch)
tree558f950c8bf620347344b84d0bff60be464366db
parentd5e6054a0a097527b3920a8a0aefe7f830c014fd (diff)
[SCSI] libfc: Check if exchange is completed when receiving a sequence
When a sequence is received in response to an exchange we issued previously, we should check to see if the exchange has completed. If yes, the sequence should be discarded. Since the exchange might be still in the completion process, it should be untouched. Signed-off-by: Steve Ma <steve.ma@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--drivers/scsi/libfc/fc_exch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 992af05aacf1..7af9bceb8aa9 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -1159,6 +1159,10 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp)
1159 atomic_inc(&mp->stats.xid_not_found); 1159 atomic_inc(&mp->stats.xid_not_found);
1160 goto out; 1160 goto out;
1161 } 1161 }
1162 if (ep->esb_stat & ESB_ST_COMPLETE) {
1163 atomic_inc(&mp->stats.xid_not_found);
1164 goto out;
1165 }
1162 if (ep->rxid == FC_XID_UNKNOWN) 1166 if (ep->rxid == FC_XID_UNKNOWN)
1163 ep->rxid = ntohs(fh->fh_rx_id); 1167 ep->rxid = ntohs(fh->fh_rx_id);
1164 if (ep->sid != 0 && ep->sid != ntoh24(fh->fh_d_id)) { 1168 if (ep->sid != 0 && ep->sid != ntoh24(fh->fh_d_id)) {