Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136008
b: refs/heads/master
c: 33580a3
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Mar 24, 2009
1 parent df3422d commit b2b2a0b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ec3c0269d7196118cc7c403654ca5f19ef4d584
refs/heads/master: 33580a3ef5ba3bc0ee1b520df82a24bb37ce28f0
10 changes: 10 additions & 0 deletions trunk/drivers/firewire/fw-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
10 changes: 10 additions & 0 deletions trunk/include/linux/firewire-cdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ union fw_cdev_event {
#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE _IOW('#', 0x0e, struct fw_cdev_deallocate)
#define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x0f, struct fw_cdev_allocate_iso_resource)
#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x10, struct fw_cdev_allocate_iso_resource)
#define FW_CDEV_IOC_GET_SPEED _IOR('#', 0x11, struct fw_cdev_get_speed)

/* FW_CDEV_VERSION History
*
Expand Down Expand Up @@ -575,4 +576,13 @@ struct fw_cdev_allocate_iso_resource {
__u32 handle;
};

/**
* struct fw_cdev_get_speed - Query maximum speed to or from this device
* @max_speed: Speed code; minimum of the device's link speed, the local node's
* link speed, and all PHY port speeds between the two links
*/
struct fw_cdev_get_speed {
__u32 max_speed;
};

#endif /* _LINUX_FIREWIRE_CDEV_H */

0 comments on commit b2b2a0b

Please sign in to comment.