Skip to content
  • Vasu Dev's avatar
    [SCSI] libfc: fix fcp pkt recovery in fc_fcp_recv_data · 5c12c418
    Vasu Dev authored
    
    
    Currently fc_fcp_recv_data calls fc_fcp_retry_cmd to
    retry failed IO but in this case tgt is still sending
    data frames, therefore exchange needs to be aborted
    first before initiating retry. So this patch fixes
    this by aborting exchange first then have retry.
    
    Renames fc_timeout_error to fc_fcp_recovery since
    fc_timeout_error is already called from several other
    places beside from fcp timeout handler and then
    used fc_fcp_recovery for abort & retry from
    fc_fcp_recv_data, this rename also required renaming
    FC_CMD_TIME_OUT status to FC_CMD_RECOVERY to be
    consistent with new fc_fcp_recovery.
    
    Data frames are not expected for an DDPed exchange and
    potentially it could be tampered data frame, so does
    recovery in this case by calling fc_fcp_recovery.
    
    Signed-off-by: default avatarVasu Dev <vasu.dev@intel.com>
    Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
    5c12c418