diff options
author | Karsten Keil <kkeil@suse.de> | 2005-09-17 17:52:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-17 18:34:30 -0400 |
commit | 61ffcafafb3d985e1ab8463be0187b421614775c (patch) | |
tree | 0a40902d91a5db72c5fd5d71aa4e1bb625a4faca /drivers/isdn/hisax/st5481_b.c | |
parent | 27b2f6792f3b482e4636818c7efaf4c43fef32a3 (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.c | 22 |
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 | ||