aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/devio.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 62679bc031fb..0b387c1a8b7e 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1824,6 +1824,20 @@ static int proc_release_port(struct dev_state *ps, void __user *arg)
1824 return usb_hub_release_port(ps->dev, portnum, ps); 1824 return usb_hub_release_port(ps->dev, portnum, ps);
1825} 1825}
1826 1826
1827static int proc_get_capabilities(struct dev_state *ps, void __user *arg)
1828{
1829 __u32 caps;
1830
1831 caps = USBDEVFS_CAP_ZERO_PACKET | USBDEVFS_CAP_NO_PACKET_SIZE_LIM;
1832 if (!ps->dev->bus->no_stop_on_short)
1833 caps |= USBDEVFS_CAP_BULK_CONTINUATION;
1834
1835 if (put_user(caps, (__u32 __user *)arg))
1836 return -EFAULT;
1837
1838 return 0;
1839}
1840
1827/* 1841/*
1828 * NOTE: All requests here that have interface numbers as parameters 1842 * NOTE: All requests here that have interface numbers as parameters
1829 * are assuming that somehow the configuration has been prevented from 1843 * are assuming that somehow the configuration has been prevented from
@@ -1994,6 +2008,9 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
1994 snoop(&dev->dev, "%s: RELEASE_PORT\n", __func__); 2008 snoop(&dev->dev, "%s: RELEASE_PORT\n", __func__);
1995 ret = proc_release_port(ps, p); 2009 ret = proc_release_port(ps, p);
1996 break; 2010 break;
2011 case USBDEVFS_GET_CAPABILITIES:
2012 ret = proc_get_capabilities(ps, p);
2013 break;
1997 } 2014 }
1998 usb_unlock_device(dev); 2015 usb_unlock_device(dev);
1999 if (ret >= 0) 2016 if (ret >= 0)