Changeset 92f924c8 in mainline
- Timestamp:
- 2011-01-07T13:27:58Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7bd34e5
- Parents:
- 28f660d
- Location:
- uspace
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/Makefile
r28f660d r92f924c8 38 38 root_hub/port_status.c \ 39 39 root_hub/root_hub.c \ 40 uhci.c 40 uhci.c \ 41 utils/hc_synchronizer.c 41 42 42 43 include $(USPACE_PREFIX)/Makefile.common -
uspace/drv/uhci/root_hub/port.c
r28f660d r92f924c8 1 1 2 #include <atomic.h> 3 #include <errno.h> 2 4 #include <usb/devreq.h> 3 5 #include <usb/usb.h> 4 #include <errno.h>5 6 6 7 #include "debug.h" … … 8 9 #include "port.h" 9 10 #include "port_status.h" 11 #include "utils/hc_synchronizer.h" 10 12 11 13 struct usb_match { … … 104 106 pio_write_16( port->address, port_status.raw_value ); 105 107 106 uhci_print_info( "Enabled port %d.\n", port );108 uhci_print_info( "Enabled port %d.\n", port->number ); 107 109 return EOK; 108 110 } … … 191 193 /* get new address */ 192 194 const usb_address_t usb_address = 193 usb_address_keeping_request( &uhci_instance->address_manager ); 195 usb_address_keeping_request(&uhci_instance->address_manager); 196 197 if (usb_address <= 0) { 198 return usb_address; 199 } 194 200 195 201 /* assign new address */ 196 202 usb_target_t new_device = { USB_ADDRESS_DEFAULT, 0 }; 197 usb_device_request_setup_packet_t data; 203 usb_device_request_setup_packet_t data = 204 { 205 .request_type = 0, 206 .request = USB_DEVREQ_SET_ADDRESS, 207 { .value = usb_address }, 208 .index = 0, 209 .length = 0 210 }; 211 212 sync_value_t value; 198 213 199 214 uhci_setup( 200 hc, new_device, USB_TRANSFER_CONTROL, &data, sizeof(data), NULL, NULL ); 201 uhci_print_verbose( "address assignment sent, waiting to complete.\n" ); 202 215 hc, new_device, USB_TRANSFER_CONTROL, &data, sizeof(data), 216 sync_out_callback, (void*)&value ); 217 uhci_print_verbose("address assignment sent, waiting to complete.\n"); 218 219 // sync_wait_for(&value); 203 220 204 221 uhci_print_info( "Assigned address %#x.\n", usb_address ); -
uspace/drv/uhci/root_hub/root_hub.c
r28f660d r92f924c8 26 26 /* add fibrils for periodic port checks */ 27 27 unsigned i = 0; 28 for (; i < UHCI_ROOT_HUB_PORT_COUNT; ++i) {28 for (; i < UHCI_ROOT_HUB_PORT_COUNT; ++i) { 29 29 /* mind pointer arithmetics */ 30 30 uhci_port_init( … … 37 37 } 38 38 fibril_add_ready(hub->checker[i]); 39 uhci_print_verbose(" added fibril for port %d: %p.\n", i, hub->checker[i]); 39 40 } 40 41 -
uspace/drv/uhci/uhci.c
r28f660d r92f924c8 89 89 usb_str_transfer_type(transfer_type), 90 90 size); 91 // callback( dev, USB_OUTCOME_OK, arg ); 91 92 92 93 return ENOTSUP; -
uspace/lib/usb/include/usb/devreq.h
r28f660d r92f924c8 70 70 /** Main parameter to the request. */ 71 71 union { 72 uint16_t value; 72 73 /* FIXME: add #ifdefs according to host endianess */ 73 74 struct { … … 75 76 uint8_t value_high; 76 77 }; 77 uint16_t value;78 78 }; 79 79 /** Auxiliary parameter to the request.
Note:
See TracChangeset
for help on using the changeset viewer.