Changeset f1fae414 in mainline for uspace/drv/bus/usb/uhci/batch.c


Ignore:
Timestamp:
2011-06-22T01:34:53Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d7e82c1, cac458f
Parents:
72ec8cc (diff), bf172825 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/batch.c

    r72ec8cc rf1fae414  
    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.