summaryrefslogtreecommitdiff
path: root/drivers/firewire/fw-cdev.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2009-01-04 16:23:29 +0100
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-03-24 20:56:44 +0100
commit33580a3ef5ba3bc0ee1b520df82a24bb37ce28f0 (patch)
tree3bd567d8c5244a049eef32147f4fb84f6a19a184 /drivers/firewire/fw-cdev.c
parent1ec3c0269d7196118cc7c403654ca5f19ef4d584 (diff)
firewire: cdev: add ioctl to query maximum transmission speed
While the speed of asynchronous transactions is automatically chosen by the kernel, the speed of isochronous streams has to be chosen by the initiating client. In case of 1394a bus topologies, the maximum possible speed could be figured out with some effort by evaluation of the remote node's link speed field in the config ROM, the local node's link speed field, and the PHY speeds and topologic information in the local node's or IRM's topology map CSR. However, this does not work in case of 1394b buses. Hence add an ioctl to export the maximum speed which the kernel already determined. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-cdev.c')
-rw-r--r--drivers/firewire/fw-cdev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c
index 08fe68d34f32..05ad2a8f286c 100644
--- a/drivers/firewire/fw-cdev.c
+++ b/drivers/firewire/fw-cdev.c
@@ -1220,6 +1220,15 @@ static int ioctl_deallocate_iso_resource_once(struct client *client, void *buffe
return init_iso_resource(client, request, ISO_RES_DEALLOC_ONCE);
}
+static int ioctl_get_speed(struct client *client, void *buffer)
+{
+ struct fw_cdev_get_speed *request = buffer;
+
+ request->max_speed = client->device->max_speed;
+
+ return 0;
+}
+
static int (* const ioctl_handlers[])(struct client *client, void *buffer) = {
ioctl_get_info,
ioctl_send_request,
@@ -1238,6 +1247,7 @@ static int (* const ioctl_handlers[])(struct client *client, void *buffer) = {
ioctl_deallocate_iso_resource,
ioctl_allocate_iso_resource_once,
ioctl_deallocate_iso_resource_once,
+ ioctl_get_speed,
};
static int dispatch_ioctl(struct client *client,