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