[SCSI] libfc: Check if exchange is completed when receiving a sequence

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, June 12, 2009 - 11:04 am

Gitweb:     http://git.kernel.org/linus/30121d14f503dac056ee7f68d99eb5d548899b59
Commit:     30121d14f503dac056ee7f68d99eb5d548899b59
Parent:     d5e6054a0a097527b3920a8a0aefe7f830c014fd
Author:     Steve Ma <steve.ma@intel.com>
AuthorDate: Wed May 6 10:52:29 2009 -0700
Committer:  James Bottomley <James.Bottomley@HansenPartnership.com>
CommitDate: Mon Jun 8 13:29:11 2009 -0500

    [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>
---
 drivers/scsi/libfc/fc_exch.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 992af05..7af9bce 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)
 		atomic_inc(&mp->stats.xid_not_found);
 		goto out;
 	}
+	if (ep->esb_stat & ESB_ST_COMPLETE) {
+		atomic_inc(&mp->stats.xid_not_found);
+		goto out;
+	}
 	if (ep->rxid == FC_XID_UNKNOWN)
 		ep->rxid = ntohs(fh->fh_rx_id);
 	if (ep->sid != 0 && ep->sid != ntoh24(fh->fh_d_id)) {
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[SCSI] libfc: Check if exchange is completed when receivin ..., Linux Kernel Mailing ..., (Fri Jun 12, 11:04 am)