Changes in uspace/drv/bus/usb/usbhub/usbhub.h [ae3a941:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/usbhub.h
rae3a941 rb7fd2a0 2 2 * Copyright (c) 2010 Vojtech Horky 3 3 * Copyright (c) 2011 Vojtech Horky 4 * Copyright (c) 2018 Ondrej Hlavaty, Petr Manek5 4 * All rights reserved. 6 5 * … … 40 39 41 40 #include <ddf/driver.h> 42 #include <fibril_synch.h>43 41 44 42 #include <usb/classes/hub.h> … … 46 44 #include <usb/dev/pipes.h> 47 45 #include <usb/dev/driver.h> 48 #include <usb/dev/poll.h> 46 47 #include <fibril_synch.h> 49 48 50 49 #define NAME "usbhub" 51 50 52 51 #include "port.h" 53 #include "status.h"54 52 55 53 /** Information about attached hub. */ … … 59 57 /** Port structures, one for each port */ 60 58 usb_hub_port_t *ports; 61 /** Speed of the hub */62 usb_speed_t speed;63 59 /** Generic usb device data*/ 64 60 usb_device_t *usb_device; 65 /** Data polling handle. */ 66 usb_polling_t polling; 61 62 /** Number of pending operations on the mutex to prevent shooting 63 * ourselves in the foot. 64 * When the hub is disconnected but we are in the middle of some 65 * operation, we cannot destroy this structure right away because 66 * the pending operation might use it. 67 */ 68 size_t pending_ops_count; 69 /** Guard for pending_ops_count. */ 70 fibril_mutex_t pending_ops_mutex; 71 /** Condition variable for pending_ops_count. */ 72 fibril_condvar_t pending_ops_cv; 67 73 /** Pointer to usbhub function. */ 68 74 ddf_fun_t *hub_fun; 69 /** Device communication pipe.*/70 usb_pipe_t *control_pipe;75 /** Status indicator */ 76 bool running; 71 77 /** Hub supports port power switching. */ 72 78 bool power_switched; 73 79 /** Each port is switched individually. */ 74 80 bool per_port_power; 75 /** Whether MTT is available */76 bool mtt_available;77 81 }; 78 82 79 extern const usb_endpoint_description_t *usb_hub_endpoints [];83 extern const usb_endpoint_description_t hub_status_change_endpoint_description; 80 84 81 e rrno_t usb_hub_device_add(usb_device_t *);82 e rrno_t usb_hub_device_remove(usb_device_t *);83 e rrno_t usb_hub_device_gone(usb_device_t *);85 extern errno_t usb_hub_device_add(usb_device_t *); 86 extern errno_t usb_hub_device_remove(usb_device_t *); 87 extern errno_t usb_hub_device_gone(usb_device_t *); 84 88 85 errno_t usb_hub_set_depth(const usb_hub_dev_t *); 86 errno_t usb_hub_get_port_status(const usb_hub_dev_t *, size_t, 87 usb_port_status_t *); 88 errno_t usb_hub_set_port_feature(const usb_hub_dev_t *, size_t, 89 usb_hub_class_feature_t); 90 errno_t usb_hub_clear_port_feature(const usb_hub_dev_t *, size_t, 91 usb_hub_class_feature_t); 92 93 bool hub_port_changes_callback(usb_device_t *, uint8_t *, size_t, void *); 94 95 errno_t usb_hub_reserve_default_address(usb_hub_dev_t *, async_exch_t *, 96 usb_port_t *); 97 errno_t usb_hub_release_default_address(usb_hub_dev_t *, async_exch_t *); 89 extern bool hub_port_changes_callback(usb_device_t *, uint8_t *, size_t, 90 void *); 98 91 99 92 #endif
Note:
See TracChangeset
for help on using the changeset viewer.