diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-03-14 17:34:53 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-03-15 13:21:36 -0400 |
commit | c70dc788fd8d3870b41231b6a53a64afb98cfd13 (patch) | |
tree | 60a70261eb3e6c812fd6c07ac48a863de73ba0be /drivers/firewire/fw-device-cdev.c | |
parent | d60d7f1d5ce83d1be8d79256f711d6a645b7a2fa (diff) |
firewire: Fix dualbuffer iso receive mode and drop buffer fill mode.
The dualbuffer DMA setup did not account for the iso trailer word
and thus didn't work correctly. With this fixed we can drop the
dual buffer fallback mode.
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.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c index 7b0efccf78f1..be6bfcfb9065 100644 --- a/drivers/firewire/fw-device-cdev.c +++ b/drivers/firewire/fw-device-cdev.c | |||
@@ -541,20 +541,32 @@ static int ioctl_create_iso_context(struct client *client, void __user *arg) | |||
541 | if (copy_from_user(&request, arg, sizeof request)) | 541 | if (copy_from_user(&request, arg, sizeof request)) |
542 | return -EFAULT; | 542 | return -EFAULT; |
543 | 543 | ||
544 | if (request.type > FW_ISO_CONTEXT_RECEIVE) | ||
545 | return -EINVAL; | ||
546 | |||
547 | if (request.channel > 63) | 544 | if (request.channel > 63) |
548 | return -EINVAL; | 545 | return -EINVAL; |
549 | 546 | ||
550 | if (request.sync > 15) | 547 | switch (request.type) { |
551 | return -EINVAL; | 548 | case FW_ISO_CONTEXT_RECEIVE: |
549 | if (request.sync > 15) | ||
550 | return -EINVAL; | ||
552 | 551 | ||
553 | if (request.tags == 0 || request.tags > 15) | 552 | if (request.tags == 0 || request.tags > 15) |
554 | return -EINVAL; | 553 | return -EINVAL; |
554 | |||
555 | if (request.header_size < 4 || (request.header_size & 3)) | ||
556 | return -EINVAL; | ||
555 | 557 | ||
556 | if (request.speed > SCODE_3200) | 558 | break; |
559 | |||
560 | case FW_ISO_CONTEXT_TRANSMIT: | ||
561 | if (request.speed > SCODE_3200) | ||
562 | return -EINVAL; | ||
563 | |||
564 | break; | ||
565 | |||
566 | default: | ||
557 | return -EINVAL; | 567 | return -EINVAL; |
568 | } | ||
569 | |||
558 | 570 | ||
559 | client->iso_context = fw_iso_context_create(client->device->card, | 571 | client->iso_context = fw_iso_context_create(client->device->card, |
560 | request.type, | 572 | request.type, |