From 097666ce6e71007939eafb17cda68e8d01add4c0 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Thu, 14 Aug 2008 22:31:46 -0500 Subject: [PATCH 13/23] libfc: don't set ESB_ST_COMPLETE in fc_exch_timeout If an abort times out fc_exch_timeout just sets the state to ESB_ST_COMPLETE, and we may never hear from it again. If scsi-ml initiated the abort then we will try lun reset then a port reset. And without the resp = NULL change in "libfc: make sure we cleanup the ep in fc_exch_reset" we would see the ESB_ST_COMPLETE then not call the the upper layers to free the ep and fsp. In the old code fc_exch_reset would not have wanted to call the upper layers in this case so that was my fault. However, in the old code if fc_exch.c initaited the abort, fc_exch_reset would want to notify the upper layer so they could free the fsp, so these patches fix that. And as a side note. I thought for non fcp commands we would want to escalate the internal error handler so we do something. For fcp commands we can just let scsi-ml handle it. Signed-off-by: Mike Christie --- drivers/scsi/libfc/fc_exch.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 0378e58..7d7a3ef 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -394,9 +394,6 @@ static void fc_exch_timeout(unsigned long ep_arg) spin_unlock_bh(&ep->ex_lock); if (e_stat & ESB_ST_REC_QUAL) fc_exch_rrq(ep); - } else if (e_stat & ESB_ST_ABNORMAL) { - ep->esb_stat |= ESB_ST_COMPLETE; - spin_unlock_bh(&ep->ex_lock); } else { resp = ep->resp; arg = ep->resp_arg; -- 1.5.5.1