ieee1394: rawiso: requeue packet for transmission after skipped cycle
authorPieter Palmers <pieterp@joow.be>
Wed, 19 Mar 2008 21:10:59 +0000 (22:10 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Fri, 25 Apr 2008 16:15:45 +0000 (18:15 +0200)
commitcc9429bcb6e36e9f2c51e4e47b95740e472c4c2d
treefecf2d6e8fdbe6f0dd5ee74e4b3cbe945d473c3d
parentdb8be076cad4b843aa743ef462c75022cddd9c63
ieee1394: rawiso: requeue packet for transmission after skipped cycle

As it seems, some host controllers have issues that can cause them to
skip cycles now and then when using large packets. I suspect that this
is due to DMA not succeeding in time. If the transmit fifo can't contain
more than one packet (big packets), the DMA should provide a new packet
each cycle (125us). I am under the impression that my current PCI
express test system can't guarantee this.

In any case, the patch tries to provide a workaround as follows:
The DMA program descriptors are modified such that when an error occurs,
the DMA engine retries the descriptor the next cycle instead of
stalling. This way no data is lost. The side effect of this is that
packets are sent with one cycle delay. This however might not be that
much of a problem for certain protocols (e.g. AM824). If they use
padding packets for e.g. rate matching they can drop one of those to
resync the streams.

The amount of skips between two userspace wakeups is counted. This
number is then propagated to userspace through the upper 16 bits of the
'dropped' parameter. This allows unmodified userspace applications due
to the following:
1) libraw simply passes this dropped parameter to the user application
2) the meaning of the dropped parameter is: if it's nonzero, something
bad has happened. The actual value of the parameter at this moment does
not have a specific meaning.

A libraw client can then retrieve the number of skipped cycles and
account for them if needed.

Signed-off-by: Pieter Palmers <pieterp@joow.be>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/ieee1394/iso.h
drivers/ieee1394/ohci1394.c
drivers/ieee1394/raw1394.c
This page took 0.032071 seconds and 5 git commands to generate.