From: Mike Christie <[EMAIL PROTECTED]>

This patch removes the code where we only fail a command if it
is a READ or WRITE 6 or 10. Why was this done?

Patch was made over [PATCH 1/1] libfc: remove timer_pending use in fc_fcp.c 
(take 2)

Signed-off-by: Mike Christie <[EMAIL PROTECTED]>
---
 drivers/scsi/libfc/fc_fcp.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 85cef96..d5f9b3f 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1224,14 +1224,13 @@ static void fc_fcp_cleanup(struct fc_lport *lp)
  *
  * If the response has not been received,
  * we see if data was received recently.  If it has been, we continue waiting,
- * otherwise, if it is a simple read or write, we abort the command.
+ * otherwise we fail the command.
  */
 static void fc_fcp_timeout(unsigned long data)
 {
        struct fc_fcp_pkt *fsp = (struct fc_fcp_pkt *)data;
        struct fc_rport *rport = fsp->rport;
        struct fc_rport_libfc_priv *rp = rport->dd_data;
-       u8 cdb_op;
 
        if (fc_fcp_lock_pkt(fsp))
                return;
@@ -1240,8 +1239,6 @@ static void fc_fcp_timeout(unsigned long data)
                goto unlock;
        fsp->state |= FC_SRB_FCP_PROCESSING_TMO;
 
-       cdb_op = fsp->cdb_cmd.fc_cdb[0];
-
        if (rp->flags & FC_RP_FLAGS_REC_SUPPORTED)
                fc_fcp_rec(fsp);
        /* TODO: change this to time_before/after */
@@ -1249,8 +1246,7 @@ static void fc_fcp_timeout(unsigned long data)
                fc_fcp_timer_set(fsp, FC_SCSI_ER_TIMEOUT);
        else if (fsp->state & FC_SRB_RCV_STATUS)
                fc_fcp_complete(fsp);
-       else if (cdb_op == READ_10 || cdb_op == READ_6 ||
-                cdb_op == WRITE_10 || cdb_op == WRITE_6)
+       else
                fc_timeout_error(fsp);
 
        fsp->state &= ~FC_SRB_FCP_PROCESSING_TMO;
-- 
1.5.4.1

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to