diff options
author | Vasu Dev <vasu.dev@intel.com> | 2012-10-08 21:43:24 -0400 |
---|---|---|
committer | Robert Love <robert.w.love@intel.com> | 2012-12-04 13:16:38 -0500 |
commit | 5b97fabdc815b4b60bac2328b58c5c7274debf58 (patch) | |
tree | 70f31d476070acca39e1e3e17b7fb6341bd931c8 /drivers/scsi/libfc | |
parent | b69f0859dc8e633c5d8c06845811588fe17e68b3 (diff) |
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: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index fcb9d0b20ee4..09c81b2f2169 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
@@ -1381,10 +1381,10 @@ static void fc_fcp_timeout(unsigned long data) | |||
1381 | 1381 | ||
1382 | fsp->state |= FC_SRB_FCP_PROCESSING_TMO; | 1382 | fsp->state |= FC_SRB_FCP_PROCESSING_TMO; |
1383 | 1383 | ||
1384 | if (fsp->state & FC_SRB_RCV_STATUS) | 1384 | if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED) |
1385 | fc_fcp_complete_locked(fsp); | ||
1386 | else if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED) | ||
1387 | fc_fcp_rec(fsp); | 1385 | fc_fcp_rec(fsp); |
1386 | else if (fsp->state & FC_SRB_RCV_STATUS) | ||
1387 | fc_fcp_complete_locked(fsp); | ||
1388 | else | 1388 | else |
1389 | fc_fcp_recovery(fsp, FC_TIMED_OUT); | 1389 | fc_fcp_recovery(fsp, FC_TIMED_OUT); |
1390 | fsp->state &= ~FC_SRB_FCP_PROCESSING_TMO; | 1390 | fsp->state &= ~FC_SRB_FCP_PROCESSING_TMO; |