Changeset 6ef69e9 in mainline for uspace/drv/bus/usb/ehci/ehci_batch.c


Ignore:
Timestamp:
2015-06-30T04:51:38Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c4ba645d
Parents:
26d6f73
Message:

ehci,batch: consolidate debug messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_batch.c

    r26d6f73 r6ef69e9  
    3838#include <mem.h>
    3939#include <stdbool.h>
     40#include <str_error.h>
    4041
    4142#include <usb/usb.h>
     
    159160        batch_setup[usb_batch->ep->transfer_type](ehci_batch, dir);
    160161
     162        usb_log_debug("Batch %p %s " USB_TRANSFER_BATCH_FMT " initialized.\n",
     163            usb_batch, usb_str_direction(dir),
     164            USB_TRANSFER_BATCH_ARGS(*usb_batch));
     165
    161166        return ehci_batch;
    162167dispose:
     
    222227                            -= td_remain_size(ehci_batch->tds[i]);
    223228                } else {
    224                         usb_log_debug("Batch %p found error TD(%zu):%08x.\n",
     229                        usb_log_debug("Batch %p found error TD(%zu):%08x (%d).\n",
    225230                            ehci_batch->usb_batch, i,
    226                             ehci_batch->tds[i]->status);
     231                            ehci_batch->tds[i]->status,
     232                            ehci_batch->usb_batch->error);
    227233                        /* Clear possible ED HALT */
    228234                        qh_clear_halt(ehci_batch->qh);
     
    236242        ehci_batch->qh->next = LINK_POINTER_TERM;
    237243        ehci_batch->qh->current = LINK_POINTER_TERM;
    238         usb_log_debug("Batch %p complete.\n", ehci_batch->usb_batch);
     244        usb_log_debug("Batch %p complete: %s", ehci_batch->usb_batch,
     245            str_error(ehci_batch->usb_batch->error));
    239246
    240247        return true;
     
    321328            ehci_batch->tds[td_current]->next,
    322329            ehci_batch->tds[td_current]->alternate);
    323 
    324         usb_log_debug(
    325             "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
    326             ehci_batch->usb_batch,
    327             usb_str_transfer_type(ehci_batch->usb_batch->ep->transfer_type),
    328             usb_str_direction(dir),
    329             USB_TRANSFER_BATCH_ARGS(*ehci_batch->usb_batch));
    330330}
    331331
     
    344344        assert(dir == USB_DIRECTION_IN || dir == USB_DIRECTION_OUT);
    345345
    346         usb_log_debug("Control QH(%"PRIxn"): %08x:%08x:%08x:%08x:%08x:%08x",
     346        usb_log_debug2("Control QH(%"PRIxn"): %08x:%08x:%08x:%08x:%08x:%08x",
    347347            addr_to_phys(ehci_batch->qh),
    348348            ehci_batch->qh->ep_char, ehci_batch->qh->ep_cap,
     
    374374                ++td_current;
    375375        }
    376 
    377         usb_log_debug(
    378             "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized",
    379             ehci_batch->usb_batch,
    380             usb_str_transfer_type(ehci_batch->usb_batch->ep->transfer_type),
    381             usb_str_direction(dir),
    382             USB_TRANSFER_BATCH_ARGS(*ehci_batch->usb_batch));
    383376}
    384377
Note: See TracChangeset for help on using the changeset viewer.