sending 1394 empty packets

Hi,

I’m a little bit confused, maybe someone can shed some light.

My 1394 driver sends isochronous data using variable-size
SCATTER_GATHER_HEADERS descriptors. One packet out of 5, maybe, I generate
an empty packet (a packet with a header but no additional data). Because
SCATTER_GATHER_HEADERS work with pairs of descriptors, I always attach
descriptors in groups of two (one for the headers, one for the associated
data). It works as expected.

But let’s say I have some sort of starvation and I have to send only empty
packets for a whole descriptor. Usually, my second descriptor contains some
data but in this case, it’s only empty packets, there is no data: it has a
length of zero. Attaching this pair of descriptors fails with
STATUS_INVALID_PARAMETER, which, we can say, could make sense; because the
second one has a length of 0.

So I told myself, well, maybe attaching an empty descriptor is bad. And I
tried attaching only the first descriptor (only the one with the header
information). This succeeds… or at least, does not return an error code.
However, I don’t see any packet coming out! So I’m a little bit stuck when
I have nothing more than empty packets to send.

Therefore, my question is the following: How can one send a whole descriptor
of header-only packets in SCATTER_GATHER_HEADER mode? The DDK does not
mention this case.

When trying the operation I described on the checked build of ohci1394.sys,
it asserts with the following string: “!isochResource->HeaderDesc”. Does it
mean something to you?

Any help appreciated, TIA.

Mathieu Routhier

> Therefore, my question is the following: How can one send a whole
descriptor

of header-only packets in SCATTER_GATHER_HEADER mode? The DDK does
not

You can try to use the “junk packets” (header followed by some junk)
instead of header-only packets. For DV, it worked.
For junk, allocate a piece of memory and reuse in all descriptors.

Max

In case someone is ever interested in this, I found out the correct thing to
do with precious help from Don Miller at Microsoft.

  1. Even if the data descriptor (the second one) does not contain data, you
    still need to attach it.
  2. The second descriptor must have ulLength set to 0.
  3. The second descriptor must have its Mdl set to NULL.
  4. The second descriptor must have nMaxBytesPerFrame set to something
    different than zero.

That’s it!
Mat

-----Original Message-----
From: Mathieu Routhier [mailto:xxxxx@guillemot.com]
Sent: Wednesday, June 04, 2003 4:56 PM
To: NT Developers Interest List
Cc: xxxxx@microsoft.com
Subject: [ntdev] sending 1394 empty packets

Hi,

I’m a little bit confused, maybe someone can shed some light.

My 1394 driver sends isochronous data using variable-size
SCATTER_GATHER_HEADERS descriptors. One packet out of 5, maybe, I generate
an empty packet (a packet with a header but no additional data). Because
SCATTER_GATHER_HEADERS work with pairs of descriptors, I always attach
descriptors in groups of two (one for the headers, one for the associated
data). It works as expected.

But let’s say I have some sort of starvation and I have to send only empty
packets for a whole descriptor. Usually, my second descriptor contains some
data but in this case, it’s only empty packets, there is no data: it has a
length of zero. Attaching this pair of descriptors fails with
STATUS_INVALID_PARAMETER, which, we can say, could make sense; because the
second one has a length of 0.

So I told myself, well, maybe attaching an empty descriptor is bad. And I
tried attaching only the first descriptor (only the one with the header
information). This succeeds… or at least, does not return an error code.
However, I don’t see any packet coming out! So I’m a little bit stuck when
I have nothing more than empty packets to send.

Therefore, my question is the following: How can one send a whole descriptor
of header-only packets in SCATTER_GATHER_HEADER mode? The DDK does not
mention this case.

When trying the operation I described on the checked build of ohci1394.sys,
it asserts with the following string: “!isochResource->HeaderDesc”. Does it
mean something to you?

Any help appreciated, TIA.

Mathieu Routhier


You are currently subscribed to ntdev as: xxxxx@guillemot.com
To unsubscribe send a blank email to xxxxx@lists.osr.com