Changes in / [bf2063e9:cf978f2] in mainline
- Files:
-
- 3 added
- 2 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rbf2063e9 rcf978f2 547 547 548 548 % Launch (devman) test drivers 549 ! [CONFIG_DEBUG=y] CONFIG_TEST_DRIVERS ( y/n)550 549 ! [CONFIG_DEBUG=y] CONFIG_TEST_DRIVERS (n/y) 550 -
uspace/app/virtusbkbd/virtusbkbd.c
rbf2063e9 rcf978f2 202 202 int main(int argc, char * argv[]) 203 203 { 204 printf("Dump of report descriptor (% u bytes):\n", report_descriptor_size);204 printf("Dump of report descriptor (%zu 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
rbf2063e9 rcf978f2 87 87 88 88 int res = child_device_register_wrapper(parent, VIRTUAL_DEVICE_NAME, 89 VIRTUAL_DEVICE_MATCH_ID, VIRTUAL_DEVICE_MATCH_SCORE); 89 VIRTUAL_DEVICE_MATCH_ID, VIRTUAL_DEVICE_MATCH_SCORE, 90 NULL); 90 91 91 92 return res; … … 104 105 105 106 int res = child_device_register_wrapper(parent, PLATFORM_DEVICE_NAME, 106 PLATFORM_DEVICE_MATCH_ID, PLATFORM_DEVICE_MATCH_SCORE); 107 PLATFORM_DEVICE_MATCH_ID, PLATFORM_DEVICE_MATCH_SCORE, 108 NULL); 107 109 108 110 return res; -
uspace/drv/rootvirt/rootvirt.c
rbf2063e9 rcf978f2 84 84 85 85 int rc = child_device_register_wrapper(parent, virt_dev->name, 86 virt_dev->match_id, 10 );86 virt_dev->match_id, 10, NULL); 87 87 88 88 if (rc == EOK) { -
uspace/drv/test1/test1.c
rbf2063e9 rcf978f2 64 64 65 65 int rc = child_device_register_wrapper(parent, name, 66 match_id, match_score );66 match_id, match_score, NULL); 67 67 68 68 if (rc == EOK) { -
uspace/drv/test2/test2.c
rbf2063e9 rcf978f2 64 64 65 65 int rc = child_device_register_wrapper(parent, name, 66 match_id, match_score );66 match_id, match_score, NULL); 67 67 68 68 if (rc == EOK) { -
uspace/drv/vhc/connhost.c
rbf2063e9 rcf978f2 93 93 usbhc_iface_transfer_out_callback_t callback, void *arg) 94 94 { 95 printf(NAME ": transfer OUT [%d.%d (%s); % u]\n",95 printf(NAME ": transfer OUT [%d.%d (%s); %zu]\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); % u]\n",115 printf(NAME ": transfer SETUP [%d.%d (%s); %zu]\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); % u]\n",135 printf(NAME ": transfer IN [%d.%d (%s); %zu]\n", 136 136 target.address, target.endpoint, 137 137 usb_str_transfer_type(transfer_type), -
uspace/drv/vhc/hcd.c
rbf2063e9 rcf978f2 79 79 * Initialize our hub and announce its presence. 80 80 */ 81 hub_init(); 82 usb_hcd_add_root_hub(dev); 81 hub_init(dev); 83 82 84 83 printf("%s: virtual USB host controller ready.\n", NAME); -
uspace/drv/vhc/hub.c
rbf2063e9 rcf978f2 37 37 #include <usbvirt/device.h> 38 38 #include <errno.h> 39 #include <str_error.h> 39 40 #include <stdlib.h> 41 #include <driver.h> 40 42 41 43 #include "vhcd.h" 42 44 #include "hub.h" 43 45 #include "hubintern.h" 46 #include "conn.h" 44 47 45 48 … … 148 151 hub_device_t hub_dev; 149 152 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 150 175 /** Initialize virtual hub. */ 151 void hub_init( void)176 void hub_init(device_t *hc_dev) 152 177 { 153 178 size_t i; … … 163 188 164 189 dprintf(1, "virtual hub (%d ports) created", HUB_PORT_COUNT); 190 191 usb_address_t hub_address = hub_set_address(&virthub_dev); 192 if (hub_address < 0) { 193 dprintf(1, "problem changing hub address (%s)", 194 str_error(hub_address)); 195 } 196 197 dprintf(2, "virtual hub address changed to %d", hub_address); 198 199 char *id; 200 int rc = asprintf(&id, "usb&hub"); 201 if (rc <= 0) { 202 return; 203 } 204 devman_handle_t hub_handle; 205 rc = child_device_register_wrapper(hc_dev, "hub", id, 10, &hub_handle); 206 if (rc != EOK) { 207 free(id); 208 } 209 210 vhc_iface.bind_address(NULL, hub_address, hub_handle); 211 212 dprintf(2, "virtual hub has devman handle %d", (int) hub_handle); 165 213 } 166 214 -
uspace/drv/vhc/hub.h
rbf2063e9 rcf978f2 37 37 38 38 #include <usbvirt/device.h> 39 #include <driver.h> 39 40 40 41 #include "devices.h" … … 47 48 extern usbvirt_device_t virthub_dev; 48 49 49 void hub_init( void);50 void hub_init(device_t *); 50 51 size_t hub_add_device(virtdev_connection_t *); 51 52 void hub_remove_device(virtdev_connection_t *); -
uspace/lib/drv/generic/driver.c
rbf2063e9 rcf978f2 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) 392 const char *child_match_id, int child_match_score, 393 devman_handle_t *child_handle) 393 394 { 394 395 device_t *child = NULL; … … 418 419 goto failure; 419 420 421 if (child_handle != NULL) { 422 *child_handle = child->handle; 423 } 420 424 return EOK; 421 425 -
uspace/lib/drv/include/driver.h
rbf2063e9 rcf978f2 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); 201 int child_device_register_wrapper(device_t *, const char *, const char *, int, 202 devman_handle_t *); 202 203 203 204 -
uspace/lib/usb/src/remotedrv.c
rbf2063e9 rcf978f2 300 300 */ 301 301 static void remote_in_callback(usb_hc_device_t *hc, 302 usb_transaction_outcome_t outcome, size_t actual_size, void *arg)302 size_t actual_size, usb_transaction_outcome_t outcome, void *arg) 303 303 { 304 304 transfer_info_t *transfer = (transfer_info_t *) arg;
Note:
See TracChangeset
for help on using the changeset viewer.