FCP_RESID_OVER question

Nutter, John jnutter at cereva.com
Fri Jan 18 11:55:06 PST 2002


* From the T10 Reflector (t10 at t10.org), posted by:
* "Nutter, John" <jnutter at cereva.com>
*
I believe that you can see this case.  Take for example an Inquiry command
that has an allocation length of 100 but the FCP_DL is set to 50.  (This in
itself should not happen)  If the target has greater than 50 bytes of data
to return then the target would have to set the FCP_RESID_OVER bit and set
the residue field equal to the total data that can be sent (limited only by
the command allocation length) minus the FCP_DL.

Example:

If the Inquiry data for the target is 120 bytes in length, the allocation
length in the command is 100, and the FCP_DL was 50, then the FCP_RESID_OVER
bit would be set and the residual would be set to 50.  The reason it would
be set to 50 instead of 70 is that the command was asking for 100 bytes
maximum, even though you have 120 bytes total.  

I hope this helps.

John J. Nutter              Phone:  (508) 787-5367
Cereva Networks Inc.        Fax:    (508) 787-5002
3 Network Drive             e-mail: jnutter at cereva.com
Marlborough, MA 01752-3083  web:    www.cereva.com

-----Original Message-----
From: Claude PATTEIN [mailto:Claude.Pattein at bull.net]
Sent: Friday, January 18, 2002 3:28 AM
To: Robert Snively
Cc: t10 at t10.org
Subject: Re: FCP_RESID_OVER question

* From the T10 Reflector (t10 at t10.org), posted by:
* Claude PATTEIN <Claude.Pattein at bull.net>
*
I understand your reply in case of a Read Cmd, but my question was
in fact relative to commands like Inquiry, Receive Diagnostics, Mode
Sense, .. . In these cases, could you clarify ?

Claude Pattein

Robert Snively wrote:
>
> > I wish to get some clarification about RESID_OVER.
> >
> > In FCP-2 spec, draft rev.7, I found, in 9.3 FCP_DATA IU, the
> > sentence :
> > "If the command requested that data beyond FCP_DL be transferred,
> > the FCP_RSP_IU shall contain the FCP_RESID_OVER bit set to one"
> >
> > In the case of a SCSI CDB containing an insuffisent
> > Allocation length, but
> > with FCP_DL equal to this Allocation length, do I get a
> > FCP_RESID_OVER
> > Status (due to the troncation of returned data) or do I get a
> > zero Status
> > (due to FCP_DL = Allocation length) ?
> >
>
> If I interpret your question correctly, you will not
> get a residual bit set, but you will have CHECK CONDITION in the
> FCP, with sense data indicating an incorrect length.
>
> > In other words, if FCP_DL always equals Allocation length (of
> > SCSI CDB),
> > is it possible to get a FCP_RESID_OVER status ?
>
> The allocation length is actually a calculated value based
> on number of blocks and block size (for disks).  If the
> driver is set up incorrectly, the predicted allocation
> length (calculated by the driver using the wrong block length) will
> match the FCP_DL, but will not match the actual
> allocation length (which is calculated by the disk drive
> depending on its known properties).  In devices where the
> actual allocation length is exposed, I believe you are
> correct.
>
> Basically FCP_RESID is designed to detect cases where the
> software that prepares the CDB and the software/firmware that
> prepares the DMA space are not working from the same assumptions.
*
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at t10.org
*
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at t10.org




More information about the T10 mailing list