Changes in / [1fe9bf6:8b3bff5] in mainline


Ignore:
Files:
61 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r1fe9bf6 r8b3bff5  
    7979        $(MAKE) -C uspace clean
    8080        $(MAKE) -C boot clean
    81 
    82 -include Makefile.local
  • boot/Makefile.common

    r1fe9bf6 r8b3bff5  
    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/il/arp/arp \
     
    110109       
    111110RD_DRVS = \
    112         root \
    113         vhc
     111        root
    114112
    115113RD_DRV_CFG =
     
    142140        $(USPACE_PATH)/app/ping/ping \
    143141        $(USPACE_PATH)/app/stats/stats \
    144         $(USPACE_PATH)/app/virtusbkbd/vuk \
    145142        $(USPACE_PATH)/app/tasks/tasks \
    146143        $(USPACE_PATH)/app/top/top
  • boot/arch/amd64/Makefile.inc

    r1fe9bf6 r8b3bff5  
    4040        pciintel \
    4141        isa \
    42         ns8250 \
    43         uhci \
    44         usbkbd
     42        ns8250
    4543       
    4644RD_DRV_CFG += \
  • uspace/Makefile

    r1fe9bf6 r8b3bff5  
    5050        app/trace \
    5151        app/top \
    52         app/virtusbkbd \
    5352        app/netecho \
    5453        app/nettest1 \
     
    8786        srv/net/tl/tcp \
    8887        srv/net/net \
    89         drv/root \
    90         drv/vhc
     88        drv/root
    9189
    9290## Networking
     
    118116        DIRS += drv/isa
    119117        DIRS += drv/ns8250
    120         DIRS += drv/uhci
    121         DIRS += drv/usbkbd
    122118endif
    123119
     
    145141        lib/packet \
    146142        lib/net
    147 
    148 ifeq ($(UARCH),amd64)
    149         LIBS += lib/usb
    150         LIBS += lib/usbvirt
    151 endif
    152 
    153 ifeq ($(UARCH),ia32)
    154         LIBS += lib/usb
    155         LIBS += lib/usbvirt
    156 endif
    157143
    158144LIBC_BUILD = $(addsuffix .build,$(LIBC))
  • uspace/Makefile.common

    r1fe9bf6 r8b3bff5  
    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

    r1fe9bf6 r8b3bff5  
    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/doc/doxygroups.h

    r1fe9bf6 r8b3bff5  
    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

    r1fe9bf6 r8b3bff5  
    7272static int add_platform_child(device_t *parent)
    7373{
    74         return EOK;
    7574        printf(NAME ": adding new child for platform device.\n");
    7675       
     
    120119}
    121120
    122 /** Create virtual USB host controller device.
    123  * Note that the virtual HC is actually device and driver in one
    124  * task.
    125  *
    126  * @param parent Parent device.
    127  * @return Error code.
    128  */
    129 static int add_virtual_usb_host_controller(device_t *parent)
    130 {
    131         printf(NAME ": adding virtual host contoller.\n");
    132 
    133         int rc;
    134         device_t *vhc = NULL;
    135         match_id_t *match_id = NULL;
    136 
    137         vhc = create_device();
    138         if (vhc == NULL) {
    139                 rc = ENOMEM;
    140                 goto failure;
    141         }
    142 
    143         vhc->name = "vhc";
    144         printf(NAME ": the new device's name is %s.\n", vhc->name);
    145 
    146         /* Initialize match id list. */
    147         match_id = create_match_id();
    148         if (match_id == NULL) {
    149                 rc = ENOMEM;
    150                 goto failure;
    151         }
    152 
    153         match_id->id = "usb&hc=vhc";
    154         match_id->score = 100;
    155         add_match_id(&vhc->match_ids, match_id);
    156 
    157         /* Register child device. */
    158         rc = child_device_register(vhc, parent);
    159         if (rc != EOK)
    160                 goto failure;
    161 
    162         return EOK;
    163 
    164 failure:
    165         if (match_id != NULL)
    166                 match_id->id = NULL;
    167 
    168         if (vhc != NULL) {
    169                 vhc->name = NULL;
    170                 delete_device(vhc);
    171         }
    172 
    173         return rc;
    174 }
    175 
    176121/** Get the root device.
    177122 *
     
    188133                printf(NAME ": failed to add child device for platform.\n");
    189134       
    190         /* Register virtual USB host controller. */
    191         int rc = add_virtual_usb_host_controller(dev);
    192         if (EOK != rc) {
    193                 printf(NAME ": failed to add child device - virtual USB HC.\n");
    194         }
    195 
    196135        return res;
    197136}
  • uspace/lib/c/include/ipc/dev_iface.h

    r1fe9bf6 r8b3bff5  
    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
  • uspace/lib/drv/Makefile

    r1fe9bf6 r8b3bff5  
    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

    r1fe9bf6 r8b3bff5  
    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/srv/devman/devman.c

    r1fe9bf6 r8b3bff5  
    117117        printf(NAME": the '%s' driver was added to the list of available "
    118118            "drivers.\n", drv->name);
    119 
    120         printf(NAME ": match ids:");
    121         link_t *cur;
    122         for (cur = drv->match_ids.ids.next; cur != &drv->match_ids.ids; cur = cur->next) {
    123                 match_id_t *match_id = list_get_instance(cur, match_id_t, link);
    124                 printf(" %d:%s", match_id->score, match_id->id);
    125         }
    126         printf("\n");
    127119}
    128120
  • uspace/srv/devman/match.c

    r1fe9bf6 r8b3bff5  
    4343                return 0;
    4444       
    45         /*
    46          * Find first matching pair.
    47          */
    4845        link_t *drv_link = drv->match_ids.ids.next;
    49         while (drv_link != drv_head) {
    50                 link_t *dev_link = dev->match_ids.ids.next;
    51                 while (dev_link != dev_head) {
    52                         match_id_t *drv_id = list_get_instance(drv_link, match_id_t, link);
    53                         match_id_t *dev_id = list_get_instance(dev_link, match_id_t, link);
    54 
    55                         if (str_cmp(drv_id->id, dev_id->id) == 0) {
    56                                 /*
    57                                  * We found a match.
    58                                  * Return the score of the match.
    59                                  */
    60                                 return drv_id->score * dev_id->score;
    61                         }
    62 
     46        link_t *dev_link = dev->match_ids.ids.next;
     47       
     48        match_id_t *drv_id = list_get_instance(drv_link, match_id_t, link);
     49        match_id_t *dev_id = list_get_instance(dev_link, match_id_t, link);
     50       
     51        int score_next_drv = 0;
     52        int score_next_dev = 0;
     53       
     54        do {
     55                match_id_t *tmp_ma_id;
     56       
     57                if (str_cmp(drv_id->id, dev_id->id) == 0) {
     58                        /*
     59                         * We found a match.
     60                         * Return the score of the match.
     61                         */
     62                        return drv_id->score * dev_id->score;
     63                }
     64               
     65                /*
     66                 * Compute the next score we get, if we advance in the driver's
     67                 * list of match ids.
     68                 */
     69                if (drv_link->next != drv_head) {
     70                        tmp_ma_id = list_get_instance(drv_link->next,
     71                            match_id_t, link);
     72                        score_next_drv = dev_id->score * tmp_ma_id->score;
     73                } else {
     74                        score_next_drv = 0;
     75                }
     76               
     77                /*
     78                 * Compute the next score we get, if we advance in the device's
     79                 * list of match ids.
     80                 */
     81                if (dev_link->next != dev_head) {
     82                        tmp_ma_id = list_get_instance(dev_link->next,
     83                            match_id_t, link);
     84                        score_next_dev = drv_id->score * tmp_ma_id->score;
     85                } else {
     86                        score_next_dev = 0;
     87                }
     88               
     89                /*
     90                 * Advance in one of the two lists, so we get the next highest
     91                 * score.
     92                 */
     93                if (score_next_drv > score_next_dev) {
     94                        drv_link = drv_link->next;
     95                        drv_id = list_get_instance(drv_link, match_id_t, link);
     96                } else {
    6397                        dev_link = dev_link->next;
     98                        dev_id = list_get_instance(dev_link, match_id_t, link);
    6499                }
    65                 drv_link = drv_link->next;
    66         }
     100               
     101        } while (drv_link->next != drv_head && dev_link->next != dev_head);
    67102       
    68103        return 0;
  • uspace/srv/net/tl/udp/udp.c

    r1fe9bf6 r8b3bff5  
    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.