Changeset 58563585 in mainline for uspace/drv/bus/usb/usbhub
- Timestamp:
- 2016-08-31T11:15:39Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 10cb47e
- Parents:
- 7a67416
- Location:
- uspace/drv/bus/usb/usbhub
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/port.c
r7a67416 r58563585 27 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 */ 29 29 30 /** @addtogroup drvusbhub 30 31 * @{ … … 175 176 } else { 176 177 /* Handle the case we were in reset */ 177 // usb_hub_port_reset_fail(port);178 // FIXME: usb_hub_port_reset_fail(port); 178 179 /* If enabled change was reported leave the removal 179 180 * to that handler, it shall ACK the change too. */ … … 186 187 /* Enable change, ports are automatically disabled on errors. */ 187 188 if (status & USB_HUB_PORT_C_STATUS_ENABLED) { 188 // TODO: maybe HS reset failed?189 // TODO: maybe HS reset failed? 189 190 usb_log_info("(%p-%u): Port disabled because of errors.\n", hub, 190 191 port->port_number); -
uspace/drv/bus/usb/usbhub/port.h
r7a67416 r58563585 27 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 */ 29 29 30 /** @addtogroup drvusbhub 30 31 * @{ … … 33 34 * Hub ports related functions. 34 35 */ 36 35 37 #ifndef DRV_USBHUB_PORT_H 36 38 #define DRV_USBHUB_PORT_H … … 45 47 typedef struct { 46 48 /** Port number as reported in descriptors. */ 47 unsigned port_number;49 unsigned int port_number; 48 50 /** Device communication pipe. */ 49 51 usb_pipe_t *control_pipe; … … 69 71 * @param port Port to be initialized. 70 72 */ 71 static inline void usb_hub_port_init(usb_hub_port_t *port, unsigned port_number,72 u sb_pipe_t *control_pipe)73 static inline void usb_hub_port_init(usb_hub_port_t *port, 74 unsigned int port_number, usb_pipe_t *control_pipe) 73 75 { 74 76 assert(port); … … 80 82 fibril_condvar_initialize(&port->reset_cv); 81 83 } 84 82 85 int usb_hub_port_fini(usb_hub_port_t *port, usb_hub_dev_t *hub); 83 86 int usb_hub_port_clear_feature( … … 89 92 90 93 #endif 94 91 95 /** 92 96 * @} -
uspace/drv/bus/usb/usbhub/status.h
r7a67416 r58563585 27 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 */ 29 29 30 /** @addtogroup drvusbhub 30 31 * @{ … … 114 115 } 115 116 116 #endif /* HUB_STATUS_H */ 117 #endif 118 117 119 /** 118 120 * @} -
uspace/drv/bus/usb/usbhub/usbhub.c
r7a67416 r58563585 27 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 */ 29 29 30 /** @addtogroup drvusbhub 30 31 * @{ … … 56 57 57 58 #define HUB_FNC_NAME "hub" 59 58 60 /** Hub status-change endpoint description. 59 61 * … … 229 231 uint8_t *change_bitmap, size_t change_bitmap_size, void *arg) 230 232 { 231 // usb_log_debug("hub_port_changes_callback\n");232 233 usb_hub_dev_t *hub = arg; 233 234 assert(hub); … … 314 315 hub_dev->per_port_power ? "per port" : "ganged"); 315 316 316 for (unsigned port = 0; port < hub_dev->port_count; ++port) {317 for (unsigned int port = 0; port < hub_dev->port_count; ++port) { 317 318 usb_log_debug("(%p): Powering port %u.", hub_dev, port); 318 319 const int ret = usb_hub_port_set_feature( -
uspace/drv/bus/usb/usbhub/usbhub.h
r7a67416 r58563585 27 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 */ 29 29 30 /** @addtogroup drvusbhub 30 31 * @{ … … 33 34 * @brief Hub driver. 34 35 */ 36 35 37 #ifndef DRV_USBHUB_USBHUB_H 36 38 #define DRV_USBHUB_USBHUB_H … … 82 84 extern const usb_endpoint_description_t hub_status_change_endpoint_description; 83 85 84 int usb_hub_device_add(usb_device_t *usb_dev);85 int usb_hub_device_remove(usb_device_t *usb_dev);86 int usb_hub_device_gone(usb_device_t *usb_dev);86 extern int usb_hub_device_add(usb_device_t *); 87 extern int usb_hub_device_remove(usb_device_t *); 88 extern int usb_hub_device_gone(usb_device_t *); 87 89 88 bool hub_port_changes_callback(usb_device_t *dev,89 uint8_t *change_bitmap, size_t change_bitmap_size, void *arg);90 extern bool hub_port_changes_callback(usb_device_t *, uint8_t *, size_t, 91 void *); 90 92 91 93 #endif 94 92 95 /** 93 96 * @}
Note:
See TracChangeset
for help on using the changeset viewer.