[patch - regression]unkill cxacru atm driver

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.usb.devel
Organization SuSE Linux
Message-ID <[email protected]>
Hi Greg,

it seems like you overdid it a bit in your quest to clean up the
use of urb->status. In this driver you read it the first thing, which
means that you are in a race against URB completion you'll
usually lose, returning -EINPROGRESS. This kills the driver.

	Regards
		Oliver

Signed-off-by: Oliver Neukum <[email protected]>
---

--- a/drivers/usb/atm/cxacru.c	2007-08-14 14:58:14.000000000 +0200
+++ b/drivers/usb/atm/cxacru.c	2007-08-16 15:53:55.000000000 +0200
@@ -456,7 +456,6 @@ static int cxacru_start_wait_urb(struct 
 				 int* actual_length)
 {
 	struct timer_list timer;
-	int status = urb->status;
 
 	init_timer(&timer);
 	timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT);
@@ -468,7 +467,7 @@ static int cxacru_start_wait_urb(struct 
 
 	if (actual_length)
 		*actual_length = urb->actual_length;
-	return status;
+	return urb->status; /* must read status after completion */
 }
 
 static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.