diff options
Diffstat (limited to 'drivers/firewire/fw-device-cdev.c')
-rw-r--r-- | drivers/firewire/fw-device-cdev.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c index 9f3c96c7af29..79e095ea552d 100644 --- a/drivers/firewire/fw-device-cdev.c +++ b/drivers/firewire/fw-device-cdev.c | |||
@@ -433,6 +433,19 @@ static int ioctl_send_response(struct client *client, void __user *arg) | |||
433 | return 0; | 433 | return 0; |
434 | } | 434 | } |
435 | 435 | ||
436 | static int ioctl_initiate_bus_reset(struct client *client, void __user *arg) | ||
437 | { | ||
438 | struct fw_cdev_initiate_bus_reset request; | ||
439 | int short_reset; | ||
440 | |||
441 | if (copy_from_user(&request, arg, sizeof request)) | ||
442 | return -EFAULT; | ||
443 | |||
444 | short_reset = (request.type == FW_CDEV_SHORT_RESET); | ||
445 | |||
446 | return fw_core_initiate_bus_reset(client->device->card, short_reset); | ||
447 | } | ||
448 | |||
436 | static void | 449 | static void |
437 | iso_callback(struct fw_iso_context *context, u32 cycle, | 450 | iso_callback(struct fw_iso_context *context, u32 cycle, |
438 | size_t header_length, void *header, void *data) | 451 | size_t header_length, void *header, void *data) |
@@ -606,6 +619,8 @@ dispatch_ioctl(struct client *client, unsigned int cmd, void __user *arg) | |||
606 | return ioctl_allocate(client, arg); | 619 | return ioctl_allocate(client, arg); |
607 | case FW_CDEV_IOC_SEND_RESPONSE: | 620 | case FW_CDEV_IOC_SEND_RESPONSE: |
608 | return ioctl_send_response(client, arg); | 621 | return ioctl_send_response(client, arg); |
622 | case FW_CDEV_IOC_INITIATE_BUS_RESET: | ||
623 | return ioctl_initiate_bus_reset(client, arg); | ||
609 | case FW_CDEV_IOC_CREATE_ISO_CONTEXT: | 624 | case FW_CDEV_IOC_CREATE_ISO_CONTEXT: |
610 | return ioctl_create_iso_context(client, arg); | 625 | return ioctl_create_iso_context(client, arg); |
611 | case FW_CDEV_IOC_QUEUE_ISO: | 626 | case FW_CDEV_IOC_QUEUE_ISO: |