aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/st5481_d.c
diff options
context:
space:
mode:
authorKarsten Keil <kkeil@suse.de>2005-09-17 17:52:42 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-17 18:34:30 -0400
commit61ffcafafb3d985e1ab8463be0187b421614775c (patch)
tree0a40902d91a5db72c5fd5d71aa4e1bb625a4faca /drivers/isdn/hisax/st5481_d.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_d.c')
-rw-r--r--drivers/isdn/hisax/st5481_d.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c
index 071b1d31999f..941f7022ada1 100644
--- a/drivers/isdn/hisax/st5481_d.c
+++ b/drivers/isdn/hisax/st5481_d.c
@@ -382,16 +382,20 @@ static void usb_d_out_complete(struct urb *urb, struct pt_regs *regs)
382 test_and_clear_bit(buf_nr, &d_out->busy); 382 test_and_clear_bit(buf_nr, &d_out->busy);
383 383
384 if (unlikely(urb->status < 0)) { 384 if (unlikely(urb->status < 0)) {
385 if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) { 385 switch (urb->status) {
386 WARN("urb status %d",urb->status); 386 case -ENOENT:
387 if (d_out->busy == 0) { 387 case -ESHUTDOWN:
388 st5481_usb_pipe_reset(adapter, EP_D_OUT | USB_DIR_OUT, fifo_reseted, adapter); 388 case -ECONNRESET:
389 } 389 DBG(1,"urb killed status %d", urb->status);
390 return; 390 break;
391 } else { 391 default:
392 DBG(1,"urb killed"); 392 WARN("urb status %d",urb->status);
393 return; // Give up 393 if (d_out->busy == 0) {
394 st5481_usb_pipe_reset(adapter, EP_D_OUT | USB_DIR_OUT, fifo_reseted, adapter);
395 }
396 break;
394 } 397 }
398 return; // Give up
395 } 399 }
396 400
397 FsmEvent(&adapter->d_out.fsm, EV_DOUT_COMPLETE, (void *) buf_nr); 401 FsmEvent(&adapter->d_out.fsm, EV_DOUT_COMPLETE, (void *) buf_nr);
@@ -709,14 +713,14 @@ int st5481_setup_d(struct st5481_adapter *adapter)
709 713
710 adapter->l1m.fsm = &l1fsm; 714 adapter->l1m.fsm = &l1fsm;
711 adapter->l1m.state = ST_L1_F3; 715 adapter->l1m.state = ST_L1_F3;
712 adapter->l1m.debug = 1; 716 adapter->l1m.debug = st5481_debug & 0x100;
713 adapter->l1m.userdata = adapter; 717 adapter->l1m.userdata = adapter;
714 adapter->l1m.printdebug = l1m_debug; 718 adapter->l1m.printdebug = l1m_debug;
715 FsmInitTimer(&adapter->l1m, &adapter->timer); 719 FsmInitTimer(&adapter->l1m, &adapter->timer);
716 720
717 adapter->d_out.fsm.fsm = &dout_fsm; 721 adapter->d_out.fsm.fsm = &dout_fsm;
718 adapter->d_out.fsm.state = ST_DOUT_NONE; 722 adapter->d_out.fsm.state = ST_DOUT_NONE;
719 adapter->d_out.fsm.debug = 1; 723 adapter->d_out.fsm.debug = st5481_debug & 0x100;
720 adapter->d_out.fsm.userdata = adapter; 724 adapter->d_out.fsm.userdata = adapter;
721 adapter->d_out.fsm.printdebug = dout_debug; 725 adapter->d_out.fsm.printdebug = dout_debug;
722 726