Commit 5b97fabd authored by Vasu Dev's avatar Vasu Dev Committed by Robert Love

libfc: fix REC handling

Currently fc_fcp_timeout doesn't check FC_RP_FLAGS_REC_SUPPORTED
flag first, this prevents REC request ever going out at all
to the target having REC support. So this patches fixes the
fc_fcp_timeout by checking FC_RP_FLAGS_REC_SUPPORTED flag first.

The changed order won't cause any issue during clearing
FC_RP_FLAGS_REC_SUPPORTED on failed IO with target not supporting
FC_RP_FLAGS_REC_SUPPORTED, since retry on failed IO would succeed.
Signed-off-by: default avatarVasu Dev <vasu.dev@intel.com>
Tested-by: default avatarRoss Brattain <ross.b.brattain@intel.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
parent b69f0859
...@@ -1381,10 +1381,10 @@ static void fc_fcp_timeout(unsigned long data) ...@@ -1381,10 +1381,10 @@ static void fc_fcp_timeout(unsigned long data)
fsp->state |= FC_SRB_FCP_PROCESSING_TMO; fsp->state |= FC_SRB_FCP_PROCESSING_TMO;
if (fsp->state & FC_SRB_RCV_STATUS) if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED)
fc_fcp_complete_locked(fsp);
else if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED)
fc_fcp_rec(fsp); fc_fcp_rec(fsp);
else if (fsp->state & FC_SRB_RCV_STATUS)
fc_fcp_complete_locked(fsp);
else else
fc_fcp_recovery(fsp, FC_TIMED_OUT); fc_fcp_recovery(fsp, FC_TIMED_OUT);
fsp->state &= ~FC_SRB_FCP_PROCESSING_TMO; fsp->state &= ~FC_SRB_FCP_PROCESSING_TMO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment