Changes in / [dffabf0:196ef08] in mainline


Ignore:
Files:
96 deleted
26 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    rdffabf0 r196ef08  
    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
  • Makefile

    rdffabf0 r196ef08  
    9292        $(MAKE) -C uspace clean
    9393        $(MAKE) -C boot clean
    94 
    95 -include Makefile.local
  • boot/Makefile.common

    rdffabf0 r196ef08  
    9999        $(USPACE_PATH)/srv/taskmon/taskmon \
    100100        $(USPACE_PATH)/srv/hw/netif/dp8390/dp8390 \
    101         $(USPACE_PATH)/srv/hw/bus/usb/hcd/virtual/vhcd \
    102101        $(USPACE_PATH)/srv/net/netif/lo/lo \
    103102        $(USPACE_PATH)/srv/net/nil/eth/eth \
     
    142141        $(USPACE_PATH)/app/ping/ping \
    143142        $(USPACE_PATH)/app/stats/stats \
    144         $(USPACE_PATH)/app/sysinfo/sysinfo \
    145143        $(USPACE_PATH)/app/tasks/tasks \
    146144        $(USPACE_PATH)/app/top/top \
    147         $(USPACE_PATH)/app/usbinfo/usbinfo \
    148         $(USPACE_PATH)/app/virtusbkbd/vuk \
     145        $(USPACE_PATH)/app/sysinfo/sysinfo \
    149146        $(USPACE_PATH)/app/websrv/websrv
    150147
  • boot/arch/amd64/Makefile.inc

    rdffabf0 r196ef08  
    4040        pciintel \
    4141        isa \
    42         ns8250 \
    43         uhci \
    44         usbhub \
    45         usbkbd \
    46         vhc
     42        ns8250
    4743       
    4844RD_DRV_CFG += \
  • uspace/Makefile

    rdffabf0 r196ef08  
    5151        app/trace \
    5252        app/top \
    53         app/usbinfo \
    54         app/virtusbkbd \
    5553        app/netecho \
    5654        app/nettest1 \
     
    115113        DIRS += drv/isa
    116114        DIRS += drv/ns8250
    117         DIRS += drv/uhci
    118         DIRS += drv/usbhub
    119         DIRS += drv/usbkbd
    120         DIRS += drv/vhc
    121115endif
    122116
     
    126120        DIRS += drv/isa
    127121        DIRS += drv/ns8250
    128         DIRS += drv/uhci
    129         DIRS += drv/usbhub
    130         DIRS += drv/usbkbd
    131         DIRS += drv/vhc
    132122endif
    133123
     
    155145        lib/packet \
    156146        lib/net
    157 
    158 ifeq ($(UARCH),amd64)
    159         LIBS += lib/usb
    160         LIBS += lib/usbvirt
    161 endif
    162 
    163 ifeq ($(UARCH),ia32)
    164         LIBS += lib/usb
    165         LIBS += lib/usbvirt
    166 endif
    167147
    168148LIBC_BUILD = $(addsuffix .build,$(LIBC))
  • uspace/Makefile.common

    rdffabf0 r196ef08  
    8686LIBCLUI_PREFIX = $(LIB_PREFIX)/clui
    8787
    88 
    89 LIBUSB_PREFIX = $(LIB_PREFIX)/usb
    90 LIBUSBVIRT_PREFIX = $(LIB_PREFIX)/usbvirt
    9188LIBDRV_PREFIX = $(LIB_PREFIX)/drv
    9289LIBPACKET_PREFIX = $(LIB_PREFIX)/packet
  • uspace/app/init/init.c

    rdffabf0 r196ef08  
    312312        getterm("term/vc5", "/app/bdsh", false);
    313313        getterm("term/vc6", "/app/klog", false);
    314         getterm("term/vc7", "/srv/devman", false);
    315314       
    316315        return 0;
  • uspace/app/tester/Makefile

    rdffabf0 r196ef08  
    3131BINARY = tester
    3232
    33 LIBS += $(LIBUSB_PREFIX)/libusb.a
    34 EXTRA_CFLAGS += -I$(LIBUSB_PREFIX)/include
    35 
    3633SOURCES = \
    3734        tester.c \
    38         adt/usbaddrkeep.c \
    3935        thread/thread1.c \
    4036        print/print1.c \
  • uspace/app/tester/tester.c

    rdffabf0 r196ef08  
    6363#include "mm/malloc1.def"
    6464#include "hw/serial/serial1.def"
    65 #include "adt/usbaddrkeep.def"
    6665#include "hw/misc/virtchar1.def"
    6766        {NULL, NULL, NULL, false}
  • uspace/app/tester/tester.h

    rdffabf0 r196ef08  
    8080extern const char *test_malloc1(void);
    8181extern const char *test_serial1(void);
    82 extern const char *test_usbaddrkeep(void);
    8382extern const char *test_virtchar1(void);
    8483
  • uspace/doc/doxygroups.h

    rdffabf0 r196ef08  
    155155         * @endcond
    156156         */
    157 
     157       
    158158/**
    159159 * @defgroup emul Emulation Libraries
     
    170170         * @ingroup emul
    171171         */
    172 
    173 /**
    174  * @defgroup usb USB
    175  * @ingroup uspace
    176  * @brief USB support for HelenOS.
    177  */
    178         /**
    179          * @defgroup libusb USB library
    180          * @ingroup usb
    181          * @brief Library for creating USB devices drivers.
    182          */
  • uspace/drv/root/root.c

    rdffabf0 r196ef08  
    8888
    8989        int res = child_device_register_wrapper(parent, VIRTUAL_DEVICE_NAME,
    90             VIRTUAL_DEVICE_MATCH_ID, VIRTUAL_DEVICE_MATCH_SCORE,
    91             NULL);
     90            VIRTUAL_DEVICE_MATCH_ID, VIRTUAL_DEVICE_MATCH_SCORE);
    9291
    9392        return res;
     
    137136
    138137        res = child_device_register_wrapper(parent, PLATFORM_DEVICE_NAME,
    139             match_id, PLATFORM_DEVICE_MATCH_SCORE, NULL);
     138            match_id, PLATFORM_DEVICE_MATCH_SCORE);
    140139
    141140        return res;
  • uspace/drv/rootvirt/devices.def

    rdffabf0 r196ef08  
    2222},
    2323#endif
    24 /* Virtual USB host controller. */
    25 {
    26         .name = "usbhc",
    27         .match_id = "usb&hc=vhc"
    28 },
  • uspace/drv/rootvirt/rootvirt.c

    rdffabf0 r196ef08  
    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

    rdffabf0 r196ef08  
    6262
    6363        int rc = child_device_register_wrapper(parent, name,
    64             match_id, match_score, NULL);
     64            match_id, match_score);
    6565
    6666        if (rc == EOK) {
  • uspace/drv/test2/test2.c

    rdffabf0 r196ef08  
    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/lib/c/generic/devman.c

    rdffabf0 r196ef08  
    230230       
    231231        if (flags & IPC_FLAG_BLOCKING) {
    232                 phone = async_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAN,
     232                phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAN,
    233233                    DEVMAN_CONNECT_TO_DEVICE, handle);
    234234        } else {
    235                 phone = async_connect_me_to(PHONE_NS, SERVICE_DEVMAN,
     235                phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAN,
    236236                    DEVMAN_CONNECT_TO_DEVICE, handle);
    237237        }
  • uspace/lib/c/include/ipc/dev_iface.h

    rdffabf0 r196ef08  
    3838        HW_RES_DEV_IFACE = 0,   
    3939        CHAR_DEV_IFACE,
    40 
    41         /** Interface provided by USB host controller. */
    42         USBHC_DEV_IFACE,
    43 
    4440        // TODO add more interfaces
    4541        DEV_IFACE_MAX
     
    5450        DEV_IFACE_ID(DEV_FIRST_CUSTOM_METHOD_IDX)
    5551
    56 /*
    57  * The first argument is actually method (as the "real" method is used
    58  * for indexing into interfaces.
    59  */
    60 
    61 #define DEV_IPC_GET_ARG1(call) IPC_GET_ARG2((call))
    62 #define DEV_IPC_GET_ARG2(call) IPC_GET_ARG3((call))
    63 #define DEV_IPC_GET_ARG3(call) IPC_GET_ARG4((call))
    64 #define DEV_IPC_GET_ARG4(call) IPC_GET_ARG5((call))
    65 
    6652
    6753#endif
  • uspace/lib/c/include/ipc/kbd.h

    rdffabf0 r196ef08  
    3939
    4040#include <ipc/ipc.h>
    41 #include <ipc/dev_iface.h>
    4241
    4342typedef enum {
    44         KBD_YIELD = DEV_FIRST_CUSTOM_METHOD,
     43        KBD_YIELD = IPC_FIRST_USER_METHOD,
    4544        KBD_RECLAIM
    4645} kbd_request_t;
  • uspace/lib/drv/Makefile

    rdffabf0 r196ef08  
    2929
    3030USPACE_PREFIX = ../..
    31 EXTRA_CFLAGS = -Iinclude -I$(LIBUSB_PREFIX)/include
     31EXTRA_CFLAGS = -Iinclude
    3232LIBRARY = libdrv
    3333
     
    3636        generic/dev_iface.c \
    3737        generic/remote_res.c \
    38         generic/remote_usbhc.c \
    3938        generic/remote_char.c
    4039
  • uspace/lib/drv/generic/dev_iface.c

    rdffabf0 r196ef08  
    3939#include "remote_res.h"
    4040#include "remote_char.h"
    41 #include "remote_usbhc.h"
    4241
    4342static iface_dipatch_table_t remote_ifaces = {
    4443        .ifaces = {
    4544                &remote_res_iface,
    46                 &remote_char_iface,
    47                 &remote_usbhc_iface
     45                &remote_char_iface
    4846        }
    4947};
  • uspace/lib/drv/generic/driver.c

    rdffabf0 r196ef08  
    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

    rdffabf0 r196ef08  
    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/srv/devman/devman.c

    rdffabf0 r196ef08  
    133133        printf(NAME": the '%s' driver was added to the list of available "
    134134            "drivers.\n", drv->name);
    135 
    136         printf(NAME ": match ids:");
    137         link_t *cur;
    138         for (cur = drv->match_ids.ids.next; cur != &drv->match_ids.ids; cur = cur->next) {
    139                 match_id_t *match_id = list_get_instance(cur, match_id_t, link);
    140                 printf(" %d:%s", match_id->score, match_id->id);
    141         }
    142         printf("\n");
    143135}
    144136
  • uspace/srv/hid/console/console.c

    rdffabf0 r196ef08  
    317317static void change_console(console_t *cons)
    318318{
    319         if (cons == active_console) {
     319        if (cons == active_console)
    320320                return;
    321         }
    322321       
    323322        fb_pending_flush();
     
    459458                        if (IPC_GET_ARG1(call) == 1) {
    460459                                int newcon = gcons_mouse_btn((bool) IPC_GET_ARG2(call));
    461                                 if (newcon != -1) {
     460                                if (newcon != -1)
    462461                                        change_console(&consoles[newcon]);
    463                                 }
    464462                        }
    465463                        retval = 0;
     
    712710}
    713711
    714 static int connect_keyboard(char *path)
    715 {
    716         int fd = open(path, O_RDONLY);
    717         if (fd < 0) {
    718                 return fd;
    719         }
    720        
    721         int phone = fd_phone(fd);
    722         if (phone < 0) {
     712static bool console_init(char *input)
     713{
     714        /* Connect to input device */
     715        int input_fd = open(input, O_RDONLY);
     716        if (input_fd < 0) {
     717                printf(NAME ": Failed opening %s\n", input);
     718                return false;
     719        }
     720       
     721        kbd_phone = fd_phone(input_fd);
     722        if (kbd_phone < 0) {
    723723                printf(NAME ": Failed to connect to input device\n");
    724                 return phone;
     724                return false;
    725725        }
    726726       
    727727        /* NB: The callback connection is slotted for removal */
    728728        sysarg_t phonehash;
    729         int rc = async_req_3_5(phone, IPC_M_CONNECT_TO_ME, SERVICE_CONSOLE,
    730             0, 0, NULL, NULL, NULL, NULL, &phonehash);
    731         if (rc != EOK) {
     729        if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) {
    732730                printf(NAME ": Failed to create callback from input device\n");
    733                 return rc;
     731                return false;
    734732        }
    735733       
    736734        async_new_connection(phonehash, 0, NULL, keyboard_events);
    737 
    738         printf(NAME ": we got a hit (new keyboard \"%s\").\n", path);
    739 
    740         return phone;
    741 }
    742 
    743 
    744 static int check_new_keyboards(void *arg)
    745 {
    746         char *class_name = (char *) arg;
    747 
    748         int index = 1;
    749 
    750         while (true) {
    751                 async_usleep(1 * 500 * 1000);
    752                 char *path;
    753                 int rc = asprintf(&path, "/dev/class/%s\\%d", class_name, index);
    754                 if (rc < 0) {
    755                         continue;
    756                 }
    757                 rc = 0;
    758                 rc = connect_keyboard(path);
    759                 if (rc > 0) {
    760                         /* We do not allow unplug. */
    761                         index++;
    762                 }
    763 
    764                 free(path);
    765         }
    766 
    767         return EOK;
    768 }
    769 
    770 
    771 /** Start a fibril monitoring hot-plugged keyboards.
    772  */
    773 static void check_new_keyboards_in_background()
    774 {
    775         fid_t fid = fibril_create(check_new_keyboards, (void *)"keyboard");
    776         if (!fid) {
    777                 printf(NAME ": failed to create hot-plug-watch fibril.\n");
    778                 return;
    779         }
    780         fibril_add_ready(fid);
    781 }
    782 
    783 static bool console_init(char *input)
    784 {
    785         /* Connect to input device */
    786         kbd_phone = connect_keyboard(input);
    787         if (kbd_phone < 0) {
    788                 return false;
    789         }
    790 
     735       
    791736        /* Connect to mouse device */
    792737        mouse_phone = -1;
     
    804749        }
    805750       
    806         sysarg_t phonehash;
    807751        if (ipc_connect_to_me(mouse_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) {
    808752                printf(NAME ": Failed to create callback from mouse device\n");
     
    897841        async_set_interrupt_received(interrupt_received);
    898842       
    899         /* Start fibril for checking on hot-plugged keyboards. */
    900         check_new_keyboards_in_background();
    901 
    902843        return true;
    903844}
     
    919860        if (!console_init(argv[1]))
    920861                return -1;
    921 
     862       
    922863        printf(NAME ": Accepting connections\n");
    923864        async_manager();
  • uspace/srv/net/tl/udp/udp.c

    rdffabf0 r196ef08  
    711711        int socket_id;
    712712        size_t addrlen;
    713         size_t size = 0;
     713        size_t size;
    714714        ipc_call_t answer;
    715715        int answer_count;
Note: See TracChangeset for help on using the changeset viewer.