On 11/2/10 2:12 PM, Joe Eykholt wrote:
> 
> 
> On 11/1/10 9:53 PM, Yi Zou wrote:
>> no need to do REC if status is received already
> 
> It's possible we didn't get all the data.
> Is that checked for in this case?
> Did you test with a tape READ where some data was dropped?
> I think that's important.

I should've mentioned:  we've seen the response get delivered
to FCP before the data on occasion.  This happens when the interrupt
is moved between CPUs by irqbalance.  When that happens, the order
the packets are delivered can be different than the order received,
and the response appears to come before the last data frame.

For tapes, we don't want to request retransmission in this case,
so we wait a bit after the response is received for the data to
appear.  If it still is outstanding and we timeout, we send REC.

In the case where the response is received and all the data has
been received, the timeout should be canceled so that nothing
is done in the timeout for that case.

I'm not as familiar with fc_fcp.c as I used to be, so if you're
changing that area, I'm just hoping you'll check and retest all
these cases with lost packets, and especially in the tape case,
where recovery can't just retry the SCSI operation, but must
instead do an REC/SRR sequence.

        Thanks,
        Joe

>> Signed-off-by: Yi Zou <[email protected]>
>> ---
>>
>>  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 b277382..651447f 100644
>> --- a/drivers/scsi/libfc/fc_fcp.c
>> +++ b/drivers/scsi/libfc/fc_fcp.c
>> @@ -1373,10 +1373,10 @@ static void fc_fcp_timeout(unsigned long data)
>>  
>>      fsp->state |= FC_SRB_FCP_PROCESSING_TMO;
>>  
>> -    if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED)
>> -            fc_fcp_rec(fsp);
>> -    else if (fsp->state & FC_SRB_RCV_STATUS)
>> +    if (fsp->state & FC_SRB_RCV_STATUS)
>>              fc_fcp_complete_locked(fsp);
>> +    else if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED)
>> +            fc_fcp_rec(fsp);
>>      else
>>              fc_fcp_recovery(fsp, FC_TIMED_OUT);
>>      fsp->state &= ~FC_SRB_FCP_PROCESSING_TMO;
>>
>> _______________________________________________
>> 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