diff options
Diffstat (limited to 'drivers/isdn/gigaset')
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 84 | ||||
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 3 | ||||
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 12 |
3 files changed, 58 insertions, 41 deletions
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index af7648274b38..0302c40a27ea 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
@@ -248,12 +248,12 @@ static inline void dump_urb(enum debuglevel level, const char *tag, | |||
248 | if (urb) { | 248 | if (urb) { |
249 | gig_dbg(level, | 249 | gig_dbg(level, |
250 | " dev=0x%08lx, pipe=%s:EP%d/DV%d:%s, " | 250 | " dev=0x%08lx, pipe=%s:EP%d/DV%d:%s, " |
251 | "status=%d, hcpriv=0x%08lx, transfer_flags=0x%x,", | 251 | "hcpriv=0x%08lx, transfer_flags=0x%x,", |
252 | (unsigned long) urb->dev, | 252 | (unsigned long) urb->dev, |
253 | usb_pipetype_str(urb->pipe), | 253 | usb_pipetype_str(urb->pipe), |
254 | usb_pipeendpoint(urb->pipe), usb_pipedevice(urb->pipe), | 254 | usb_pipeendpoint(urb->pipe), usb_pipedevice(urb->pipe), |
255 | usb_pipein(urb->pipe) ? "in" : "out", | 255 | usb_pipein(urb->pipe) ? "in" : "out", |
256 | urb->status, (unsigned long) urb->hcpriv, | 256 | (unsigned long) urb->hcpriv, |
257 | urb->transfer_flags); | 257 | urb->transfer_flags); |
258 | gig_dbg(level, | 258 | gig_dbg(level, |
259 | " transfer_buffer=0x%08lx[%d], actual_length=%d, " | 259 | " transfer_buffer=0x%08lx[%d], actual_length=%d, " |
@@ -459,6 +459,7 @@ static void read_ctrl_callback(struct urb *urb) | |||
459 | struct inbuf_t *inbuf = urb->context; | 459 | struct inbuf_t *inbuf = urb->context; |
460 | struct cardstate *cs = inbuf->cs; | 460 | struct cardstate *cs = inbuf->cs; |
461 | struct bas_cardstate *ucs = cs->hw.bas; | 461 | struct bas_cardstate *ucs = cs->hw.bas; |
462 | int status = urb->status; | ||
462 | int have_data = 0; | 463 | int have_data = 0; |
463 | unsigned numbytes; | 464 | unsigned numbytes; |
464 | int rc; | 465 | int rc; |
@@ -472,7 +473,7 @@ static void read_ctrl_callback(struct urb *urb) | |||
472 | 473 | ||
473 | del_timer(&ucs->timer_cmd_in); | 474 | del_timer(&ucs->timer_cmd_in); |
474 | 475 | ||
475 | switch (urb->status) { | 476 | switch (status) { |
476 | case 0: /* normal completion */ | 477 | case 0: /* normal completion */ |
477 | numbytes = urb->actual_length; | 478 | numbytes = urb->actual_length; |
478 | if (unlikely(numbytes != ucs->rcvbuf_size)) { | 479 | if (unlikely(numbytes != ucs->rcvbuf_size)) { |
@@ -506,12 +507,12 @@ static void read_ctrl_callback(struct urb *urb) | |||
506 | case -ESHUTDOWN: /* device shut down */ | 507 | case -ESHUTDOWN: /* device shut down */ |
507 | /* no action necessary */ | 508 | /* no action necessary */ |
508 | gig_dbg(DEBUG_USBREQ, "%s: %s", | 509 | gig_dbg(DEBUG_USBREQ, "%s: %s", |
509 | __func__, get_usb_statmsg(urb->status)); | 510 | __func__, get_usb_statmsg(status)); |
510 | break; | 511 | break; |
511 | 512 | ||
512 | default: /* severe trouble */ | 513 | default: /* severe trouble */ |
513 | dev_warn(cs->dev, "control read: %s\n", | 514 | dev_warn(cs->dev, "control read: %s\n", |
514 | get_usb_statmsg(urb->status)); | 515 | get_usb_statmsg(status)); |
515 | if (ucs->retry_cmd_in++ < BAS_RETRY) { | 516 | if (ucs->retry_cmd_in++ < BAS_RETRY) { |
516 | dev_notice(cs->dev, "control read: retry %d\n", | 517 | dev_notice(cs->dev, "control read: retry %d\n", |
517 | ucs->retry_cmd_in); | 518 | ucs->retry_cmd_in); |
@@ -601,12 +602,13 @@ static void read_int_callback(struct urb *urb) | |||
601 | struct cardstate *cs = urb->context; | 602 | struct cardstate *cs = urb->context; |
602 | struct bas_cardstate *ucs = cs->hw.bas; | 603 | struct bas_cardstate *ucs = cs->hw.bas; |
603 | struct bc_state *bcs; | 604 | struct bc_state *bcs; |
605 | int status = urb->status; | ||
604 | unsigned long flags; | 606 | unsigned long flags; |
605 | int rc; | 607 | int rc; |
606 | unsigned l; | 608 | unsigned l; |
607 | int channel; | 609 | int channel; |
608 | 610 | ||
609 | switch (urb->status) { | 611 | switch (status) { |
610 | case 0: /* success */ | 612 | case 0: /* success */ |
611 | break; | 613 | break; |
612 | case -ENOENT: /* cancelled */ | 614 | case -ENOENT: /* cancelled */ |
@@ -614,7 +616,7 @@ static void read_int_callback(struct urb *urb) | |||
614 | case -EINPROGRESS: /* pending */ | 616 | case -EINPROGRESS: /* pending */ |
615 | /* ignore silently */ | 617 | /* ignore silently */ |
616 | gig_dbg(DEBUG_USBREQ, "%s: %s", | 618 | gig_dbg(DEBUG_USBREQ, "%s: %s", |
617 | __func__, get_usb_statmsg(urb->status)); | 619 | __func__, get_usb_statmsg(status)); |
618 | return; | 620 | return; |
619 | case -ENODEV: /* device removed */ | 621 | case -ENODEV: /* device removed */ |
620 | case -ESHUTDOWN: /* device shut down */ | 622 | case -ESHUTDOWN: /* device shut down */ |
@@ -623,7 +625,7 @@ static void read_int_callback(struct urb *urb) | |||
623 | return; | 625 | return; |
624 | default: /* severe trouble */ | 626 | default: /* severe trouble */ |
625 | dev_warn(cs->dev, "interrupt read: %s\n", | 627 | dev_warn(cs->dev, "interrupt read: %s\n", |
626 | get_usb_statmsg(urb->status)); | 628 | get_usb_statmsg(status)); |
627 | //FIXME corrective action? resubmission always ok? | 629 | //FIXME corrective action? resubmission always ok? |
628 | goto resubmit; | 630 | goto resubmit; |
629 | } | 631 | } |
@@ -766,17 +768,18 @@ static void read_iso_callback(struct urb *urb) | |||
766 | { | 768 | { |
767 | struct bc_state *bcs; | 769 | struct bc_state *bcs; |
768 | struct bas_bc_state *ubc; | 770 | struct bas_bc_state *ubc; |
771 | int status = urb->status; | ||
769 | unsigned long flags; | 772 | unsigned long flags; |
770 | int i, rc; | 773 | int i, rc; |
771 | 774 | ||
772 | /* status codes not worth bothering the tasklet with */ | 775 | /* status codes not worth bothering the tasklet with */ |
773 | if (unlikely(urb->status == -ENOENT || | 776 | if (unlikely(status == -ENOENT || |
774 | urb->status == -ECONNRESET || | 777 | status == -ECONNRESET || |
775 | urb->status == -EINPROGRESS || | 778 | status == -EINPROGRESS || |
776 | urb->status == -ENODEV || | 779 | status == -ENODEV || |
777 | urb->status == -ESHUTDOWN)) { | 780 | status == -ESHUTDOWN)) { |
778 | gig_dbg(DEBUG_ISO, "%s: %s", | 781 | gig_dbg(DEBUG_ISO, "%s: %s", |
779 | __func__, get_usb_statmsg(urb->status)); | 782 | __func__, get_usb_statmsg(status)); |
780 | return; | 783 | return; |
781 | } | 784 | } |
782 | 785 | ||
@@ -787,10 +790,11 @@ static void read_iso_callback(struct urb *urb) | |||
787 | if (likely(ubc->isoindone == NULL)) { | 790 | if (likely(ubc->isoindone == NULL)) { |
788 | /* pass URB to tasklet */ | 791 | /* pass URB to tasklet */ |
789 | ubc->isoindone = urb; | 792 | ubc->isoindone = urb; |
793 | ubc->isoinstatus = status; | ||
790 | tasklet_schedule(&ubc->rcvd_tasklet); | 794 | tasklet_schedule(&ubc->rcvd_tasklet); |
791 | } else { | 795 | } else { |
792 | /* tasklet still busy, drop data and resubmit URB */ | 796 | /* tasklet still busy, drop data and resubmit URB */ |
793 | ubc->loststatus = urb->status; | 797 | ubc->loststatus = status; |
794 | for (i = 0; i < BAS_NUMFRAMES; i++) { | 798 | for (i = 0; i < BAS_NUMFRAMES; i++) { |
795 | ubc->isoinlost += urb->iso_frame_desc[i].actual_length; | 799 | ubc->isoinlost += urb->iso_frame_desc[i].actual_length; |
796 | if (unlikely(urb->iso_frame_desc[i].status != 0 && | 800 | if (unlikely(urb->iso_frame_desc[i].status != 0 && |
@@ -831,22 +835,24 @@ static void write_iso_callback(struct urb *urb) | |||
831 | { | 835 | { |
832 | struct isow_urbctx_t *ucx; | 836 | struct isow_urbctx_t *ucx; |
833 | struct bas_bc_state *ubc; | 837 | struct bas_bc_state *ubc; |
838 | int status = urb->status; | ||
834 | unsigned long flags; | 839 | unsigned long flags; |
835 | 840 | ||
836 | /* status codes not worth bothering the tasklet with */ | 841 | /* status codes not worth bothering the tasklet with */ |
837 | if (unlikely(urb->status == -ENOENT || | 842 | if (unlikely(status == -ENOENT || |
838 | urb->status == -ECONNRESET || | 843 | status == -ECONNRESET || |
839 | urb->status == -EINPROGRESS || | 844 | status == -EINPROGRESS || |
840 | urb->status == -ENODEV || | 845 | status == -ENODEV || |
841 | urb->status == -ESHUTDOWN)) { | 846 | status == -ESHUTDOWN)) { |
842 | gig_dbg(DEBUG_ISO, "%s: %s", | 847 | gig_dbg(DEBUG_ISO, "%s: %s", |
843 | __func__, get_usb_statmsg(urb->status)); | 848 | __func__, get_usb_statmsg(status)); |
844 | return; | 849 | return; |
845 | } | 850 | } |
846 | 851 | ||
847 | /* pass URB context to tasklet */ | 852 | /* pass URB context to tasklet */ |
848 | ucx = urb->context; | 853 | ucx = urb->context; |
849 | ubc = ucx->bcs->hw.bas; | 854 | ubc = ucx->bcs->hw.bas; |
855 | ucx->status = status; | ||
850 | 856 | ||
851 | spin_lock_irqsave(&ubc->isooutlock, flags); | 857 | spin_lock_irqsave(&ubc->isooutlock, flags); |
852 | ubc->isooutovfl = ubc->isooutdone; | 858 | ubc->isooutovfl = ubc->isooutdone; |
@@ -1070,6 +1076,7 @@ static void write_iso_tasklet(unsigned long data) | |||
1070 | struct cardstate *cs = bcs->cs; | 1076 | struct cardstate *cs = bcs->cs; |
1071 | struct isow_urbctx_t *done, *next, *ovfl; | 1077 | struct isow_urbctx_t *done, *next, *ovfl; |
1072 | struct urb *urb; | 1078 | struct urb *urb; |
1079 | int status; | ||
1073 | struct usb_iso_packet_descriptor *ifd; | 1080 | struct usb_iso_packet_descriptor *ifd; |
1074 | int offset; | 1081 | int offset; |
1075 | unsigned long flags; | 1082 | unsigned long flags; |
@@ -1126,7 +1133,8 @@ static void write_iso_tasklet(unsigned long data) | |||
1126 | 1133 | ||
1127 | /* process completed URB */ | 1134 | /* process completed URB */ |
1128 | urb = done->urb; | 1135 | urb = done->urb; |
1129 | switch (urb->status) { | 1136 | status = done->status; |
1137 | switch (status) { | ||
1130 | case -EXDEV: /* partial completion */ | 1138 | case -EXDEV: /* partial completion */ |
1131 | gig_dbg(DEBUG_ISO, "%s: URB partially completed", | 1139 | gig_dbg(DEBUG_ISO, "%s: URB partially completed", |
1132 | __func__); | 1140 | __func__); |
@@ -1179,7 +1187,7 @@ static void write_iso_tasklet(unsigned long data) | |||
1179 | break; | 1187 | break; |
1180 | default: /* severe trouble */ | 1188 | default: /* severe trouble */ |
1181 | dev_warn(cs->dev, "isochronous write: %s\n", | 1189 | dev_warn(cs->dev, "isochronous write: %s\n", |
1182 | get_usb_statmsg(urb->status)); | 1190 | get_usb_statmsg(status)); |
1183 | } | 1191 | } |
1184 | 1192 | ||
1185 | /* mark the write buffer area covered by this URB as free */ | 1193 | /* mark the write buffer area covered by this URB as free */ |
@@ -1233,6 +1241,7 @@ static void read_iso_tasklet(unsigned long data) | |||
1233 | struct bas_bc_state *ubc = bcs->hw.bas; | 1241 | struct bas_bc_state *ubc = bcs->hw.bas; |
1234 | struct cardstate *cs = bcs->cs; | 1242 | struct cardstate *cs = bcs->cs; |
1235 | struct urb *urb; | 1243 | struct urb *urb; |
1244 | int status; | ||
1236 | char *rcvbuf; | 1245 | char *rcvbuf; |
1237 | unsigned long flags; | 1246 | unsigned long flags; |
1238 | int totleft, numbytes, offset, frame, rc; | 1247 | int totleft, numbytes, offset, frame, rc; |
@@ -1245,6 +1254,7 @@ static void read_iso_tasklet(unsigned long data) | |||
1245 | spin_unlock_irqrestore(&ubc->isoinlock, flags); | 1254 | spin_unlock_irqrestore(&ubc->isoinlock, flags); |
1246 | return; | 1255 | return; |
1247 | } | 1256 | } |
1257 | status = ubc->isoinstatus; | ||
1248 | ubc->isoindone = NULL; | 1258 | ubc->isoindone = NULL; |
1249 | if (unlikely(ubc->loststatus != -EINPROGRESS)) { | 1259 | if (unlikely(ubc->loststatus != -EINPROGRESS)) { |
1250 | dev_warn(cs->dev, | 1260 | dev_warn(cs->dev, |
@@ -1260,11 +1270,11 @@ static void read_iso_tasklet(unsigned long data) | |||
1260 | gig_dbg(DEBUG_ISO, | 1270 | gig_dbg(DEBUG_ISO, |
1261 | "%s: channel not running, " | 1271 | "%s: channel not running, " |
1262 | "dropped URB with status: %s", | 1272 | "dropped URB with status: %s", |
1263 | __func__, get_usb_statmsg(urb->status)); | 1273 | __func__, get_usb_statmsg(status)); |
1264 | return; | 1274 | return; |
1265 | } | 1275 | } |
1266 | 1276 | ||
1267 | switch (urb->status) { | 1277 | switch (status) { |
1268 | case 0: /* normal completion */ | 1278 | case 0: /* normal completion */ |
1269 | break; | 1279 | break; |
1270 | case -EXDEV: /* inspect individual frames | 1280 | case -EXDEV: /* inspect individual frames |
@@ -1276,7 +1286,7 @@ static void read_iso_tasklet(unsigned long data) | |||
1276 | case -ECONNRESET: | 1286 | case -ECONNRESET: |
1277 | case -EINPROGRESS: | 1287 | case -EINPROGRESS: |
1278 | gig_dbg(DEBUG_ISO, "%s: %s", | 1288 | gig_dbg(DEBUG_ISO, "%s: %s", |
1279 | __func__, get_usb_statmsg(urb->status)); | 1289 | __func__, get_usb_statmsg(status)); |
1280 | continue; /* -> skip */ | 1290 | continue; /* -> skip */ |
1281 | case -EPIPE: | 1291 | case -EPIPE: |
1282 | dev_err(cs->dev, "isochronous read stalled\n"); | 1292 | dev_err(cs->dev, "isochronous read stalled\n"); |
@@ -1284,7 +1294,7 @@ static void read_iso_tasklet(unsigned long data) | |||
1284 | continue; /* -> skip */ | 1294 | continue; /* -> skip */ |
1285 | default: /* severe trouble */ | 1295 | default: /* severe trouble */ |
1286 | dev_warn(cs->dev, "isochronous read: %s\n", | 1296 | dev_warn(cs->dev, "isochronous read: %s\n", |
1287 | get_usb_statmsg(urb->status)); | 1297 | get_usb_statmsg(status)); |
1288 | goto error; | 1298 | goto error; |
1289 | } | 1299 | } |
1290 | 1300 | ||
@@ -1418,11 +1428,12 @@ static void req_timeout(unsigned long data) | |||
1418 | static void write_ctrl_callback(struct urb *urb) | 1428 | static void write_ctrl_callback(struct urb *urb) |
1419 | { | 1429 | { |
1420 | struct bas_cardstate *ucs = urb->context; | 1430 | struct bas_cardstate *ucs = urb->context; |
1431 | int status = urb->status; | ||
1421 | int rc; | 1432 | int rc; |
1422 | unsigned long flags; | 1433 | unsigned long flags; |
1423 | 1434 | ||
1424 | /* check status */ | 1435 | /* check status */ |
1425 | switch (urb->status) { | 1436 | switch (status) { |
1426 | case 0: /* normal completion */ | 1437 | case 0: /* normal completion */ |
1427 | spin_lock_irqsave(&ucs->lock, flags); | 1438 | spin_lock_irqsave(&ucs->lock, flags); |
1428 | switch (ucs->pending) { | 1439 | switch (ucs->pending) { |
@@ -1441,7 +1452,7 @@ static void write_ctrl_callback(struct urb *urb) | |||
1441 | case -ESHUTDOWN: /* device shut down */ | 1452 | case -ESHUTDOWN: /* device shut down */ |
1442 | /* ignore silently */ | 1453 | /* ignore silently */ |
1443 | gig_dbg(DEBUG_USBREQ, "%s: %s", | 1454 | gig_dbg(DEBUG_USBREQ, "%s: %s", |
1444 | __func__, get_usb_statmsg(urb->status)); | 1455 | __func__, get_usb_statmsg(status)); |
1445 | break; | 1456 | break; |
1446 | 1457 | ||
1447 | default: /* any failure */ | 1458 | default: /* any failure */ |
@@ -1449,12 +1460,12 @@ static void write_ctrl_callback(struct urb *urb) | |||
1449 | dev_err(&ucs->interface->dev, | 1460 | dev_err(&ucs->interface->dev, |
1450 | "control request 0x%02x failed: %s\n", | 1461 | "control request 0x%02x failed: %s\n", |
1451 | ucs->dr_ctrl.bRequest, | 1462 | ucs->dr_ctrl.bRequest, |
1452 | get_usb_statmsg(urb->status)); | 1463 | get_usb_statmsg(status)); |
1453 | break; /* give up */ | 1464 | break; /* give up */ |
1454 | } | 1465 | } |
1455 | dev_notice(&ucs->interface->dev, | 1466 | dev_notice(&ucs->interface->dev, |
1456 | "control request 0x%02x: %s, retry %d\n", | 1467 | "control request 0x%02x: %s, retry %d\n", |
1457 | ucs->dr_ctrl.bRequest, get_usb_statmsg(urb->status), | 1468 | ucs->dr_ctrl.bRequest, get_usb_statmsg(status), |
1458 | ucs->retry_ctrl); | 1469 | ucs->retry_ctrl); |
1459 | /* urb->dev is clobbered by USB subsystem */ | 1470 | /* urb->dev is clobbered by USB subsystem */ |
1460 | urb->dev = ucs->udev; | 1471 | urb->dev = ucs->udev; |
@@ -1665,12 +1676,13 @@ static void write_command_callback(struct urb *urb) | |||
1665 | { | 1676 | { |
1666 | struct cardstate *cs = urb->context; | 1677 | struct cardstate *cs = urb->context; |
1667 | struct bas_cardstate *ucs = cs->hw.bas; | 1678 | struct bas_cardstate *ucs = cs->hw.bas; |
1679 | int status = urb->status; | ||
1668 | unsigned long flags; | 1680 | unsigned long flags; |
1669 | 1681 | ||
1670 | update_basstate(ucs, 0, BS_ATWRPEND); | 1682 | update_basstate(ucs, 0, BS_ATWRPEND); |
1671 | 1683 | ||
1672 | /* check status */ | 1684 | /* check status */ |
1673 | switch (urb->status) { | 1685 | switch (status) { |
1674 | case 0: /* normal completion */ | 1686 | case 0: /* normal completion */ |
1675 | break; | 1687 | break; |
1676 | case -ENOENT: /* cancelled */ | 1688 | case -ENOENT: /* cancelled */ |
@@ -1680,14 +1692,14 @@ static void write_command_callback(struct urb *urb) | |||
1680 | case -ESHUTDOWN: /* device shut down */ | 1692 | case -ESHUTDOWN: /* device shut down */ |
1681 | /* ignore silently */ | 1693 | /* ignore silently */ |
1682 | gig_dbg(DEBUG_USBREQ, "%s: %s", | 1694 | gig_dbg(DEBUG_USBREQ, "%s: %s", |
1683 | __func__, get_usb_statmsg(urb->status)); | 1695 | __func__, get_usb_statmsg(status)); |
1684 | return; | 1696 | return; |
1685 | default: /* any failure */ | 1697 | default: /* any failure */ |
1686 | if (++ucs->retry_cmd_out > BAS_RETRY) { | 1698 | if (++ucs->retry_cmd_out > BAS_RETRY) { |
1687 | dev_warn(cs->dev, | 1699 | dev_warn(cs->dev, |
1688 | "command write: %s, " | 1700 | "command write: %s, " |
1689 | "giving up after %d retries\n", | 1701 | "giving up after %d retries\n", |
1690 | get_usb_statmsg(urb->status), | 1702 | get_usb_statmsg(status), |
1691 | ucs->retry_cmd_out); | 1703 | ucs->retry_cmd_out); |
1692 | break; | 1704 | break; |
1693 | } | 1705 | } |
@@ -1695,11 +1707,11 @@ static void write_command_callback(struct urb *urb) | |||
1695 | dev_warn(cs->dev, | 1707 | dev_warn(cs->dev, |
1696 | "command write: %s, " | 1708 | "command write: %s, " |
1697 | "cannot retry - cmdbuf gone\n", | 1709 | "cannot retry - cmdbuf gone\n", |
1698 | get_usb_statmsg(urb->status)); | 1710 | get_usb_statmsg(status)); |
1699 | break; | 1711 | break; |
1700 | } | 1712 | } |
1701 | dev_notice(cs->dev, "command write: %s, retry %d\n", | 1713 | dev_notice(cs->dev, "command write: %s, retry %d\n", |
1702 | get_usb_statmsg(urb->status), ucs->retry_cmd_out); | 1714 | get_usb_statmsg(status), ucs->retry_cmd_out); |
1703 | if (atwrite_submit(cs, cs->cmdbuf->buf, cs->cmdbuf->len) >= 0) | 1715 | if (atwrite_submit(cs, cs->cmdbuf->buf, cs->cmdbuf->len) >= 0) |
1704 | /* resubmitted - bypass regular exit block */ | 1716 | /* resubmitted - bypass regular exit block */ |
1705 | return; | 1717 | return; |
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 02bdaf22d7ea..c67b5f97c133 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h | |||
@@ -350,11 +350,13 @@ struct isowbuf_t { | |||
350 | * - urb: pointer to the URB itself | 350 | * - urb: pointer to the URB itself |
351 | * - bcs: pointer to the B Channel control structure | 351 | * - bcs: pointer to the B Channel control structure |
352 | * - limit: end of write buffer area covered by this URB | 352 | * - limit: end of write buffer area covered by this URB |
353 | * - status: URB completion status | ||
353 | */ | 354 | */ |
354 | struct isow_urbctx_t { | 355 | struct isow_urbctx_t { |
355 | struct urb *urb; | 356 | struct urb *urb; |
356 | struct bc_state *bcs; | 357 | struct bc_state *bcs; |
357 | int limit; | 358 | int limit; |
359 | int status; | ||
358 | }; | 360 | }; |
359 | 361 | ||
360 | /* AT state structure | 362 | /* AT state structure |
@@ -574,6 +576,7 @@ struct bas_bc_state { | |||
574 | struct urb *isoinurbs[BAS_INURBS]; | 576 | struct urb *isoinurbs[BAS_INURBS]; |
575 | unsigned char isoinbuf[BAS_INBUFSIZE * BAS_INURBS]; | 577 | unsigned char isoinbuf[BAS_INBUFSIZE * BAS_INURBS]; |
576 | struct urb *isoindone; /* completed isoc read URB */ | 578 | struct urb *isoindone; /* completed isoc read URB */ |
579 | int isoinstatus; /* status of completed URB */ | ||
577 | int loststatus; /* status of dropped URB */ | 580 | int loststatus; /* status of dropped URB */ |
578 | unsigned isoinlost; /* number of bytes lost */ | 581 | unsigned isoinlost; /* number of bytes lost */ |
579 | /* state of bit unstuffing algorithm | 582 | /* state of bit unstuffing algorithm |
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index ca4bee173cfb..0bd5d4ba11cd 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c | |||
@@ -361,13 +361,14 @@ static void gigaset_read_int_callback(struct urb *urb) | |||
361 | { | 361 | { |
362 | struct inbuf_t *inbuf = urb->context; | 362 | struct inbuf_t *inbuf = urb->context; |
363 | struct cardstate *cs = inbuf->cs; | 363 | struct cardstate *cs = inbuf->cs; |
364 | int status = urb->status; | ||
364 | int resubmit = 0; | 365 | int resubmit = 0; |
365 | int r; | 366 | int r; |
366 | unsigned numbytes; | 367 | unsigned numbytes; |
367 | unsigned char *src; | 368 | unsigned char *src; |
368 | unsigned long flags; | 369 | unsigned long flags; |
369 | 370 | ||
370 | if (!urb->status) { | 371 | if (!status) { |
371 | if (!cs->connected) { | 372 | if (!cs->connected) { |
372 | err("%s: disconnected", __func__); /* should never happen */ | 373 | err("%s: disconnected", __func__); /* should never happen */ |
373 | return; | 374 | return; |
@@ -393,8 +394,8 @@ static void gigaset_read_int_callback(struct urb *urb) | |||
393 | } else { | 394 | } else { |
394 | /* The urb might have been killed. */ | 395 | /* The urb might have been killed. */ |
395 | gig_dbg(DEBUG_ANY, "%s - nonzero read bulk status received: %d", | 396 | gig_dbg(DEBUG_ANY, "%s - nonzero read bulk status received: %d", |
396 | __func__, urb->status); | 397 | __func__, status); |
397 | if (urb->status != -ENOENT) { /* not killed */ | 398 | if (status != -ENOENT) { /* not killed */ |
398 | if (!cs->connected) { | 399 | if (!cs->connected) { |
399 | err("%s: disconnected", __func__); /* should never happen */ | 400 | err("%s: disconnected", __func__); /* should never happen */ |
400 | return; | 401 | return; |
@@ -418,11 +419,12 @@ static void gigaset_read_int_callback(struct urb *urb) | |||
418 | static void gigaset_write_bulk_callback(struct urb *urb) | 419 | static void gigaset_write_bulk_callback(struct urb *urb) |
419 | { | 420 | { |
420 | struct cardstate *cs = urb->context; | 421 | struct cardstate *cs = urb->context; |
422 | int status = urb->status; | ||
421 | unsigned long flags; | 423 | unsigned long flags; |
422 | 424 | ||
423 | if (urb->status) | 425 | if (status) |
424 | dev_err(cs->dev, "bulk transfer failed (status %d)\n", | 426 | dev_err(cs->dev, "bulk transfer failed (status %d)\n", |
425 | -urb->status); | 427 | -status); |
426 | /* That's all we can do. Communication problems | 428 | /* That's all we can do. Communication problems |
427 | are handled by timeouts or network protocols. */ | 429 | are handled by timeouts or network protocols. */ |
428 | 430 | ||