firewire: add isochronous multichannel reception
commit872e330e38806d835bd6c311c93ab998e2fb9058
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Thu, 29 Jul 2010 16:19:22 +0000 (29 18:19 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Thu, 29 Jul 2010 21:09:18 +0000 (29 23:09 +0200)
tree92497ce79b1157761b1aebdb63b8d74f68d42c15
parentae2a97661482c1d0f1aa41b837da95054d0e9a1b
firewire: add isochronous multichannel reception

This adds the DMA context programming and userspace ABI for multichannel
reception, i.e. for listening on multiple channel numbers by means of a
single DMA context.

The use case is reception of more streams than there are IR DMA units
offered by the link layer.  This is already implemented by the older
ohci1394 + ieee1394 + raw1394 stack.  And as discussed recently on
linux1394-devel, this feature is occasionally used in practice.

The big drawbacks of this mode are that buffer layout and interrupt
generation necessarily differ from single-channel reception:  Headers
and trailers are not stripped from packets, packets are not aligned with
buffer chunks, interrupts are per buffer chunk, not per packet.

These drawbacks also cause a rather hefty code footprint to support this
rarely used OHCI-1394 feature.  (367 lines added, among them 94 lines of
added userspace ABI documentation.)

This implementation enforces that a multichannel reception context may
only listen to channels to which no single-channel context on the same
link layer is presently listening to.  OHCI-1394 would allow to overlay
single-channel contexts by the multi-channel context, but this would be
a departure from the present first-come-first-served policy of IR
context creation.

The implementation is heavily based on an earlier one by Jay Fenlason.
Thanks Jay.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/core-cdev.c
drivers/firewire/core-iso.c
drivers/firewire/core.h
drivers/firewire/ohci.c
include/linux/firewire-cdev.h
include/linux/firewire.h