Changes in uspace/drv/bus/usb/usbhub/usbhub.h [34d750c:d15797d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/usbhub.h
r34d750c rd15797d 39 39 40 40 #include <ddf/driver.h> 41 #include <fibril_synch.h>42 41 43 42 #include <usb/classes/hub.h> … … 45 44 #include <usb/dev/pipes.h> 46 45 #include <usb/dev/driver.h> 47 #include <usb/dev/poll.h> 46 47 #include <fibril_synch.h> 48 48 49 49 #define NAME "usbhub" 50 50 51 51 #include "port.h" 52 #include "status.h"53 52 54 53 /** Information about attached hub. */ … … 58 57 /** Port structures, one for each port */ 59 58 usb_hub_port_t *ports; 60 /** Speed of the hub */61 usb_speed_t speed;62 59 /** Generic usb device data*/ 63 60 usb_device_t *usb_device; 64 /** Data polling handle. */ 65 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; 66 73 /** Pointer to usbhub function. */ 67 74 ddf_fun_t *hub_fun; 68 /** Device communication pipe.*/69 usb_pipe_t *control_pipe;75 /** Status indicator */ 76 bool running; 70 77 /** Hub supports port power switching. */ 71 78 bool power_switched; 72 79 /** Each port is switched individually. */ 73 80 bool per_port_power; 74 /** Whether MTT is available */75 bool mtt_available;76 81 }; 77 82 78 extern const usb_endpoint_description_t *usb_hub_endpoints [];83 extern const usb_endpoint_description_t hub_status_change_endpoint_description; 79 84 80 int usb_hub_device_add(usb_device_t *);81 int usb_hub_device_remove(usb_device_t *);82 int usb_hub_device_gone(usb_device_t *);85 extern int usb_hub_device_add(usb_device_t *); 86 extern int usb_hub_device_remove(usb_device_t *); 87 extern int usb_hub_device_gone(usb_device_t *); 83 88 84 int usb_hub_set_depth(const usb_hub_dev_t *); 85 int usb_hub_get_port_status(const usb_hub_dev_t *, size_t, usb_port_status_t *); 86 int usb_hub_set_port_feature(const usb_hub_dev_t *, size_t, usb_hub_class_feature_t); 87 int usb_hub_clear_port_feature(const usb_hub_dev_t *, size_t, usb_hub_class_feature_t); 88 89 bool hub_port_changes_callback(usb_device_t *, uint8_t *, size_t, void *); 90 91 int usb_hub_reserve_default_address(usb_hub_dev_t *, async_exch_t *, usb_port_t *); 92 int 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 *); 93 91 94 92 #endif
Note:
See TracChangeset
for help on using the changeset viewer.