diff options
author | Jay Fenlason, Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-01-04 10:23:29 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-03-24 15:56:43 -0400 |
commit | b1bda4cdc2037447bd66753bf5ccab66d91b0b59 (patch) | |
tree | 6aae47fb85125c15150d6d306354de5deb1e316f /drivers/firewire/fw-transaction.h | |
parent | b769bd17656f991c5588c676376e5ec77d25997a (diff) |
firewire: cdev: add ioctls for isochronous resource management
Based on
Date: Tue, 18 Nov 2008 11:41:27 -0500
From: Jay Fenlason <fenlason@redhat.com>
Subject: [Patch V4] Add ISO resource management support
with several changes to the ABI and implementation. Only the part of
the ABI which enables auto-reallocation and auto-deallocation is
included here.
This implements ioctls for kernel-assisted allocation of isochronous
channels and isochronous bandwidth. The benefits are:
- The client does not have to have write access to the /dev/fw* device
corresponding to the IRM.
- The client does not have to perform reallocation after bus resets.
- Channel and bandwidth are deallocated by the kernel if the file is
closed before the client deallocated the resources. Thus resources
are released even if the client crashes.
It is anticipated that future in-kernel code (firewire-core IRM code;
the firewire port of firedtv), will use the fw-iso.c portions of this
code too.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: David Moore <dcm@acm.org>
Diffstat (limited to 'drivers/firewire/fw-transaction.h')
-rw-r--r-- | drivers/firewire/fw-transaction.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index 48e88d53998b..212a10293828 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h | |||
@@ -82,6 +82,7 @@ | |||
82 | #define CSR_SPEED_MAP 0x2000 | 82 | #define CSR_SPEED_MAP 0x2000 |
83 | #define CSR_SPEED_MAP_END 0x3000 | 83 | #define CSR_SPEED_MAP_END 0x3000 |
84 | 84 | ||
85 | #define BANDWIDTH_AVAILABLE_INITIAL 4915 | ||
85 | #define BROADCAST_CHANNEL_INITIAL (1 << 31 | 31) | 86 | #define BROADCAST_CHANNEL_INITIAL (1 << 31 | 31) |
86 | #define BROADCAST_CHANNEL_VALID (1 << 30) | 87 | #define BROADCAST_CHANNEL_VALID (1 << 30) |
87 | 88 | ||
@@ -343,6 +344,9 @@ int fw_iso_context_start(struct fw_iso_context *ctx, | |||
343 | int fw_iso_context_stop(struct fw_iso_context *ctx); | 344 | int fw_iso_context_stop(struct fw_iso_context *ctx); |
344 | void fw_iso_context_destroy(struct fw_iso_context *ctx); | 345 | void fw_iso_context_destroy(struct fw_iso_context *ctx); |
345 | 346 | ||
347 | void fw_iso_resource_manage(struct fw_card *card, int generation, | ||
348 | u64 channels_mask, int *channel, int *bandwidth, bool allocate); | ||
349 | |||
346 | struct fw_card_driver { | 350 | struct fw_card_driver { |
347 | /* | 351 | /* |
348 | * Enable the given card with the given initial config rom. | 352 | * Enable the given card with the given initial config rom. |