Changeset 1d1bb0f in mainline for uspace/drv/uhci


Ignore:
Timestamp:
2011-06-19T13:38:37Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b72efe8
Parents:
adfdbd5 (diff), 9724d7f (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 from https://code.launchpad.net/~vojtech-horky/helenos/usb

Location:
uspace/drv/uhci
Files:
22 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci/Makefile

    radfdbd5 r1d1bb0f  
    3838        -I$(LIBDRV_PREFIX)/include
    3939
    40 BINARY = uhci_hcd
     40BINARY = uhci
    4141
    4242SOURCES = \
  • uspace/drv/uhci/batch.c

    radfdbd5 r1d1bb0f  
    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/*----------------------------------------------------------------------------*/
  • uspace/drv/uhci/hw_struct/transfer_descriptor.c

    radfdbd5 r1d1bb0f  
    103103        td_print_status(instance);
    104104        if (pid == USB_PID_SETUP) {
    105                 usb_log_debug("SETUP BUFFER: %s\n",
     105                usb_log_debug2("SETUP BUFFER: %s\n",
    106106                    usb_debug_str_buffer(buffer, 8, 8));
    107107        }
  • uspace/drv/uhci/iface.c

    radfdbd5 r1d1bb0f  
    6464        }
    6565
    66         usb_log_debug("%s %d:%d %zu(%zu).\n",
     66        usb_log_debug2("%s %d:%d %zu(%zu).\n",
    6767            name, target.address, target.endpoint, size, ep->max_packet_size);
    6868
     
    172172                speed = ep_speed;
    173173        }
    174         usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",
     174        usb_log_debug("Register endpoint %d:%d %s-%s %s %zuB %ums.\n",
    175175            address, endpoint, usb_str_transfer_type(transfer_type),
    176             usb_str_speed(speed), direction, size, max_packet_size, interval);
     176            usb_str_direction(direction), usb_str_speed(speed),
     177            max_packet_size, interval);
    177178
    178179        return usb_endpoint_manager_add_ep(&hc->ep_manager, address, endpoint,
     
    187188        hc_t *hc = fun_to_hc(fun);
    188189        assert(hc);
    189         usb_log_debug("Unregister endpoint %d:%d %d.\n",
    190             address, endpoint, direction);
     190        usb_log_debug("Unregister endpoint %d:%d %s.\n",
     191            address, endpoint, usb_str_direction(direction));
    191192        return usb_endpoint_manager_unregister_ep(&hc->ep_manager, address,
    192193            endpoint, direction);
  • uspace/drv/uhci/main.c

    radfdbd5 r1d1bb0f  
    4141#include "uhci.h"
    4242
    43 #define NAME "uhci_hcd"
     43#define NAME "uhci"
    4444
    4545static int uhci_add_device(ddf_dev_t *device);
  • uspace/drv/uhci/transfer_list.c

    radfdbd5 r1d1bb0f  
    141141        list_append(&batch->link, &instance->batch_list);
    142142
    143         usb_transfer_batch_t *first = list_get_instance(
    144             instance->batch_list.next, usb_transfer_batch_t, link);
    145         usb_log_debug("Batch(%p) added to queue %s, first is %p.\n",
    146                 batch, instance->name, first);
     143        usb_log_debug("Batch %p " USB_TRANSFER_BATCH_FMT " scheduled in queue %s.\n",
     144            batch, USB_TRANSFER_BATCH_ARGS(*batch), instance->name);
    147145        fibril_mutex_unlock(&instance->guard);
    148146}
     
    234232        /* Remove from the batch list */
    235233        list_remove(&batch->link);
    236         usb_log_debug("Batch(%p) removed (%s) from %s, next: %x.\n",
    237             batch, qpos, instance->name, batch_qh(batch)->next);
     234        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " removed (%s) "
     235            "from %s, next: %x.\n",
     236            batch, USB_TRANSFER_BATCH_ARGS(*batch),
     237            qpos, instance->name, batch_qh(batch)->next);
    238238}
    239239/**
Note: See TracChangeset for help on using the changeset viewer.