Changeset a9c7c6f in mainline for uspace/drv/usbhub/usbhub.c
- Timestamp:
- 2011-04-01T15:08:45Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c6ba274
- Parents:
- 03eea27
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/usbhub.c
r03eea27 ra9c7c6f 332 332 } 333 333 } 334 /// \TODO this is just a debug code 335 for(port=1;port<=descriptor->ports_count;++port){ 336 bool is_non_removable = 337 ((non_removable_dev_bitmap[port/8]) >> (port%8)) %2; 338 if(is_non_removable){ 339 usb_log_debug("port %d is non-removable\n",port); 340 usb_port_status_t status; 341 size_t rcvd_size; 342 usb_device_request_setup_packet_t request; 343 //int opResult; 344 usb_hub_set_port_status_request(&request, port); 345 //endpoint 0 346 opResult = usb_pipe_control_read( 347 hub->control_pipe, 348 &request, sizeof(usb_device_request_setup_packet_t), 349 &status, 4, &rcvd_size 350 ); 351 if (opResult != EOK) { 352 usb_log_error("could not get port status %d\n",opResult); 353 } 354 if (rcvd_size != sizeof (usb_port_status_t)) { 355 usb_log_error("received status has incorrect size\n"); 356 } 357 //something connected/disconnected 358 if (usb_port_connect_change(&status)) { 359 usb_log_debug("some connection changed\n"); 360 } 361 usb_log_debug("status: %s\n",usb_debug_str_buffer( 362 (uint8_t *)&status,4,4)); 363 } 364 } 334 365 return EOK; 335 366 }
Note:
See TracChangeset
for help on using the changeset viewer.