Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41641428 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: core: Don't wait for completion of urbs"

parents 704bfadb 90921094
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -514,15 +514,13 @@ EXPORT_SYMBOL_GPL(usb_sg_init);
 */
void usb_sg_wait(struct usb_sg_request *io)
{
	int i;
	int i, retval;
	int entries = io->entries;

	/* queue the urbs.  */
	spin_lock_irq(&io->lock);
	i = 0;
	while (i < entries && !io->status) {
		int retval;

		io->urbs[i]->dev = io->dev;
		spin_unlock_irq(&io->lock);

@@ -568,7 +566,13 @@ void usb_sg_wait(struct usb_sg_request *io)
	 * So could the submit loop above ... but it's easier to
	 * solve neither problem than to solve both!
	 */
	wait_for_completion(&io->complete);
	retval = wait_for_completion_timeout(&io->complete,
						msecs_to_jiffies(5000));
	if (retval == 0) {
		dev_err(&io->dev->dev, "%s, timed out while waiting for io_complete\n",
				__func__);
		usb_sg_cancel(io);
	}

	sg_clean(io);
}