aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-device-cdev.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-03-14 17:34:54 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-15 13:21:36 -0400
commiteb0306eac0aad0b7da18d8fbfb777f155b2c010d (patch)
treeac0d1922362804b9687deb5bffb8179ac670149a /drivers/firewire/fw-device-cdev.c
parentc70dc788fd8d3870b41231b6a53a64afb98cfd13 (diff)
firewire: Move sync and tag parameters to start_iso ioctl.
Setting these at create_context time or start_iso time doesn't matter much, but raw1394 sets them at start_iso time so that will be easier to emulate this way. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-device-cdev.c')
-rw-r--r--drivers/firewire/fw-device-cdev.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c
index be6bfcfb9065..175ea042ba3f 100644
--- a/drivers/firewire/fw-device-cdev.c
+++ b/drivers/firewire/fw-device-cdev.c
@@ -546,12 +546,6 @@ static int ioctl_create_iso_context(struct client *client, void __user *arg)
546 546
547 switch (request.type) { 547 switch (request.type) {
548 case FW_ISO_CONTEXT_RECEIVE: 548 case FW_ISO_CONTEXT_RECEIVE:
549 if (request.sync > 15)
550 return -EINVAL;
551
552 if (request.tags == 0 || request.tags > 15)
553 return -EINVAL;
554
555 if (request.header_size < 4 || (request.header_size & 3)) 549 if (request.header_size < 4 || (request.header_size & 3))
556 return -EINVAL; 550 return -EINVAL;
557 551
@@ -567,13 +561,10 @@ static int ioctl_create_iso_context(struct client *client, void __user *arg)
567 return -EINVAL; 561 return -EINVAL;
568 } 562 }
569 563
570
571 client->iso_context = fw_iso_context_create(client->device->card, 564 client->iso_context = fw_iso_context_create(client->device->card,
572 request.type, 565 request.type,
573 request.channel, 566 request.channel,
574 request.speed, 567 request.speed,
575 request.sync,
576 request.tags,
577 request.header_size, 568 request.header_size,
578 iso_callback, client); 569 iso_callback, client);
579 if (IS_ERR(client->iso_context)) 570 if (IS_ERR(client->iso_context))
@@ -678,7 +669,16 @@ static int ioctl_start_iso(struct client *client, void __user *arg)
678 if (copy_from_user(&request, arg, sizeof request)) 669 if (copy_from_user(&request, arg, sizeof request))
679 return -EFAULT; 670 return -EFAULT;
680 671
681 return fw_iso_context_start(client->iso_context, request.cycle); 672 if (client->iso_context->type == FW_ISO_CONTEXT_RECEIVE) {
673 if (request.tags == 0 || request.tags > 15)
674 return -EINVAL;
675
676 if (request.sync > 15)
677 return -EINVAL;
678 }
679
680 return fw_iso_context_start(client->iso_context,
681 request.cycle, request.sync, request.tags);
682} 682}
683 683
684static int ioctl_stop_iso(struct client *client, void __user *arg) 684static int ioctl_stop_iso(struct client *client, void __user *arg)