Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61958
b: refs/heads/master
c: 64771a0
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jul 20, 2007
1 parent 42007f1 commit e28d7ad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 491c021e0beafe4146f6a1c9a1c58bd0fb2a42d0
refs/heads/master: 64771a0f19320f73ab4be69db591ba51a17d7748
28 changes: 15 additions & 13 deletions trunk/drivers/usb/misc/legousbtower.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,19 +742,20 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t
static void tower_interrupt_in_callback (struct urb *urb)
{
struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
int status = urb->status;
int retval;

dbg(4, "%s: enter, status %d", __FUNCTION__, urb->status);
dbg(4, "%s: enter, status %d", __FUNCTION__, status);

lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);

if (urb->status) {
if (urb->status == -ENOENT ||
urb->status == -ECONNRESET ||
urb->status == -ESHUTDOWN) {
if (status) {
if (status == -ENOENT ||
status == -ECONNRESET ||
status == -ESHUTDOWN) {
goto exit;
} else {
dbg(1, "%s: nonzero status received: %d", __FUNCTION__, urb->status);
dbg(1, "%s: nonzero status received: %d", __FUNCTION__, status);
goto resubmit; /* maybe we can recover */
}
}
Expand Down Expand Up @@ -788,7 +789,7 @@ static void tower_interrupt_in_callback (struct urb *urb)
wake_up_interruptible (&dev->read_wait);

lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
dbg(4, "%s: leave, status %d", __FUNCTION__, urb->status);
dbg(4, "%s: leave, status %d", __FUNCTION__, status);
}


Expand All @@ -798,23 +799,24 @@ static void tower_interrupt_in_callback (struct urb *urb)
static void tower_interrupt_out_callback (struct urb *urb)
{
struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
int status = urb->status;

dbg(4, "%s: enter, status %d", __FUNCTION__, urb->status);
dbg(4, "%s: enter, status %d", __FUNCTION__, status);
lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);

/* sync/async unlink faults aren't errors */
if (urb->status && !(urb->status == -ENOENT ||
urb->status == -ECONNRESET ||
urb->status == -ESHUTDOWN)) {
if (status && !(status == -ENOENT ||
status == -ECONNRESET ||
status == -ESHUTDOWN)) {
dbg(1, "%s - nonzero write bulk status received: %d",
__FUNCTION__, urb->status);
__FUNCTION__, status);
}

dev->interrupt_out_busy = 0;
wake_up_interruptible(&dev->write_wait);

lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
dbg(4, "%s: leave, status %d", __FUNCTION__, urb->status);
dbg(4, "%s: leave, status %d", __FUNCTION__, status);
}


Expand Down

0 comments on commit e28d7ad

Please sign in to comment.