Changes in / [fa9b606:10096231] in mainline


Ignore:
Files:
2 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    rfa9b606 r10096231  
    547547
    548548% Launch (devman) test drivers
    549 ! [CONFIG_DEBUG=y] CONFIG_TEST_DRIVERS (n/y)
    550 
     549! [CONFIG_DEBUG=y] CONFIG_TEST_DRIVERS (y/n)
     550
  • uspace/app/virtusbkbd/virtusbkbd.c

    rfa9b606 r10096231  
    202202int main(int argc, char * argv[])
    203203{
    204         printf("Dump of report descriptor (%zu bytes):\n", report_descriptor_size);
     204        printf("Dump of report descriptor (%u bytes):\n", report_descriptor_size);
    205205        size_t i;
    206206        for (i = 0; i < report_descriptor_size; i++) {
  • uspace/drv/root/root.c

    rfa9b606 r10096231  
    8787
    8888        int res = child_device_register_wrapper(parent, VIRTUAL_DEVICE_NAME,
    89             VIRTUAL_DEVICE_MATCH_ID, VIRTUAL_DEVICE_MATCH_SCORE,
    90             NULL);
     89            VIRTUAL_DEVICE_MATCH_ID, VIRTUAL_DEVICE_MATCH_SCORE);
    9190
    9291        return res;
     
    105104       
    106105        int res = child_device_register_wrapper(parent, PLATFORM_DEVICE_NAME,
    107             PLATFORM_DEVICE_MATCH_ID, PLATFORM_DEVICE_MATCH_SCORE,
    108             NULL);
     106            PLATFORM_DEVICE_MATCH_ID, PLATFORM_DEVICE_MATCH_SCORE);
    109107
    110108        return res;
  • uspace/drv/rootvirt/rootvirt.c

    rfa9b606 r10096231  
    8484
    8585        int rc = child_device_register_wrapper(parent, virt_dev->name,
    86             virt_dev->match_id, 10, NULL);
     86            virt_dev->match_id, 10);
    8787
    8888        if (rc == EOK) {
  • uspace/drv/test1/test1.c

    rfa9b606 r10096231  
    6464
    6565        int rc = child_device_register_wrapper(parent, name,
    66             match_id, match_score, NULL);
     66            match_id, match_score);
    6767
    6868        if (rc == EOK) {
  • uspace/drv/test2/test2.c

    rfa9b606 r10096231  
    6464
    6565        int rc = child_device_register_wrapper(parent, name,
    66             match_id, match_score, NULL);
     66            match_id, match_score);
    6767
    6868        if (rc == EOK) {
  • uspace/drv/vhc/connhost.c

    rfa9b606 r10096231  
    9393    usbhc_iface_transfer_out_callback_t callback, void *arg)
    9494{
    95         printf(NAME ": transfer OUT [%d.%d (%s); %zu]\n",
     95        printf(NAME ": transfer OUT [%d.%d (%s); %u]\n",
    9696            target.address, target.endpoint,
    9797            usb_str_transfer_type(transfer_type),
     
    113113    usbhc_iface_transfer_out_callback_t callback, void *arg)
    114114{
    115         printf(NAME ": transfer SETUP [%d.%d (%s); %zu]\n",
     115        printf(NAME ": transfer SETUP [%d.%d (%s); %u]\n",
    116116            target.address, target.endpoint,
    117117            usb_str_transfer_type(transfer_type),
     
    133133    usbhc_iface_transfer_in_callback_t callback, void *arg)
    134134{
    135         printf(NAME ": transfer IN [%d.%d (%s); %zu]\n",
     135        printf(NAME ": transfer IN [%d.%d (%s); %u]\n",
    136136            target.address, target.endpoint,
    137137            usb_str_transfer_type(transfer_type),
  • uspace/drv/vhc/hcd.c

    rfa9b606 r10096231  
    7979         * Initialize our hub and announce its presence.
    8080         */
    81         hub_init(dev);
     81        hub_init();
     82        usb_hcd_add_root_hub(dev);
    8283
    8384        printf("%s: virtual USB host controller ready.\n", NAME);
  • uspace/drv/vhc/hub.c

    rfa9b606 r10096231  
    3737#include <usbvirt/device.h>
    3838#include <errno.h>
    39 #include <str_error.h>
    4039#include <stdlib.h>
    41 #include <driver.h>
    4240
    4341#include "vhcd.h"
    4442#include "hub.h"
    4543#include "hubintern.h"
    46 #include "conn.h"
    4744
    4845
     
    151148hub_device_t hub_dev;
    152149
    153 static usb_address_t hub_set_address(usbvirt_device_t *hub)
    154 {
    155         usb_address_t new_address;
    156         int rc = vhc_iface.request_address(NULL, &new_address);
    157         if (rc != EOK) {
    158                 return rc;
    159         }
    160        
    161         usb_device_request_setup_packet_t setup_packet = {
    162                 .request_type = 0,
    163                 .request = USB_DEVREQ_SET_ADDRESS,
    164                 .index = 0,
    165                 .length = 0,
    166         };
    167         setup_packet.value = new_address;
    168 
    169         hub->transaction_setup(hub, 0, &setup_packet, sizeof(setup_packet));
    170         hub->transaction_in(hub, 0, NULL, 0, NULL);
    171        
    172         return new_address;
    173 }
    174 
    175150/** Initialize virtual hub. */
    176 void hub_init(device_t *hc_dev)
     151void hub_init(void)
    177152{
    178153        size_t i;
     
    190165       
    191166        dprintf(1, "virtual hub (%d ports) created", HUB_PORT_COUNT);
    192 
    193         usb_address_t hub_address = hub_set_address(&virthub_dev);
    194         if (hub_address < 0) {
    195                 dprintf(1, "problem changing hub address (%s)",
    196                     str_error(hub_address));
    197         }
    198 
    199         dprintf(2, "virtual hub address changed to %d", hub_address);
    200 
    201         char *id;
    202         int rc = asprintf(&id, "usb&hub");
    203         if (rc <= 0) {
    204                 return;
    205         }
    206         devman_handle_t hub_handle;
    207         rc = child_device_register_wrapper(hc_dev, "hub", id, 10, &hub_handle);
    208         if (rc != EOK) {
    209                 free(id);
    210         }
    211 
    212         vhc_iface.bind_address(NULL, hub_address, hub_handle); 
    213 
    214         dprintf(2, "virtual hub has devman handle %d", (int) hub_handle);
    215167}
    216168
  • uspace/drv/vhc/hub.h

    rfa9b606 r10096231  
    3737
    3838#include <usbvirt/device.h>
    39 #include <driver.h>
    4039
    4140#include "devices.h"
     
    4847extern usbvirt_device_t virthub_dev;
    4948
    50 void hub_init(device_t *);
     49void hub_init(void);
    5150size_t hub_add_device(virtdev_connection_t *);
    5251void hub_remove_device(virtdev_connection_t *);
  • uspace/lib/drv/generic/driver.c

    rfa9b606 r10096231  
    390390 */
    391391int child_device_register_wrapper(device_t *parent, const char *child_name,
    392     const char *child_match_id, int child_match_score,
    393     devman_handle_t *child_handle)
     392    const char *child_match_id, int child_match_score)
    394393{
    395394        device_t *child = NULL;
     
    419418                goto failure;
    420419
    421         if (child_handle != NULL) {
    422                 *child_handle = child->handle;
    423         }
    424420        return EOK;
    425421
  • uspace/lib/drv/include/driver.h

    rfa9b606 r10096231  
    199199
    200200int child_device_register(device_t *, device_t *);
    201 int child_device_register_wrapper(device_t *, const char *, const char *, int,
    202     devman_handle_t *);
     201int child_device_register_wrapper(device_t *, const char *, const char *, int);
    203202
    204203
  • uspace/lib/usb/Makefile

    rfa9b606 r10096231  
    3838        src/hcdhubd.c \
    3939        src/hcdrv.c \
    40         src/hidparser.c \
    4140        src/localdrv.c \
    4241        src/remotedrv.c \
  • uspace/lib/usb/src/remotedrv.c

    rfa9b606 r10096231  
    300300 */
    301301static void remote_in_callback(usb_hc_device_t *hc,
    302     size_t actual_size, usb_transaction_outcome_t outcome, void *arg)
     302    usb_transaction_outcome_t outcome, size_t actual_size, void *arg)
    303303{
    304304        transfer_info_t *transfer = (transfer_info_t *) arg;
Note: See TracChangeset for help on using the changeset viewer.