Changeset c4fb5ecd in mainline for uspace/drv/uhci_hcd/batch.c


Ignore:
Timestamp:
2011-06-18T19:18:41Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
497b6f31
Parents:
84eb7432
Message:

Less logging in USB host controller drivers

Many of the debug messages were degraded to debug2 level or
completely removed. Also added formatting string for unified
dump of USB transfer batches.

Warnings in EHCI stub use debug level now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci_hcd/batch.c

    r84eb7432 rc4fb5ecd  
    147147            + sizeof(qh_t);
    148148        void *data_buffer = setup + setup_size;
    149         usb_target_t target =
    150             { .address = ep->address, .endpoint = ep->endpoint };
    151149        usb_transfer_batch_init(instance, ep, buffer, data_buffer, buffer_size,
    152150            setup, setup_size, func_in, func_out, arg, fun,
     
    154152
    155153        memcpy(instance->setup_buffer, setup_buffer, setup_size);
    156         usb_log_debug("Batch(%p) %d:%d memory structures ready.\n",
    157             instance, target.address, target.endpoint);
     154        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT
     155            " memory structures ready.\n", instance,
     156            USB_TRANSFER_BATCH_ARGS(*instance));
    158157        return instance;
    159158}
     
    205204        return true;
    206205}
     206
     207#define LOG_BATCH_INITIALIZED(batch, name) \
     208        usb_log_debug2("Batch %p %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
     209            (batch), (name), USB_TRANSFER_BATCH_ARGS(*(batch)))
     210
    207211/*----------------------------------------------------------------------------*/
    208212/** Prepares control write transfer.
     
    219223        batch_control(instance, USB_PID_OUT, USB_PID_IN);
    220224        instance->next_step = usb_transfer_batch_call_out_and_dispose;
    221         usb_log_debug("Batch(%p) CONTROL WRITE initialized.\n", instance);
     225        LOG_BATCH_INITIALIZED(instance, "control write");
    222226}
    223227/*----------------------------------------------------------------------------*/
     
    233237        batch_control(instance, USB_PID_IN, USB_PID_OUT);
    234238        instance->next_step = usb_transfer_batch_call_in_and_dispose;
    235         usb_log_debug("Batch(%p) CONTROL READ initialized.\n", instance);
     239        LOG_BATCH_INITIALIZED(instance, "control read");
    236240}
    237241/*----------------------------------------------------------------------------*/
     
    247251        batch_data(instance, USB_PID_IN);
    248252        instance->next_step = usb_transfer_batch_call_in_and_dispose;
    249         usb_log_debug("Batch(%p) INTERRUPT IN initialized.\n", instance);
     253        LOG_BATCH_INITIALIZED(instance, "interrupt in");
    250254}
    251255/*----------------------------------------------------------------------------*/
     
    263267        batch_data(instance, USB_PID_OUT);
    264268        instance->next_step = usb_transfer_batch_call_out_and_dispose;
    265         usb_log_debug("Batch(%p) INTERRUPT OUT initialized.\n", instance);
     269        LOG_BATCH_INITIALIZED(instance, "interrupt out");
    266270}
    267271/*----------------------------------------------------------------------------*/
     
    277281        batch_data(instance, USB_PID_IN);
    278282        instance->next_step = usb_transfer_batch_call_in_and_dispose;
    279         usb_log_debug("Batch(%p) BULK IN initialized.\n", instance);
     283        LOG_BATCH_INITIALIZED(instance, "bulk in");
    280284}
    281285/*----------------------------------------------------------------------------*/
     
    293297        batch_data(instance, USB_PID_OUT);
    294298        instance->next_step = usb_transfer_batch_call_out_and_dispose;
    295         usb_log_debug("Batch(%p) BULK OUT initialized.\n", instance);
     299        LOG_BATCH_INITIALIZED(instance, "bulk out");
    296300}
    297301/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.