diff options
Diffstat (limited to 'drivers/isdn/gigaset/bas-gigaset.c')
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 3913f47ef86d..afa080258bfa 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
@@ -410,10 +410,10 @@ static void check_pending(struct bas_cardstate *ucs) | |||
410 | if (!(ucs->basstate & BS_RESETTING)) | 410 | if (!(ucs->basstate & BS_RESETTING)) |
411 | ucs->pending = 0; | 411 | ucs->pending = 0; |
412 | break; | 412 | break; |
413 | /* | 413 | /* |
414 | * HD_READ_ATMESSAGE and HD_WRITE_ATMESSAGE are handled separately | 414 | * HD_READ_ATMESSAGE and HD_WRITE_ATMESSAGE are handled separately |
415 | * and should never end up here | 415 | * and should never end up here |
416 | */ | 416 | */ |
417 | default: | 417 | default: |
418 | dev_warn(&ucs->interface->dev, | 418 | dev_warn(&ucs->interface->dev, |
419 | "unknown pending request 0x%02x cleared\n", | 419 | "unknown pending request 0x%02x cleared\n", |
@@ -491,7 +491,7 @@ static void read_ctrl_callback(struct urb *urb) | |||
491 | numbytes = urb->actual_length; | 491 | numbytes = urb->actual_length; |
492 | if (unlikely(numbytes != ucs->rcvbuf_size)) { | 492 | if (unlikely(numbytes != ucs->rcvbuf_size)) { |
493 | dev_warn(cs->dev, | 493 | dev_warn(cs->dev, |
494 | "control read: received %d chars, expected %d\n", | 494 | "control read: received %d chars, expected %d\n", |
495 | numbytes, ucs->rcvbuf_size); | 495 | numbytes, ucs->rcvbuf_size); |
496 | if (numbytes > ucs->rcvbuf_size) | 496 | if (numbytes > ucs->rcvbuf_size) |
497 | numbytes = ucs->rcvbuf_size; | 497 | numbytes = ucs->rcvbuf_size; |
@@ -710,7 +710,7 @@ static void read_int_callback(struct urb *urb) | |||
710 | } | 710 | } |
711 | 711 | ||
712 | l = (unsigned) ucs->int_in_buf[1] + | 712 | l = (unsigned) ucs->int_in_buf[1] + |
713 | (((unsigned) ucs->int_in_buf[2]) << 8); | 713 | (((unsigned) ucs->int_in_buf[2]) << 8); |
714 | 714 | ||
715 | gig_dbg(DEBUG_USBREQ, "<-------%d: 0x%02x (%u [0x%02x 0x%02x])", | 715 | gig_dbg(DEBUG_USBREQ, "<-------%d: 0x%02x (%u [0x%02x 0x%02x])", |
716 | urb->actual_length, (int)ucs->int_in_buf[0], l, | 716 | urb->actual_length, (int)ucs->int_in_buf[0], l, |
@@ -770,14 +770,14 @@ static void read_int_callback(struct urb *urb) | |||
770 | case HD_RECEIVEATDATA_ACK: /* AT response ready to be received */ | 770 | case HD_RECEIVEATDATA_ACK: /* AT response ready to be received */ |
771 | if (!l) { | 771 | if (!l) { |
772 | dev_warn(cs->dev, | 772 | dev_warn(cs->dev, |
773 | "HD_RECEIVEATDATA_ACK with length 0 ignored\n"); | 773 | "HD_RECEIVEATDATA_ACK with length 0 ignored\n"); |
774 | break; | 774 | break; |
775 | } | 775 | } |
776 | spin_lock_irqsave(&cs->lock, flags); | 776 | spin_lock_irqsave(&cs->lock, flags); |
777 | if (ucs->basstate & BS_ATRDPEND) { | 777 | if (ucs->basstate & BS_ATRDPEND) { |
778 | spin_unlock_irqrestore(&cs->lock, flags); | 778 | spin_unlock_irqrestore(&cs->lock, flags); |
779 | dev_warn(cs->dev, | 779 | dev_warn(cs->dev, |
780 | "HD_RECEIVEATDATA_ACK(%d) during HD_READ_ATMESSAGE(%d) ignored\n", | 780 | "HD_RECEIVEATDATA_ACK(%d) during HD_READ_ATMESSAGE(%d) ignored\n", |
781 | l, ucs->rcvbuf_size); | 781 | l, ucs->rcvbuf_size); |
782 | break; | 782 | break; |
783 | } | 783 | } |
@@ -878,7 +878,7 @@ static void read_iso_callback(struct urb *urb) | |||
878 | ubc->isoinlost += urb->iso_frame_desc[i].actual_length; | 878 | ubc->isoinlost += urb->iso_frame_desc[i].actual_length; |
879 | if (unlikely(urb->iso_frame_desc[i].status != 0 && | 879 | if (unlikely(urb->iso_frame_desc[i].status != 0 && |
880 | urb->iso_frame_desc[i].status != | 880 | urb->iso_frame_desc[i].status != |
881 | -EINPROGRESS)) | 881 | -EINPROGRESS)) |
882 | ubc->loststatus = urb->iso_frame_desc[i].status; | 882 | ubc->loststatus = urb->iso_frame_desc[i].status; |
883 | urb->iso_frame_desc[i].status = 0; | 883 | urb->iso_frame_desc[i].status = 0; |
884 | urb->iso_frame_desc[i].actual_length = 0; | 884 | urb->iso_frame_desc[i].actual_length = 0; |
@@ -891,7 +891,7 @@ static void read_iso_callback(struct urb *urb) | |||
891 | rc = usb_submit_urb(urb, GFP_ATOMIC); | 891 | rc = usb_submit_urb(urb, GFP_ATOMIC); |
892 | if (unlikely(rc != 0 && rc != -ENODEV)) { | 892 | if (unlikely(rc != 0 && rc != -ENODEV)) { |
893 | dev_err(bcs->cs->dev, | 893 | dev_err(bcs->cs->dev, |
894 | "could not resubmit isoc read URB: %s\n", | 894 | "could not resubmit isoc read URB: %s\n", |
895 | get_usb_rcmsg(rc)); | 895 | get_usb_rcmsg(rc)); |
896 | dump_urb(DEBUG_ISO, "isoc read", urb); | 896 | dump_urb(DEBUG_ISO, "isoc read", urb); |
897 | error_hangup(bcs); | 897 | error_hangup(bcs); |
@@ -1017,17 +1017,17 @@ static int starturbs(struct bc_state *bcs) | |||
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | /* keep one URB free, submit the others */ | 1019 | /* keep one URB free, submit the others */ |
1020 | for (k = 0; k < BAS_OUTURBS-1; ++k) { | 1020 | for (k = 0; k < BAS_OUTURBS - 1; ++k) { |
1021 | dump_urb(DEBUG_ISO, "Initial isoc write", urb); | 1021 | dump_urb(DEBUG_ISO, "Initial isoc write", urb); |
1022 | rc = usb_submit_urb(ubc->isoouturbs[k].urb, GFP_ATOMIC); | 1022 | rc = usb_submit_urb(ubc->isoouturbs[k].urb, GFP_ATOMIC); |
1023 | if (rc != 0) | 1023 | if (rc != 0) |
1024 | goto error; | 1024 | goto error; |
1025 | } | 1025 | } |
1026 | dump_urb(DEBUG_ISO, "Initial isoc write (free)", urb); | 1026 | dump_urb(DEBUG_ISO, "Initial isoc write (free)", urb); |
1027 | ubc->isooutfree = &ubc->isoouturbs[BAS_OUTURBS-1]; | 1027 | ubc->isooutfree = &ubc->isoouturbs[BAS_OUTURBS - 1]; |
1028 | ubc->isooutdone = ubc->isooutovfl = NULL; | 1028 | ubc->isooutdone = ubc->isooutovfl = NULL; |
1029 | return 0; | 1029 | return 0; |
1030 | error: | 1030 | error: |
1031 | stopurbs(ubc); | 1031 | stopurbs(ubc); |
1032 | return rc; | 1032 | return rc; |
1033 | } | 1033 | } |
@@ -1229,7 +1229,7 @@ static void write_iso_tasklet(unsigned long data) | |||
1229 | if (ifd->status || | 1229 | if (ifd->status || |
1230 | ifd->actual_length != ifd->length) { | 1230 | ifd->actual_length != ifd->length) { |
1231 | dev_warn(cs->dev, | 1231 | dev_warn(cs->dev, |
1232 | "isoc write: frame %d[%d/%d]: %s\n", | 1232 | "isoc write: frame %d[%d/%d]: %s\n", |
1233 | i, ifd->actual_length, | 1233 | i, ifd->actual_length, |
1234 | ifd->length, | 1234 | ifd->length, |
1235 | get_usb_statmsg(ifd->status)); | 1235 | get_usb_statmsg(ifd->status)); |
@@ -1316,7 +1316,7 @@ static void read_iso_tasklet(unsigned long data) | |||
1316 | ubc->isoindone = NULL; | 1316 | ubc->isoindone = NULL; |
1317 | if (unlikely(ubc->loststatus != -EINPROGRESS)) { | 1317 | if (unlikely(ubc->loststatus != -EINPROGRESS)) { |
1318 | dev_warn(cs->dev, | 1318 | dev_warn(cs->dev, |
1319 | "isoc read overrun, URB dropped (status: %s, %d bytes)\n", | 1319 | "isoc read overrun, URB dropped (status: %s, %d bytes)\n", |
1320 | get_usb_statmsg(ubc->loststatus), | 1320 | get_usb_statmsg(ubc->loststatus), |
1321 | ubc->isoinlost); | 1321 | ubc->isoinlost); |
1322 | ubc->loststatus = -EINPROGRESS; | 1322 | ubc->loststatus = -EINPROGRESS; |
@@ -1965,7 +1965,7 @@ static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb) | |||
1965 | int rc; | 1965 | int rc; |
1966 | 1966 | ||
1967 | gigaset_dbg_buffer(cs->mstate != MS_LOCKED ? | 1967 | gigaset_dbg_buffer(cs->mstate != MS_LOCKED ? |
1968 | DEBUG_TRANSCMD : DEBUG_LOCKCMD, | 1968 | DEBUG_TRANSCMD : DEBUG_LOCKCMD, |
1969 | "CMD Transmit", cb->len, cb->buf); | 1969 | "CMD Transmit", cb->len, cb->buf); |
1970 | 1970 | ||
1971 | /* translate "+++" escape sequence sent as a single separate command | 1971 | /* translate "+++" escape sequence sent as a single separate command |
@@ -2453,13 +2453,13 @@ static int gigaset_suspend(struct usb_interface *intf, pm_message_t message) | |||
2453 | 2453 | ||
2454 | /* wait a bit for blocking conditions to go away */ | 2454 | /* wait a bit for blocking conditions to go away */ |
2455 | rc = wait_event_timeout(ucs->waitqueue, | 2455 | rc = wait_event_timeout(ucs->waitqueue, |
2456 | !(ucs->basstate & | 2456 | !(ucs->basstate & |
2457 | (BS_B1OPEN|BS_B2OPEN|BS_ATRDPEND|BS_ATWRPEND)), | 2457 | (BS_B1OPEN | BS_B2OPEN | BS_ATRDPEND | BS_ATWRPEND)), |
2458 | BAS_TIMEOUT*HZ/10); | 2458 | BAS_TIMEOUT * HZ / 10); |
2459 | gig_dbg(DEBUG_SUSPEND, "wait_event_timeout() -> %d", rc); | 2459 | gig_dbg(DEBUG_SUSPEND, "wait_event_timeout() -> %d", rc); |
2460 | 2460 | ||
2461 | /* check for conditions preventing suspend */ | 2461 | /* check for conditions preventing suspend */ |
2462 | if (ucs->basstate & (BS_B1OPEN|BS_B2OPEN|BS_ATRDPEND|BS_ATWRPEND)) { | 2462 | if (ucs->basstate & (BS_B1OPEN | BS_B2OPEN | BS_ATRDPEND | BS_ATWRPEND)) { |
2463 | dev_warn(cs->dev, "cannot suspend:\n"); | 2463 | dev_warn(cs->dev, "cannot suspend:\n"); |
2464 | if (ucs->basstate & BS_B1OPEN) | 2464 | if (ucs->basstate & BS_B1OPEN) |
2465 | dev_warn(cs->dev, " B channel 1 open\n"); | 2465 | dev_warn(cs->dev, " B channel 1 open\n"); |
@@ -2482,7 +2482,7 @@ static int gigaset_suspend(struct usb_interface *intf, pm_message_t message) | |||
2482 | return rc; | 2482 | return rc; |
2483 | } | 2483 | } |
2484 | wait_event_timeout(ucs->waitqueue, !ucs->pending, | 2484 | wait_event_timeout(ucs->waitqueue, !ucs->pending, |
2485 | BAS_TIMEOUT*HZ/10); | 2485 | BAS_TIMEOUT * HZ / 10); |
2486 | /* in case of timeout, proceed anyway */ | 2486 | /* in case of timeout, proceed anyway */ |
2487 | } | 2487 | } |
2488 | 2488 | ||