Hello everyone,

In the DDK, page SCSI_REQUEST_BLOCK (System Support for Buses->SCSI
Bus->Reference->SCSI Bus Structure->SCSI_REQUEST_BLOCK), the SrbFlags can
have a flag set as 'SRB_FLAGS_NO_DATA_TRANSFER'. The page says, "Indicates no
data transfer with this request. If this is set, the flags
SRB_FLAGS_DATA_OUT, SRB_FLAGS_DATA_IN, and SRB_FLAGS_UNSPECIFIED_DIRECTION
are clear"

Now when I look at the include file srb.h, this flag is '#define'd as
0x00000000. Can anyone explain this? If I am going to test the flag using
the following statement:

if( srb->SrbFlags & SRB_FLAGS_NO_DATA_TRANSFER )
{
// do all this
}

I will never have the block executed.

This got to be a bug, true or not? Thanks.

Re: SCSI SRB FLAG does not make sense - SRB_FLAGS_NO_DATA_TRANSFER by nospam

nospam
Wed Aug 18 17:01:04 CDT 2004

It's a common practice to use zero flags. If the flag was non-zero, you
could set SrbFlags to say ( SRB_FLAGS_DATA_IN |
SRB_FLAGS_NO_DATA_TRANSFER ) which hardly makes any sense.

Do this:

if( srb->SrbFlags & ( SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT ) )
{
// data transfer
}
else
{
// NO data transfer
}


"Long Ta" <LongTa@discussions.microsoft.com> wrote in message
news:FE8305F1-8F07-4D02-9817-9A125C046B20@microsoft.com...
> Hello everyone,
>
> In the DDK, page SCSI_REQUEST_BLOCK (System Support for Buses->SCSI
> Bus->Reference->SCSI Bus Structure->SCSI_REQUEST_BLOCK), the SrbFlags can
> have a flag set as 'SRB_FLAGS_NO_DATA_TRANSFER'. The page says, "Indicates
> no
> data transfer with this request. If this is set, the flags
> SRB_FLAGS_DATA_OUT, SRB_FLAGS_DATA_IN, and SRB_FLAGS_UNSPECIFIED_DIRECTION
> are clear"
>
> Now when I look at the include file srb.h, this flag is '#define'd as
> 0x00000000. Can anyone explain this? If I am going to test the flag
> using
> the following statement:
>
> if( srb->SrbFlags & SRB_FLAGS_NO_DATA_TRANSFER )
> {
> // do all this
> }
>
> I will never have the block executed.
>
> This got to be a bug, true or not? Thanks.