Currently exchange is not aborted in case underrun, so this patch
fixes this by issuing exchange abort along FC_DATA_UNDRUN error since
such error-ed exchange must be aborted first before same can be re-used.

Tested-By: Jack Morgan<[email protected]>
Signed-off-by: Vasu Dev <[email protected]>
---

 drivers/scsi/libfc/fc_fcp.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index c679594..9ad1248 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -959,8 +959,10 @@ static void fc_fcp_complete_locked(struct fc_fcp_pkt *fsp)
                if (fsp->cdb_status == SAM_STAT_GOOD &&
                    fsp->xfer_len < fsp->data_len && !fsp->io_status &&
                    (!(fsp->scsi_comp_flags & FCP_RESID_UNDER) ||
-                    fsp->xfer_len < fsp->data_len - fsp->scsi_resid))
+                    fsp->xfer_len < fsp->data_len - fsp->scsi_resid)) {
                        fsp->status_code = FC_DATA_UNDRUN;
+                       fc_fcp_send_abort(fsp);
+               }
        }
 
        seq = fsp->seq_ptr;

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

Reply via email to