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
This commit is contained in:
Linus Torvalds
2007-02-19 13:07:19 -08:00
6 changed files with 80 additions and 1 deletions

View File

@@ -2669,6 +2669,18 @@ static void raw1394_iso_shutdown(struct file_info *fi)
fi->iso_state = RAW1394_ISO_INACTIVE;
}
static int raw1394_read_cycle_timer(struct file_info *fi, void __user * uaddr)
{
struct raw1394_cycle_timer ct;
int err;
err = hpsb_read_cycle_timer(fi->host, &ct.cycle_timer, &ct.local_time);
if (!err)
if (copy_to_user(uaddr, &ct, sizeof(ct)))
err = -EFAULT;
return err;
}
/* mmap the rawiso xmit/recv buffer */
static int raw1394_mmap(struct file *file, struct vm_area_struct *vma)
{
@@ -2777,6 +2789,14 @@ static int raw1394_ioctl(struct inode *inode, struct file *file,
break;
}
/* state-independent commands */
switch(cmd) {
case RAW1394_IOC_GET_CYCLE_TIMER:
return raw1394_read_cycle_timer(fi, argp);
default:
break;
}
return -EINVAL;
}