summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/st5481_b.c
diff options
context:
space:
mode:
authorKarsten Keil <kkeil@suse.de>2005-09-17 23:52:42 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-17 15:34:30 -0700
commit61ffcafafb3d985e1ab8463be0187b421614775c (patch)
tree0a40902d91a5db72c5fd5d71aa4e1bb625a4faca /drivers/isdn/hisax/st5481_b.c
parent27b2f6792f3b482e4636818c7efaf4c43fef32a3 (diff)
[PATCH] Fix ST 5481 USB driver
The old driver was not fully adapted to new USB ABI and does not work. Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/hisax/st5481_b.c')
-rw-r--r--drivers/isdn/hisax/st5481_b.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c
index 2fcd093921d..0a2536d6240 100644
--- a/drivers/isdn/hisax/st5481_b.c
+++ b/drivers/isdn/hisax/st5481_b.c
@@ -172,14 +172,18 @@ static void usb_b_out_complete(struct urb *urb, struct pt_regs *regs)
test_and_clear_bit(buf_nr, &b_out->busy);
if (unlikely(urb->status < 0)) {
- if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) {
- WARN("urb status %d",urb->status);
- if (b_out->busy == 0) {
- st5481_usb_pipe_reset(adapter, (bcs->channel+1)*2 | USB_DIR_OUT, NULL, NULL);
- }
- } else {
- DBG(1,"urb killed");
- return; // Give up
+ switch (urb->status) {
+ case -ENOENT:
+ case -ESHUTDOWN:
+ case -ECONNRESET:
+ DBG(4,"urb killed status %d", urb->status);
+ return; // Give up
+ default:
+ WARN("urb status %d",urb->status);
+ if (b_out->busy == 0) {
+ st5481_usb_pipe_reset(adapter, (bcs->channel+1)*2 | USB_DIR_OUT, NULL, NULL);
+ }
+ break;
}
}
@@ -205,7 +209,9 @@ static void st5481B_mode(struct st5481_bcs *bcs, int mode)
bcs->mode = mode;
// Cancel all USB transfers on this B channel
+ b_out->urb[0]->transfer_flags |= URB_ASYNC_UNLINK;
usb_unlink_urb(b_out->urb[0]);
+ b_out->urb[1]->transfer_flags |= URB_ASYNC_UNLINK;
usb_unlink_urb(b_out->urb[1]);
b_out->busy = 0;