usbtest.c (11e4afb49b7fa1fc8e1ffd850c1806dd86a08204) | usbtest.c (c532b29a6f6d31e84a7c88f995eebdc75ebd4248) |
---|---|
1#include <linux/kernel.h> 2#include <linux/errno.h> 3#include <linux/init.h> 4#include <linux/slab.h> 5#include <linux/mm.h> 6#include <linux/module.h> 7#include <linux/moduleparam.h> 8#include <linux/scatterlist.h> --- 1534 unchanged lines hidden (view full) --- 1543 * WARNING: Because usbfs grabs udev->dev.sem before calling this ioctl(), 1544 * it locks out usbcore in certain code paths. Notably, if you disconnect 1545 * the device-under-test, khubd will wait block forever waiting for the 1546 * ioctl to complete ... so that usb_disconnect() can abort the pending 1547 * urbs and then call usbtest_disconnect(). To abort a test, you're best 1548 * off just killing the userspace task and waiting for it to exit. 1549 */ 1550 | 1#include <linux/kernel.h> 2#include <linux/errno.h> 3#include <linux/init.h> 4#include <linux/slab.h> 5#include <linux/mm.h> 6#include <linux/module.h> 7#include <linux/moduleparam.h> 8#include <linux/scatterlist.h> --- 1534 unchanged lines hidden (view full) --- 1543 * WARNING: Because usbfs grabs udev->dev.sem before calling this ioctl(), 1544 * it locks out usbcore in certain code paths. Notably, if you disconnect 1545 * the device-under-test, khubd will wait block forever waiting for the 1546 * ioctl to complete ... so that usb_disconnect() can abort the pending 1547 * urbs and then call usbtest_disconnect(). To abort a test, you're best 1548 * off just killing the userspace task and waiting for it to exit. 1549 */ 1550 |
1551/* No BKL needed */ |
|
1551static int 1552usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf) 1553{ 1554 struct usbtest_dev *dev = usb_get_intfdata (intf); 1555 struct usb_device *udev = testdev_to_usbdev (dev); 1556 struct usbtest_param *param = buf; 1557 int retval = -EOPNOTSUPP; 1558 struct urb *urb; --- 606 unchanged lines hidden (view full) --- 2165 { } 2166}; 2167MODULE_DEVICE_TABLE (usb, id_table); 2168 2169static struct usb_driver usbtest_driver = { 2170 .name = "usbtest", 2171 .id_table = id_table, 2172 .probe = usbtest_probe, | 1552static int 1553usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf) 1554{ 1555 struct usbtest_dev *dev = usb_get_intfdata (intf); 1556 struct usb_device *udev = testdev_to_usbdev (dev); 1557 struct usbtest_param *param = buf; 1558 int retval = -EOPNOTSUPP; 1559 struct urb *urb; --- 606 unchanged lines hidden (view full) --- 2166 { } 2167}; 2168MODULE_DEVICE_TABLE (usb, id_table); 2169 2170static struct usb_driver usbtest_driver = { 2171 .name = "usbtest", 2172 .id_table = id_table, 2173 .probe = usbtest_probe, |
2173 .ioctl = usbtest_ioctl, | 2174 .unlocked_ioctl = usbtest_ioctl, |
2174 .disconnect = usbtest_disconnect, 2175 .suspend = usbtest_suspend, 2176 .resume = usbtest_resume, 2177}; 2178 2179/*-------------------------------------------------------------------------*/ 2180 2181static int __init usbtest_init (void) --- 18 unchanged lines hidden --- | 2175 .disconnect = usbtest_disconnect, 2176 .suspend = usbtest_suspend, 2177 .resume = usbtest_resume, 2178}; 2179 2180/*-------------------------------------------------------------------------*/ 2181 2182static int __init usbtest_init (void) --- 18 unchanged lines hidden --- |