aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/misc/legousbtower.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index 2ed0daea894c..561970b889a5 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -742,19 +742,20 @@ exit:
742static void tower_interrupt_in_callback (struct urb *urb) 742static void tower_interrupt_in_callback (struct urb *urb)
743{ 743{
744 struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context; 744 struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
745 int status = urb->status;
745 int retval; 746 int retval;
746 747
747 dbg(4, "%s: enter, status %d", __FUNCTION__, urb->status); 748 dbg(4, "%s: enter, status %d", __FUNCTION__, status);
748 749
749 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer); 750 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
750 751
751 if (urb->status) { 752 if (status) {
752 if (urb->status == -ENOENT || 753 if (status == -ENOENT ||
753 urb->status == -ECONNRESET || 754 status == -ECONNRESET ||
754 urb->status == -ESHUTDOWN) { 755 status == -ESHUTDOWN) {
755 goto exit; 756 goto exit;
756 } else { 757 } else {
757 dbg(1, "%s: nonzero status received: %d", __FUNCTION__, urb->status); 758 dbg(1, "%s: nonzero status received: %d", __FUNCTION__, status);
758 goto resubmit; /* maybe we can recover */ 759 goto resubmit; /* maybe we can recover */
759 } 760 }
760 } 761 }
@@ -788,7 +789,7 @@ exit:
788 wake_up_interruptible (&dev->read_wait); 789 wake_up_interruptible (&dev->read_wait);
789 790
790 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer); 791 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
791 dbg(4, "%s: leave, status %d", __FUNCTION__, urb->status); 792 dbg(4, "%s: leave, status %d", __FUNCTION__, status);
792} 793}
793 794
794 795
@@ -798,23 +799,24 @@ exit:
798static void tower_interrupt_out_callback (struct urb *urb) 799static void tower_interrupt_out_callback (struct urb *urb)
799{ 800{
800 struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context; 801 struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
802 int status = urb->status;
801 803
802 dbg(4, "%s: enter, status %d", __FUNCTION__, urb->status); 804 dbg(4, "%s: enter, status %d", __FUNCTION__, status);
803 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer); 805 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
804 806
805 /* sync/async unlink faults aren't errors */ 807 /* sync/async unlink faults aren't errors */
806 if (urb->status && !(urb->status == -ENOENT || 808 if (status && !(status == -ENOENT ||
807 urb->status == -ECONNRESET || 809 status == -ECONNRESET ||
808 urb->status == -ESHUTDOWN)) { 810 status == -ESHUTDOWN)) {
809 dbg(1, "%s - nonzero write bulk status received: %d", 811 dbg(1, "%s - nonzero write bulk status received: %d",
810 __FUNCTION__, urb->status); 812 __FUNCTION__, status);
811 } 813 }
812 814
813 dev->interrupt_out_busy = 0; 815 dev->interrupt_out_busy = 0;
814 wake_up_interruptible(&dev->write_wait); 816 wake_up_interruptible(&dev->write_wait);
815 817
816 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer); 818 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
817 dbg(4, "%s: leave, status %d", __FUNCTION__, urb->status); 819 dbg(4, "%s: leave, status %d", __FUNCTION__, status);
818} 820}
819 821
820 822