Changeset 096a1ff in mainline for uspace/drv/uhci/root_hub/port.c
- Timestamp:
- 2011-01-28T23:54:15Z (12 years ago)
- Branches:
- lfn, master, serial
- Children:
- 5935fe4c
- Parents:
- f0e25e8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/root_hub/port.c
rf0e25e8 r096a1ff 1 1 2 2 #include <errno.h> 3 #include <str_error.h> 3 4 //#include <usb/devreq.h> /* for usb_device_request_setup_packet_t */ 4 5 #include <usb/usb.h> … … 22 23 23 24 while (1) { 24 uhci_print_info("Port(%d) status address %p:\n", 25 port_instance->number, port_instance->address); 26 27 /* read register value */ 25 /* Read port status. */ 28 26 port_status_t port_status = 29 27 port_status_read(port_instance->address); 30 28 31 /* debug print */ 32 uhci_print_info("Port(%d) status %#.4x:\n", 33 port_instance->number, port_status); 34 print_port_status(port_status); 29 uhci_print_info("Port %d: %04X (@ 0x%x) = " \ 30 "%s,%s,%s,%s,[%s,%s],%s,%s,%s,%s\n", 31 port_instance->number, port_status, port_instance->address, 32 UHCI_GET_STR_FLAG(port_status, STATUS_SUSPEND, "suspend", "up"), 33 UHCI_GET_STR_FLAG(port_status, STATUS_IN_RESET, "in reset", "-"), 34 UHCI_GET_STR_FLAG(port_status, STATUS_LOW_SPEED, "lowsp", "fullsp"), 35 UHCI_GET_STR_FLAG(port_status, STATUS_RESUME, "resume", "k-state"), 36 UHCI_GET_STR_FLAG(port_status, STATUS_LINE_D_MINUS, "D- on", "D- off"), 37 UHCI_GET_STR_FLAG(port_status, STATUS_LINE_D_PLUS, "D+ on", "D+ off"), 38 UHCI_GET_STR_FLAG(port_status, STATUS_ENABLED_CHANGED, "enblchg", "-"), 39 UHCI_GET_STR_FLAG(port_status, STATUS_ENABLED, "enabled", "disabled"), 40 UHCI_GET_STR_FLAG(port_status, STATUS_CONNECTED_CHANGED, "connchg", "-"), 41 UHCI_GET_STR_FLAG(port_status, STATUS_CONNECTED, "hasdev", "nodev")); 35 42 36 43 if (port_status & STATUS_CONNECTED_CHANGED) { … … 81 88 82 89 if (ret != EOK) { /* address assigning went wrong */ 83 uhci_print_error("Failed(%d) to assign address to the device.\n", ret); 90 uhci_print_error("Failed to assign address (port %d): %s.\n", 91 port->number, str_error(ret)); 84 92 uhci_port_set_enabled(port, false); 85 93 usb_address_keeping_release_default(&uhci_instance->address_manager);
Note: See TracChangeset
for help on using the changeset viewer.