Changes in / [969585f:c6ba274] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/usbhub.c
r969585f rc6ba274 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.