[PATCH v2] USB: usb-skeleton.c: fix blocked forever in skel_read

2013-03-20 Thread Du Xing
From: Du Xing duxing2...@gmail.com In skel_read,the reader blocked in wait_for_completion before submit bulk in urb. Using processed_urb is for retaining the completion in the case that previous interruptible wait in skel_read was interrupted and complete before next skel_read. Replacing

Re: [PATCH] USB: usb-skeleton.c: fix blocked forever in skel_read

2013-03-18 Thread Du Xing
From: Du Xing duxing2...@gmail.com In skel_read,the reader blocked in wait_for_completion before submit bulk in urb. Using processed_urb is for retaining the completion in the case that previous interruptible wait in skel_read was interrupted and complete before next skel_read. Replacing

Re: [PATCH] USB: usb-skeleton.c: fix blocked forever in skel_read

2013-03-16 Thread Du Xing
&dev->io_mutex); spin_lock_init(&dev->err_lock); init_usb_anchor(&dev->submitted); - init_completion(&dev->bulk_in_completion); + init_waitqueue_head(&dev->bulk_in_wait); dev->udev = usb_get_dev(interface_to_usbdev(interface)); dev->interface = interface; --- Du Xing Thanks -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] USB: usb-skeleton.c: fix blocked forever in skel_read

2013-03-14 Thread Du Xing
etion); - dev->bulk_in_copied = 0; - dev->processed_urb = 1; - } + spin_unlock_irq(&dev->err_lock); /* errors must be reported */ rv = dev->errors; --- Du Xing -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] USB: usb-skeleton.c: fix blocked forever in skel_read

2013-03-13 Thread Du Xing
From: Du Xing duxing2...@gmail.com In skel_read,the reader blocked in wait_for_completion before submit bulk in urb. Using processed_urb is totally unnecessary, remove it can fix the bug. --- Signed-off-by: Du Xing duxing2...@gmail.com --- diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb