diff options
author | Oliver Neukum <oneukum@suse.com> | 2016-09-13 10:44:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-13 11:24:24 -0400 |
commit | efbe27b3cf604effa77ab7e23a359e64fee06998 (patch) | |
tree | 9c0b06a7c37b86eb4987138bb503eb077eed5ea4 /drivers/usb/class | |
parent | 46e75075baec1f8c239faa74f2549400e1caaa2f (diff) |
cdc-acm: cleaning up debug in data submission path
Further cleanup making the debug messages more precise, useful
and removing mere trace points.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index faab151d9fdc..15ffe389b86f 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -415,8 +415,9 @@ static void acm_read_bulk_callback(struct urb *urb) | |||
415 | unsigned long flags; | 415 | unsigned long flags; |
416 | int status = urb->status; | 416 | int status = urb->status; |
417 | 417 | ||
418 | dev_vdbg(&acm->data->dev, "%s - urb %d, len %d\n", __func__, | 418 | dev_vdbg(&acm->data->dev, "got urb %d, len %d, status %d\n", |
419 | rb->index, urb->actual_length); | 419 | rb->index, urb->actual_length, |
420 | status); | ||
420 | 421 | ||
421 | if (!acm->dev) { | 422 | if (!acm->dev) { |
422 | set_bit(rb->index, &acm->read_urbs_free); | 423 | set_bit(rb->index, &acm->read_urbs_free); |
@@ -426,8 +427,6 @@ static void acm_read_bulk_callback(struct urb *urb) | |||
426 | 427 | ||
427 | if (status) { | 428 | if (status) { |
428 | set_bit(rb->index, &acm->read_urbs_free); | 429 | set_bit(rb->index, &acm->read_urbs_free); |
429 | dev_dbg(&acm->data->dev, "%s - non-zero urb status: %d\n", | ||
430 | __func__, status); | ||
431 | if ((status != -ENOENT) || (urb->actual_length == 0)) | 430 | if ((status != -ENOENT) || (urb->actual_length == 0)) |
432 | return; | 431 | return; |
433 | } | 432 | } |
@@ -462,8 +461,7 @@ static void acm_write_bulk(struct urb *urb) | |||
462 | int status = urb->status; | 461 | int status = urb->status; |
463 | 462 | ||
464 | if (status || (urb->actual_length != urb->transfer_buffer_length)) | 463 | if (status || (urb->actual_length != urb->transfer_buffer_length)) |
465 | dev_vdbg(&acm->data->dev, "%s - len %d/%d, status %d\n", | 464 | dev_vdbg(&acm->data->dev, "wrote len %d/%d, status %d\n", |
466 | __func__, | ||
467 | urb->actual_length, | 465 | urb->actual_length, |
468 | urb->transfer_buffer_length, | 466 | urb->transfer_buffer_length, |
469 | status); | 467 | status); |
@@ -478,8 +476,6 @@ static void acm_softint(struct work_struct *work) | |||
478 | { | 476 | { |
479 | struct acm *acm = container_of(work, struct acm, work); | 477 | struct acm *acm = container_of(work, struct acm, work); |
480 | 478 | ||
481 | dev_vdbg(&acm->data->dev, "%s\n", __func__); | ||
482 | |||
483 | tty_port_tty_wakeup(&acm->port); | 479 | tty_port_tty_wakeup(&acm->port); |
484 | } | 480 | } |
485 | 481 | ||
@@ -674,7 +670,7 @@ static int acm_tty_write(struct tty_struct *tty, | |||
674 | if (!count) | 670 | if (!count) |
675 | return 0; | 671 | return 0; |
676 | 672 | ||
677 | dev_vdbg(&acm->data->dev, "%s - count %d\n", __func__, count); | 673 | dev_vdbg(&acm->data->dev, "%d bytes from tty layer\n", count); |
678 | 674 | ||
679 | spin_lock_irqsave(&acm->write_lock, flags); | 675 | spin_lock_irqsave(&acm->write_lock, flags); |
680 | wbn = acm_wb_alloc(acm); | 676 | wbn = acm_wb_alloc(acm); |
@@ -691,7 +687,7 @@ static int acm_tty_write(struct tty_struct *tty, | |||
691 | } | 687 | } |
692 | 688 | ||
693 | count = (count > acm->writesize) ? acm->writesize : count; | 689 | count = (count > acm->writesize) ? acm->writesize : count; |
694 | dev_vdbg(&acm->data->dev, "%s - write %d\n", __func__, count); | 690 | dev_vdbg(&acm->data->dev, "writing %d bytes\n", count); |
695 | memcpy(wb->buf, buf, count); | 691 | memcpy(wb->buf, buf, count); |
696 | wb->len = count; | 692 | wb->len = count; |
697 | 693 | ||