Changes in / [fa9b606:10096231] in mainline
- Files:
-
- 2 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rfa9b606 r10096231 547 547 548 548 % 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 202 202 int main(int argc, char * argv[]) 203 203 { 204 printf("Dump of report descriptor (% zu bytes):\n", report_descriptor_size);204 printf("Dump of report descriptor (%u bytes):\n", report_descriptor_size); 205 205 size_t i; 206 206 for (i = 0; i < report_descriptor_size; i++) { -
uspace/drv/root/root.c
rfa9b606 r10096231 87 87 88 88 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); 91 90 92 91 return res; … … 105 104 106 105 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); 109 107 110 108 return res; -
uspace/drv/rootvirt/rootvirt.c
rfa9b606 r10096231 84 84 85 85 int rc = child_device_register_wrapper(parent, virt_dev->name, 86 virt_dev->match_id, 10 , NULL);86 virt_dev->match_id, 10); 87 87 88 88 if (rc == EOK) { -
uspace/drv/test1/test1.c
rfa9b606 r10096231 64 64 65 65 int rc = child_device_register_wrapper(parent, name, 66 match_id, match_score , NULL);66 match_id, match_score); 67 67 68 68 if (rc == EOK) { -
uspace/drv/test2/test2.c
rfa9b606 r10096231 64 64 65 65 int rc = child_device_register_wrapper(parent, name, 66 match_id, match_score , NULL);66 match_id, match_score); 67 67 68 68 if (rc == EOK) { -
uspace/drv/vhc/connhost.c
rfa9b606 r10096231 93 93 usbhc_iface_transfer_out_callback_t callback, void *arg) 94 94 { 95 printf(NAME ": transfer OUT [%d.%d (%s); % zu]\n",95 printf(NAME ": transfer OUT [%d.%d (%s); %u]\n", 96 96 target.address, target.endpoint, 97 97 usb_str_transfer_type(transfer_type), … … 113 113 usbhc_iface_transfer_out_callback_t callback, void *arg) 114 114 { 115 printf(NAME ": transfer SETUP [%d.%d (%s); % zu]\n",115 printf(NAME ": transfer SETUP [%d.%d (%s); %u]\n", 116 116 target.address, target.endpoint, 117 117 usb_str_transfer_type(transfer_type), … … 133 133 usbhc_iface_transfer_in_callback_t callback, void *arg) 134 134 { 135 printf(NAME ": transfer IN [%d.%d (%s); % zu]\n",135 printf(NAME ": transfer IN [%d.%d (%s); %u]\n", 136 136 target.address, target.endpoint, 137 137 usb_str_transfer_type(transfer_type), -
uspace/drv/vhc/hcd.c
rfa9b606 r10096231 79 79 * Initialize our hub and announce its presence. 80 80 */ 81 hub_init(dev); 81 hub_init(); 82 usb_hcd_add_root_hub(dev); 82 83 83 84 printf("%s: virtual USB host controller ready.\n", NAME); -
uspace/drv/vhc/hub.c
rfa9b606 r10096231 37 37 #include <usbvirt/device.h> 38 38 #include <errno.h> 39 #include <str_error.h>40 39 #include <stdlib.h> 41 #include <driver.h>42 40 43 41 #include "vhcd.h" 44 42 #include "hub.h" 45 43 #include "hubintern.h" 46 #include "conn.h"47 44 48 45 … … 151 148 hub_device_t hub_dev; 152 149 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 175 150 /** Initialize virtual hub. */ 176 void hub_init( device_t *hc_dev)151 void hub_init(void) 177 152 { 178 153 size_t i; … … 190 165 191 166 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);215 167 } 216 168 -
uspace/drv/vhc/hub.h
rfa9b606 r10096231 37 37 38 38 #include <usbvirt/device.h> 39 #include <driver.h>40 39 41 40 #include "devices.h" … … 48 47 extern usbvirt_device_t virthub_dev; 49 48 50 void hub_init( device_t *);49 void hub_init(void); 51 50 size_t hub_add_device(virtdev_connection_t *); 52 51 void hub_remove_device(virtdev_connection_t *); -
uspace/lib/drv/generic/driver.c
rfa9b606 r10096231 390 390 */ 391 391 int 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) 394 393 { 395 394 device_t *child = NULL; … … 419 418 goto failure; 420 419 421 if (child_handle != NULL) {422 *child_handle = child->handle;423 }424 420 return EOK; 425 421 -
uspace/lib/drv/include/driver.h
rfa9b606 r10096231 199 199 200 200 int child_device_register(device_t *, device_t *); 201 int child_device_register_wrapper(device_t *, const char *, const char *, int, 202 devman_handle_t *); 201 int child_device_register_wrapper(device_t *, const char *, const char *, int); 203 202 204 203 -
uspace/lib/usb/Makefile
rfa9b606 r10096231 38 38 src/hcdhubd.c \ 39 39 src/hcdrv.c \ 40 src/hidparser.c \41 40 src/localdrv.c \ 42 41 src/remotedrv.c \ -
uspace/lib/usb/src/remotedrv.c
rfa9b606 r10096231 300 300 */ 301 301 static 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) 303 303 { 304 304 transfer_info_t *transfer = (transfer_info_t *) arg;
Note:
See TracChangeset
for help on using the changeset viewer.