Changeset ce794342 in mainline
- Timestamp:
- 2011-03-21T18:21:46Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 31b568e
- Parents:
- 434ef65 (diff), fbefd0e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ehci-hcd/main.c
r434ef65 rce794342 119 119 int main(int argc, char *argv[]) 120 120 { 121 usb_log_enable(USB_LOG_LEVEL_DE BUG, NAME);121 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 122 122 return ddf_driver_main(&ehci_driver); 123 123 } -
uspace/drv/ohci/main.c
r434ef65 rce794342 199 199 int main(int argc, char *argv[]) 200 200 { 201 usb_log_enable(USB_LOG_LEVEL_DE BUG, NAME);201 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 202 202 sleep(5); 203 203 return ddf_driver_main(&ohci_driver); -
uspace/drv/uhci-hcd/main.c
r434ef65 rce794342 62 62 int uhci_add_device(ddf_dev_t *device) 63 63 { 64 usb_log_ info("uhci_add_device() called\n");64 usb_log_debug("uhci_add_device() called\n"); 65 65 assert(device); 66 66 uhci_t *uhci = malloc(sizeof(uhci_t)); … … 72 72 int ret = uhci_init(uhci, device); 73 73 if (ret != EOK) { 74 usb_log_error("Failed to initialzie UHCI driver.\n"); 74 usb_log_error("Failed to initialize UHCI driver: %s.\n", 75 str_error(ret)); 75 76 return ret; 76 77 } 77 78 device->driver_data = uhci; 79 80 usb_log_info("Controlling new UHCI device `%s'.\n", device->name); 81 78 82 return EOK; 79 83 } … … 89 93 int main(int argc, char *argv[]) 90 94 { 95 printf(NAME ": HelenOS UHCI driver.\n"); 96 91 97 sleep(3); /* TODO: remove in final version */ 92 usb_log_enable(USB_LOG_LEVEL_DE BUG, NAME);98 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 93 99 94 100 return ddf_driver_main(&uhci_driver); -
uspace/drv/uhci-hcd/uhci.c
r434ef65 rce794342 167 167 CHECK_RET_DEST_FUN_RETURN(ret, 168 168 "Failed(%d) to get I/O addresses:.\n", ret, device->handle); 169 usb_log_ info("I/O regs at 0x%X (size %zu), IRQ %d.\n",169 usb_log_debug("I/O regs at 0x%X (size %zu), IRQ %d.\n", 170 170 io_reg_base, io_reg_size, irq); 171 171 -
uspace/drv/uhci-hcd/uhci_hc.c
r434ef65 rce794342 128 128 fibril_add_ready(instance->debug_checker); 129 129 130 usb_log_info("Started UHCI driver.\n");131 130 return EOK; 132 131 #undef CHECK_RET_DEST_FUN_RETURN -
uspace/drv/uhci-rhd/main.c
r434ef65 rce794342 36 36 #include <device/hw_res.h> 37 37 #include <errno.h> 38 #include <str_error.h> 38 39 #include <usb_iface.h> 39 40 #include <usb/ddfiface.h> … … 86 87 int ret = hc_get_my_registers(device, &io_regs, &io_size); 87 88 if (ret != EOK) { 88 usb_log_error("Failed (%d) to get registers from parent hc.",89 ret);90 } 91 usb_log_ info("I/O regs at %#X (size %zu).\n", io_regs, io_size);89 usb_log_error("Failed to get registers from parent HC: %s.\n", 90 str_error(ret)); 91 } 92 usb_log_debug("I/O regs at %#X (size %zu).\n", io_regs, io_size); 92 93 93 94 uhci_root_hub_t *rh = malloc(sizeof(uhci_root_hub_t)); … … 99 100 ret = uhci_root_hub_init(rh, (void*)io_regs, io_size, device); 100 101 if (ret != EOK) { 101 usb_log_error("Failed(%d) to initialize driver instance.\n", ret); 102 usb_log_error("Failed to initialize driver instance: %s.\n", 103 str_error(ret)); 102 104 free(rh); 103 105 return ret; … … 105 107 106 108 device->driver_data = rh; 107 usb_log_info(" Sucessfully initialized driver instance for device:%d.\n",108 device-> handle);109 usb_log_info("Controlling root hub `%s' (%llu).\n", 110 device->name, device->handle); 109 111 return EOK; 110 112 } … … 129 131 int main(int argc, char *argv[]) 130 132 { 131 usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME); 133 printf(NAME ": HelenOS UHCI root hub driver.\n"); 134 135 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 136 132 137 return ddf_driver_main(&uhci_rh_driver); 133 138 } -
uspace/drv/uhci-rhd/port.c
r434ef65 rce794342 256 256 assert(usb_hc_connection_is_opened(&port->hc_connection)); 257 257 258 usb_log_ info("%s: Detected new device.\n", port->id_string);258 usb_log_debug("%s: Detected new device.\n", port->id_string); 259 259 260 260 usb_address_t dev_addr; … … 270 270 } 271 271 272 usb_log_info(" %s: New device has address %d (handle %zu).\n",273 port-> id_string, dev_addr, port->attached_device);272 usb_log_info("New device at port %u, address %d (handle %llu).\n", 273 port->number, dev_addr, port->attached_device); 274 274 275 275 return EOK; … … 315 315 uhci_port_write_status(port, port_status); 316 316 317 usb_log_ info("%s: %sabled port.\n",317 usb_log_debug("%s: %sabled port.\n", 318 318 port->id_string, enabled ? "En" : "Dis"); 319 319 return EOK; -
uspace/drv/usbflbk/main.c
r434ef65 rce794342 86 86 int main(int argc, char *argv[]) 87 87 { 88 usb_log_enable(USB_LOG_LEVEL_DE BUG, NAME);88 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 89 89 90 90 return usb_driver_main(&usbfallback_driver); -
uspace/drv/usbhid/hiddev.c
r434ef65 rce794342 192 192 assert(hid_dev != NULL); 193 193 194 usb_log_ info("Processing descriptors...\n");194 usb_log_debug("Processing descriptors...\n"); 195 195 196 196 int rc; … … 368 368 usb_endpoint_description_t *poll_ep_desc) 369 369 { 370 usb_log_ info("Initializing HID device structure.\n");370 usb_log_debug("Initializing HID device structure.\n"); 371 371 372 372 if (hid_dev == NULL) { … … 454 454 455 455 hid_dev->initialized = 1; 456 usb_log_ info("HID device structure initialized.\n");456 usb_log_debug("HID device structure initialized.\n"); 457 457 458 458 return EOK; -
uspace/drv/usbhid/kbddev.c
r434ef65 rce794342 662 662 int rc; 663 663 664 usb_log_ info("Initializing HID/KBD structure...\n");664 usb_log_debug("Initializing HID/KBD structure...\n"); 665 665 666 666 if (kbd_dev == NULL) { … … 742 742 743 743 kbd_dev->initialized = USBHID_KBD_STATUS_INITIALIZED; 744 usb_log_ info("HID/KBD device structure initialized.\n");744 usb_log_debug("HID/KBD device structure initialized.\n"); 745 745 746 746 return EOK; … … 769 769 size_t actual_size; 770 770 771 usb_log_ info("Polling keyboard...\n");771 usb_log_debug("Polling keyboard...\n"); 772 772 773 773 if (!kbd_dev->initialized) { … … 907 907 * Initialize device (get and process descriptors, get address, etc.) 908 908 */ 909 usb_log_ info("Initializing USB/HID KBD device...\n");909 usb_log_debug("Initializing USB/HID KBD device...\n"); 910 910 911 911 usbhid_kbd_t *kbd_dev = usbhid_kbd_new(); … … 926 926 } 927 927 928 usb_log_ info("USB/HID KBD device structure initialized.\n");928 usb_log_debug("USB/HID KBD device structure initialized.\n"); 929 929 930 930 /* … … 937 937 rc = ddf_fun_bind(kbd_fun); 938 938 if (rc != EOK) { 939 usb_log_error("Could not bind DDF function.\n"); 939 usb_log_error("Could not bind DDF function: %s.\n", 940 str_error(rc)); 940 941 // TODO: Can / should I destroy the DDF function? 941 942 ddf_fun_destroy(kbd_fun); … … 946 947 rc = ddf_fun_add_to_class(kbd_fun, "keyboard"); 947 948 if (rc != EOK) { 948 usb_log_error("Could not add DDF function to class 'keyboard'" 949 "\n"); 949 usb_log_error( 950 "Could not add DDF function to class 'keyboard': %s.\n", 951 str_error(rc)); 950 952 // TODO: Can / should I destroy the DDF function? 951 953 ddf_fun_destroy(kbd_fun); … … 959 961 fid_t fid = fibril_create(usbhid_kbd_fibril, kbd_dev); 960 962 if (fid == 0) { 961 usb_log_error("Failed to start fibril for KBD device\n"); 963 usb_log_error("Failed to start fibril for `%s' device.\n", 964 dev->name); 962 965 return ENOMEM; 963 966 } -
uspace/drv/usbhid/main.c
r434ef65 rce794342 39 39 #include <usb/debug.h> 40 40 #include <errno.h> 41 #include <str_error.h> 41 42 42 43 #include "kbddev.h" … … 64 65 65 66 if (rc != EOK) { 66 usb_log_info("Device is not a supported keyboard.\n"); 67 usb_log_error("Failed to add HID device.\n"); 68 return EREFUSED; 67 usb_log_warning("Device is not a supported keyboard.\n"); 68 usb_log_error("Failed to add HID device: %s.\n", 69 str_error(rc)); 70 return rc; 69 71 } 70 72 73 usb_log_info("Keyboard `%s' ready to use.\n", dev->name); 74 71 75 return EOK; 72 76 } … … 89 93 int main(int argc, char *argv[]) 90 94 { 91 usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME); 95 printf(NAME ": HelenOS USB HID driver.\n"); 96 97 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 98 92 99 return ddf_driver_main(&kbd_driver); 93 100 } -
uspace/drv/usbhub/main.c
r434ef65 rce794342 76 76 printf(NAME ": HelenOS USB hub driver.\n"); 77 77 78 usb_log_enable(USB_LOG_LEVEL_DE BUG, NAME);78 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 79 79 80 80 return usb_driver_main(&usb_hub_driver); -
uspace/drv/usbhub/usbhub.c
r434ef65 rce794342 132 132 return opResult; 133 133 } 134 usb_log_ info("setting port count to %d\n",descriptor->ports_count);134 usb_log_debug("setting port count to %d\n",descriptor->ports_count); 135 135 hub_info->port_count = descriptor->ports_count; 136 136 hub_info->attached_devs = (usb_hc_attached_device_t*) … … 159 159 usb_standard_device_descriptor_t *std_descriptor 160 160 = &hub_info->usb_device->descriptors.device; 161 usb_log_ info("hub has %d configurations\n",161 usb_log_debug("hub has %d configurations\n", 162 162 std_descriptor->configuration_count); 163 163 if(std_descriptor->configuration_count<1){ … … 290 290 //if this hub already uses default address, it cannot request it once more 291 291 if(hub->is_default_address_used) return; 292 usb_log_ info("some connection changed\n");292 usb_log_debug("some connection changed\n"); 293 293 assert(hub->control_pipe->hc_phone); 294 294 int opResult = usb_hub_clear_port_feature(hub->control_pipe, … … 333 333 334 334 int opResult; 335 usb_log_ info("finalizing add device\n");335 usb_log_debug("finalizing add device\n"); 336 336 opResult = usb_hub_clear_port_feature(hub->control_pipe, 337 337 port, USB_HUB_FEATURE_C_PORT_RESET); … … 365 365 return; 366 366 } 367 usb_log_ info("setting new address %d\n",new_device_address);367 usb_log_debug("setting new address %d\n",new_device_address); 368 368 //opResult = usb_drv_req_set_address(hc, USB_ADDRESS_DEFAULT, 369 369 // new_device_address); … … 405 405 return; 406 406 } 407 usb_log_info("new device address %d, handle %zu\n", 407 usb_log_info("Detected new device on `%s' (port %d), " \ 408 "address %d (handle %llu).\n", 409 hub->usb_device->ddf_dev->name, (int) port, 408 410 new_device_address, child_handle); 409 410 411 } 411 412 … … 504 505 if (usb_port_connect_change(&status)) { 505 506 if (usb_port_dev_connected(&status)) { 506 usb_log_ info("some connection changed\n");507 usb_log_debug("some connection changed\n"); 507 508 usb_hub_init_add_device(hub, port, usb_port_speed(&status)); 508 509 } else { … … 516 517 usb_hub_over_current(hub,port); 517 518 }else{ 518 usb_log_ info("over current condition was auto-resolved on port %d\n",519 usb_log_debug("over current condition was auto-resolved on port %d\n", 519 520 port); 520 521 } … … 522 523 //port reset 523 524 if (usb_port_reset_completed(&status)) { 524 usb_log_ info("port reset complete\n");525 usb_log_debug("port reset complete\n"); 525 526 if (usb_port_enabled(&status)) { 526 527 usb_hub_finalize_add_device(hub, port, usb_port_speed(&status)); -
uspace/drv/usbmid/main.c
r434ef65 rce794342 106 106 printf(NAME ": USB multi interface device driver.\n"); 107 107 108 usb_log_enable(USB_LOG_LEVEL_ INFO, NAME);108 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 109 109 return ddf_driver_main(&mid_driver); 110 110 } -
uspace/drv/usbmouse/main.c
r434ef65 rce794342 90 90 int main(int argc, char *argv[]) 91 91 { 92 usb_log_enable(USB_LOG_LEVEL_DE BUG, NAME);92 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 93 93 94 94 return usb_driver_main(&mouse_driver); -
uspace/drv/vhc/hcd.c
r434ef65 rce794342 122 122 //sleep(5); 123 123 124 usb_log_enable(USB_LOG_LEVEL_DE BUG, NAME);124 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 125 125 126 126 printf(NAME ": virtual USB host controller driver.\n"); -
uspace/lib/usb/include/usb/debug.h
r434ef65 rce794342 79 79 } usb_log_level_t; 80 80 81 /** Default log level. */ 82 #define USB_LOG_LEVEL_DEFAULT USB_LOG_LEVEL_DEBUG 83 81 84 82 85 void usb_log_enable(usb_log_level_t, const char *);
Note:
See TracChangeset
for help on using the changeset viewer.