Changeset eb1a2f4 in mainline for uspace/drv/usbhub
- Timestamp:
- 2011-02-22T23:30:56Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b5d1535, a9c674e0
- Parents:
- dbe25f1 (diff), 664af708 (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/drv/usbhub
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/main.c
rdbe25f1 reb1a2f4 31 31 */ 32 32 33 #include <d river.h>33 #include <ddf/driver.h> 34 34 #include <errno.h> 35 35 #include <async.h> … … 62 62 int main(int argc, char *argv[]) 63 63 { 64 usb_log_enable(USB_LOG_LEVEL_ INFO, NAME);64 usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME); 65 65 66 66 fibril_mutex_initialize(&usb_hub_list_lock); … … 77 77 fibril_add_ready(fid); 78 78 79 return d river_main(&hub_driver);79 return ddf_driver_main(&hub_driver); 80 80 } 81 81 -
uspace/drv/usbhub/usbhub.c
rdbe25f1 reb1a2f4 33 33 */ 34 34 35 #include <d river.h>35 #include <ddf/driver.h> 36 36 #include <bool.h> 37 37 #include <errno.h> … … 52 52 #include "usb/classes/classes.h" 53 53 54 static d evice_ops_t hub_device_ops = {54 static ddf_dev_ops_t hub_device_ops = { 55 55 .interfaces[USB_DEV_IFACE] = &usb_iface_hub_impl 56 56 }; … … 79 79 */ 80 80 static int usb_hub_init_communication(usb_hub_info_t * hub){ 81 usb_log_debug("Initializing hub USB communication (hub->device->handle=%zu).\n", hub->device->handle); 81 82 int opResult; 82 83 opResult = usb_device_connection_initialize_from_device( … … 88 89 return opResult; 89 90 } 91 usb_log_debug("Initializing USB wire abstraction.\n"); 90 92 opResult = usb_hc_connection_initialize_from_device(&hub->connection, 91 93 hub->device); … … 95 97 return opResult; 96 98 } 99 usb_log_debug("Initializing default control pipe.\n"); 97 100 opResult = usb_endpoint_pipe_initialize_default_control(&hub->endpoints.control, 98 101 &hub->device_connection); … … 222 225 * @return pointer to created structure or NULL in case of error 223 226 */ 224 usb_hub_info_t * usb_create_hub_info(d evice_t * device) {227 usb_hub_info_t * usb_create_hub_info(ddf_dev_t * device) { 225 228 usb_hub_info_t* result = usb_new(usb_hub_info_t); 226 229 result->device = device; … … 291 294 * @return 292 295 */ 293 int usb_add_hub_device(d evice_t *dev) {296 int usb_add_hub_device(ddf_dev_t *dev) { 294 297 dprintf(USB_LOG_LEVEL_INFO, "add_hub_device(handle=%d)", (int) dev->handle); 295 298 296 dev->ops = &hub_device_ops; 299 //dev->ops = &hub_device_ops; 300 (void) hub_device_ops; 297 301 298 302 usb_hub_info_t * hub_info = usb_create_hub_info(dev); … … 450 454 //?? 451 455 opResult = usb_device_register_child_in_devman(new_device_address, 452 hub->connection.hc_handle, hub->device, &child_handle); 456 hub->connection.hc_handle, hub->device, &child_handle, 457 NULL, NULL, NULL); 453 458 454 459 if (opResult != EOK) { -
uspace/drv/usbhub/usbhub.h
rdbe25f1 reb1a2f4 38 38 #include <ipc/devman.h> 39 39 #include <usb/usb.h> 40 #include <d river.h>40 #include <ddf/driver.h> 41 41 42 42 #define NAME "usbhub" … … 63 63 //usb_hcd_attached_device_info_t * usb_device; 64 64 /** General device info*/ 65 d evice_t * device;65 ddf_dev_t * device; 66 66 /** connection to hcd */ 67 67 //usb_device_connection_t connection; … … 84 84 * @return Error code. 85 85 */ 86 int usb_add_hub_device(d evice_t *dev);86 int usb_add_hub_device(ddf_dev_t *dev); 87 87 88 88 /** -
uspace/drv/usbhub/usbhub_private.h
rdbe25f1 reb1a2f4 42 42 #include <adt/list.h> 43 43 #include <bool.h> 44 #include <d river.h>44 #include <ddf/driver.h> 45 45 #include <fibril_synch.h> 46 46 … … 76 76 * @return 77 77 */ 78 usb_hub_info_t * usb_create_hub_info(d evice_t * device);78 usb_hub_info_t * usb_create_hub_info(ddf_dev_t * device); 79 79 80 80 /** List of hubs maanged by this driver */ -
uspace/drv/usbhub/utils.c
rdbe25f1 reb1a2f4 33 33 * @brief various utilities 34 34 */ 35 #include <d river.h>35 #include <ddf/driver.h> 36 36 #include <bool.h> 37 37 #include <errno.h>
Note:
See TracChangeset
for help on using the changeset viewer.
