Skip to content

Commit

Permalink
USB: unkill cxacru atm driver
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Aug 22, 2007
1 parent 04cab13 commit 3b79cc2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/atm/cxacru.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,
int* actual_length)
{
struct timer_list timer;
int status = urb->status;

init_timer(&timer);
timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT);
Expand All @@ -468,7 +467,7 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,

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,
Expand Down

0 comments on commit 3b79cc2

Please sign in to comment.