Changes in / [64a36e2:c372e03] in mainline
- Location:
- uspace/drv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/root_hub.c
r64a36e2 rc372e03 110 110 static const uint32_t hub_clear_feature_valid_mask = 111 111 (1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER) | 112 112 (1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT); 113 113 114 114 /** … … 123 123 static const uint32_t hub_set_feature_valid_mask = 124 124 (1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT) | 125 125 (1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER); 126 126 127 127 /** … … 136 136 static const uint32_t port_set_feature_valid_mask = 137 137 (1 << USB_HUB_FEATURE_PORT_ENABLE) | 138 139 140 138 (1 << USB_HUB_FEATURE_PORT_SUSPEND) | 139 (1 << USB_HUB_FEATURE_PORT_RESET) | 140 (1 << USB_HUB_FEATURE_PORT_POWER); 141 141 142 142 /** … … 145 145 static const uint32_t port_clear_feature_valid_mask = 146 146 (1 << USB_HUB_FEATURE_PORT_CONNECTION) | 147 148 149 150 151 152 153 154 147 (1 << USB_HUB_FEATURE_PORT_SUSPEND) | 148 (1 << USB_HUB_FEATURE_PORT_OVER_CURRENT) | 149 (1 << USB_HUB_FEATURE_PORT_POWER) | 150 (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) | 151 (1 << USB_HUB_FEATURE_C_PORT_ENABLE) | 152 (1 << USB_HUB_FEATURE_C_PORT_SUSPEND) | 153 (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) | 154 (1 << USB_HUB_FEATURE_C_PORT_RESET); 155 155 //note that USB_HUB_FEATURE_PORT_POWER bit is translated into 156 156 //USB_HUB_FEATURE_PORT_LOW_SPEED … … 161 161 static const uint32_t port_status_change_mask = 162 162 (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) | 163 164 165 166 163 (1 << USB_HUB_FEATURE_C_PORT_ENABLE) | 164 (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) | 165 (1 << USB_HUB_FEATURE_C_PORT_RESET) | 166 (1 << USB_HUB_FEATURE_C_PORT_SUSPEND); 167 167 168 168 -
uspace/drv/usbhub/usbhub.c
r64a36e2 rc372e03 71 71 72 72 static void usb_hub_process_global_interrupt(usb_hub_info_t * hub_info); 73 74 static void usb_hub_polling_terminted_callback(usb_device_t * device,75 bool was_error, void * data);76 73 77 74 … … 354 351 rc = usb_device_auto_poll(hub_info->usb_device, 0, 355 352 hub_port_changes_callback, ((hub_info->port_count + 1) / 8) + 1, 356 usb_hub_polling_terminted_callback, hub_info);353 NULL, hub_info); 357 354 if (rc != EOK) { 358 355 usb_log_error("Failed to create polling fibril: %s.\n", … … 492 489 493 490 /** 494 * callback called from hub polling fibril when the fibril terminates495 *496 * Should perform a cleanup - deletes hub_info.497 * @param device usb device afected498 * @param was_error indicates that the fibril is stoped due to an error499 * @param data pointer to usb_hub_info_t structure500 */501 static void usb_hub_polling_terminted_callback(usb_device_t * device,502 bool was_error, void * data){503 usb_hub_info_t * hub_info = data;504 if(!hub_info) return;505 free(hub_info->ports);506 free(hub_info);507 }508 509 510 511 512 /**513 491 * @} 514 492 */
Note:
See TracChangeset
for help on using the changeset viewer.