aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-iso.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-12-21 10:39:46 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-03-24 15:56:41 -0400
commit4817ed240232e89583b0506c2d8e426739af5da3 (patch)
tree95d8220f1cae2df2490488dd35381c7d73a5be7b /drivers/firewire/fw-iso.c
parenta459b8ab9c176143fecef8ace4b70d6dbd7a8113 (diff)
firewire: prevent creation of multiple IR DMA contexts for the same channel
OHCI-1394 1.1 clause 10.4.3 says: "If more than one IR DMA context specifies receives for packets from the same isochronous channel, the context destination for that channel's packets is undefined." Any userspace client and in the future also kernelspace clients can allocate IR DMA contexts for any channel. We don't want them to interfere with each other, hence it is preferable to return -EBUSY if allocation of a second context for a channel is attempted. Notes: - This limitation is OHCI-1394 specific, therefore its proper place of implementation is down in the low-level driver. - Since the <linux/firewire-cdev.h> ABI simply maps one userspace iso client context to one hardware iso context, this OHCI-1394 limitation alas requires userspace to implement its own multiplexing of iso reception from the same channel and card to multiple clients when needed. - The limitation is independent of channel allocation at the IRM; the latter is really only important for the initiation of iso transmission but not of iso reception. - We don't need to do the same for IT DMA because OHCI-1394 does not have any ties between IT contexts and channels. Only the voluntary channel allocation protocol via the IRM, globally to the FireWire bus, can ensure proper isochronous transmit behaviour anyway. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-iso.c')
-rw-r--r--drivers/firewire/fw-iso.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/firewire/fw-iso.c b/drivers/firewire/fw-iso.c
index 3ff2cfc1bba6..39f3bacee404 100644
--- a/drivers/firewire/fw-iso.c
+++ b/drivers/firewire/fw-iso.c
@@ -110,7 +110,8 @@ struct fw_iso_context *fw_iso_context_create(struct fw_card *card,
110{ 110{
111 struct fw_iso_context *ctx; 111 struct fw_iso_context *ctx;
112 112
113 ctx = card->driver->allocate_iso_context(card, type, header_size); 113 ctx = card->driver->allocate_iso_context(card,
114 type, channel, header_size);
114 if (IS_ERR(ctx)) 115 if (IS_ERR(ctx))
115 return ctx; 116 return ctx;
116 117