Changes in uspace/drv/bus/usb/usbhub/port.h [96323d2:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/port.h
r96323d2 r9d58539 37 37 38 38 #include <usb/dev/driver.h> 39 #include <usb/dev/hub.h> 39 40 #include <usb/classes/hub.h> 40 #include <usb_iface.h>41 41 42 42 typedef struct usb_hub_dev usb_hub_dev_t; … … 44 44 /** Information about single port on a hub. */ 45 45 typedef struct { 46 /* *Port number as reported in descriptors. */47 unsignedport_number;46 /* Port number as reported in descriptors. */ 47 size_t port_number; 48 48 /** Device communication pipe. */ 49 49 usb_pipe_t *control_pipe; … … 52 52 /** CV for waiting to port reset completion. */ 53 53 fibril_condvar_t reset_cv; 54 /** Port reset status.54 /** Whether port reset is completed. 55 55 * Guarded by @c reset_mutex. 56 56 */ 57 enum { 58 NO_RESET, 59 IN_RESET, 60 RESET_OK, 61 RESET_FAIL, 62 } reset_status; 63 /** Device reported to USB bus driver */ 64 bool device_attached; 57 bool reset_completed; 58 /** Whether to announce the port reset as successful. */ 59 bool reset_okay; 60 61 /** Information about attached device. */ 62 usb_hub_attached_device_t attached_device; 65 63 } usb_hub_port_t; 66 64 … … 69 67 * @param port Port to be initialized. 70 68 */ 71 static inline void usb_hub_port_init(usb_hub_port_t *port, unsignedport_number,69 static inline void usb_hub_port_init(usb_hub_port_t *port, size_t port_number, 72 70 usb_pipe_t *control_pipe) 73 71 { 74 72 assert(port); 73 port->attached_device.address = -1; 74 port->attached_device.fun = NULL; 75 75 port->port_number = port_number; 76 76 port->control_pipe = control_pipe; 77 port->reset_status = NO_RESET;78 port->device_attached = false;79 77 fibril_mutex_initialize(&port->mutex); 80 78 fibril_condvar_initialize(&port->reset_cv);
Note:
See TracChangeset
for help on using the changeset viewer.