aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/st5481_b.c
diff options
context:
space:
mode:
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 2fcd093921d8..0a2536d62402 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)
172 test_and_clear_bit(buf_nr, &b_out->busy); 172 test_and_clear_bit(buf_nr, &b_out->busy);
173 173
174 if (unlikely(urb->status < 0)) { 174 if (unlikely(urb->status < 0)) {
175 if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) { 175 switch (urb->status) {
176 WARN("urb status %d",urb->status); 176 case -ENOENT:
177 if (b_out->busy == 0) { 177 case -ESHUTDOWN:
178 st5481_usb_pipe_reset(adapter, (bcs->channel+1)*2 | USB_DIR_OUT, NULL, NULL); 178 case -ECONNRESET:
179 } 179 DBG(4,"urb killed status %d", urb->status);
180 } else { 180 return; // Give up
181 DBG(1,"urb killed"); 181 default:
182 return; // Give up 182 WARN("urb status %d",urb->status);
183 if (b_out->busy == 0) {
184 st5481_usb_pipe_reset(adapter, (bcs->channel+1)*2 | USB_DIR_OUT, NULL, NULL);
185 }
186 break;
183 } 187 }
184 } 188 }
185 189
@@ -205,7 +209,9 @@ static void st5481B_mode(struct st5481_bcs *bcs, int mode)
205 bcs->mode = mode; 209 bcs->mode = mode;
206 210
207 // Cancel all USB transfers on this B channel 211 // Cancel all USB transfers on this B channel
212 b_out->urb[0]->transfer_flags |= URB_ASYNC_UNLINK;
208 usb_unlink_urb(b_out->urb[0]); 213 usb_unlink_urb(b_out->urb[0]);
214 b_out->urb[1]->transfer_flags |= URB_ASYNC_UNLINK;
209 usb_unlink_urb(b_out->urb[1]); 215 usb_unlink_urb(b_out->urb[1]);
210 b_out->busy = 0; 216 b_out->busy = 0;
211 217