From 72988874d56898b1954ae243ef78da51d91131b3 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 29 Feb 2012 23:04:32 +0100 Subject: [PATCH] --- yaml --- r: 289647 b: refs/heads/master c: 371f3b49f2cb1a8b6ac09b6b108841ca92349eb1 h: refs/heads/master i: 289645: 275d007c1833a51a30cffeda735d0d9f07e3f9fe 289643: ccf624e80cb453f99b85073ab15d1c7bd469fc86 289639: 0137f136d67832a9acc8c9227bd5420387b159d2 289631: ff0f06dc2b53830ccc5cbb36bf98b99bf75d1ccb v: v3 --- [refs] | 2 +- trunk/drivers/usb/core/urb.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 9aac75ac65f3..59e5cef665be 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2a5be8783e0016d15e7907ddd212b2c312e196eb +refs/heads/master: 371f3b49f2cb1a8b6ac09b6b108841ca92349eb1 diff --git a/trunk/drivers/usb/core/urb.c b/trunk/drivers/usb/core/urb.c index f4f20c7b7765..7239a73c1b8c 100644 --- a/trunk/drivers/usb/core/urb.c +++ b/trunk/drivers/usb/core/urb.c @@ -527,10 +527,13 @@ EXPORT_SYMBOL_GPL(usb_submit_urb); * a driver's I/O routines to insure that all URB-related activity has * completed before it returns. * - * This request is always asynchronous. Success is indicated by - * returning -EINPROGRESS, at which time the URB will probably not yet - * have been given back to the device driver. When it is eventually - * called, the completion function will see @urb->status == -ECONNRESET. + * This request is asynchronous, however the HCD might call the ->complete() + * callback during unlink. Therefore when drivers call usb_unlink_urb(), they + * must not hold any locks that may be taken by the completion function. + * Success is indicated by returning -EINPROGRESS, at which time the URB will + * probably not yet have been given back to the device driver. When it is + * eventually called, the completion function will see @urb->status == + * -ECONNRESET. * Failure is indicated by usb_unlink_urb() returning any other value. * Unlinking will fail when @urb is not currently "linked" (i.e., it was * never submitted, or it was unlinked before, or the hardware is already