diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 16:07:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 16:07:19 -0500 |
commit | 920841d8d1d61bc12b43f95a579a5374f6d98f81 (patch) | |
tree | 413be4ee2a75bb523d6e829ef0e52057f408222e /drivers/ieee1394/raw1394.c | |
parent | 5c56f466835d20fc4f7119063a8c029f7170a317 (diff) | |
parent | a65421ea3f8a0e78b4e3b858bdc5ada5ad653807 (diff) |
Merge branch 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
ieee1394: fix another deadlock in nodemgr
ieee1394: cycle timer read extension for raw1394
Diffstat (limited to 'drivers/ieee1394/raw1394.c')
-rw-r--r-- | drivers/ieee1394/raw1394.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index aa9ca8385ec7..bb897a37d9f7 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c | |||
@@ -2669,6 +2669,18 @@ static void raw1394_iso_shutdown(struct file_info *fi) | |||
2669 | fi->iso_state = RAW1394_ISO_INACTIVE; | 2669 | fi->iso_state = RAW1394_ISO_INACTIVE; |
2670 | } | 2670 | } |
2671 | 2671 | ||
2672 | static int raw1394_read_cycle_timer(struct file_info *fi, void __user * uaddr) | ||
2673 | { | ||
2674 | struct raw1394_cycle_timer ct; | ||
2675 | int err; | ||
2676 | |||
2677 | err = hpsb_read_cycle_timer(fi->host, &ct.cycle_timer, &ct.local_time); | ||
2678 | if (!err) | ||
2679 | if (copy_to_user(uaddr, &ct, sizeof(ct))) | ||
2680 | err = -EFAULT; | ||
2681 | return err; | ||
2682 | } | ||
2683 | |||
2672 | /* mmap the rawiso xmit/recv buffer */ | 2684 | /* mmap the rawiso xmit/recv buffer */ |
2673 | static int raw1394_mmap(struct file *file, struct vm_area_struct *vma) | 2685 | static int raw1394_mmap(struct file *file, struct vm_area_struct *vma) |
2674 | { | 2686 | { |
@@ -2777,6 +2789,14 @@ static int raw1394_ioctl(struct inode *inode, struct file *file, | |||
2777 | break; | 2789 | break; |
2778 | } | 2790 | } |
2779 | 2791 | ||
2792 | /* state-independent commands */ | ||
2793 | switch(cmd) { | ||
2794 | case RAW1394_IOC_GET_CYCLE_TIMER: | ||
2795 | return raw1394_read_cycle_timer(fi, argp); | ||
2796 | default: | ||
2797 | break; | ||
2798 | } | ||
2799 | |||
2780 | return -EINVAL; | 2800 | return -EINVAL; |
2781 | } | 2801 | } |
2782 | 2802 | ||