Mike Christie wrote:
> Vasu Dev wrote:
>> Currently fc_fcp_abts_resp() only does exch_done and cleanup
>> if BA_ACC received to abort req, so added code to do cleanup
>> on BA_RJT also, however not sure if scsi result should be
>> diffrent for BA_ACC v/s BA_RJT.
> 
> Either way we need to retry the command because we dropped status and 
> data. I thought I sent a patch for that but it looks like it did not hit 
> the list, so here it is attached. With that patch we will retry the 
> command.
> 
> 
> 
>>
>> Signed-off-by: Vasu Dev <[EMAIL PROTECTED]>
>> ---
>>
>>  drivers/scsi/libfc/fc_fcp.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>>
>> diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
>> index f2915ed..bfe077f 100644
>> --- a/drivers/scsi/libfc/fc_fcp.c
>> +++ b/drivers/scsi/libfc/fc_fcp.c
>> @@ -609,7 +609,7 @@ static void fc_fcp_abts_resp(struct fc_fcp_pkt 
>> *fsp, struct fc_frame_header *fh)
>>       * we will let the command timeout and scsi-ml escalate if
>>       * the abort was rejected
>>       */
>> -    if (fh->fh_r_ctl == FC_RCTL_BA_ACC) {
>> +    if (fh->fh_r_ctl == FC_RCTL_BA_ACC || fh->fh_r_ctl == 
>> FC_RCTL_BA_RJT) {
> 
> 
> I remembered why I did this after I mentioned it on the list. If it is 
> rejected do we know the status of the exchange we are aborting? If not 
> then it seemed safest to let the scsi eh escalate the eh. For example if 
> it is rejected because the target port is not able to exexute the abort 
> then we do not want to complete the command here and possibly retry it 
> before killing it on the target.

I meant to also say we can probably kill/complete it here if we know the 
scsi-eh is going to run and escalate the eh.

> 
> I guess to be able to complete it here we need to look into the reason 
> code, but I am not sure if the optimization is needed.
> 
> 
>>          fsp->state |= FC_SRB_ABORTED;
>>          fsp->state &= ~FC_SRB_ABORT_PENDING;
>>          fsp->status_code = FC_CMD_ABORTED;
>>
>> _______________________________________________
>> devel mailing list
>> [email protected]
>> http://www.open-fcoe.org/mailman/listinfo/devel
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> devel mailing list
> [email protected]
> http://www.open-fcoe.org/mailman/listinfo/devel

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

Reply via email to