Changes in uspace/drv/bus/usb/usbhub/port.c [c4f7bf6:e882e3a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/port.c
rc4f7bf6 re882e3a 34 34 */ 35 35 36 #include < stdbool.h>36 #include <bool.h> 37 37 #include <errno.h> 38 38 #include <str_error.h> … … 70 70 return EOK; 71 71 } 72 72 /*----------------------------------------------------------------------------*/ 73 73 /** 74 74 * Clear feature on hub port. … … 92 92 sizeof(clear_request), NULL, 0); 93 93 } 94 94 /*----------------------------------------------------------------------------*/ 95 95 /** 96 96 * Set feature on hub port. … … 114 114 sizeof(clear_request), NULL, 0); 115 115 } 116 116 /*----------------------------------------------------------------------------*/ 117 117 /** 118 118 * Mark reset process as failed due to external reasons … … 129 129 fibril_mutex_unlock(&port->mutex); 130 130 } 131 131 /*----------------------------------------------------------------------------*/ 132 132 /** 133 133 * Process interrupts on given port … … 143 143 usb_log_debug("Interrupt at port %zu\n", port->port_number); 144 144 145 usb_port_status_t status = 0;145 usb_port_status_t status; 146 146 const int opResult = get_port_status(port, &status); 147 147 if (opResult != EOK) { … … 245 245 port->port_number, status); 246 246 } 247 247 /*----------------------------------------------------------------------------*/ 248 248 /** 249 249 * routine called when a device on port has been removed … … 299 299 return EOK; 300 300 } 301 301 /*----------------------------------------------------------------------------*/ 302 302 /** 303 303 * Process port reset change … … 335 335 } 336 336 } 337 337 /*----------------------------------------------------------------------------*/ 338 338 /** Retrieve port status. 339 339 * … … 352 352 .request = USB_HUB_REQUEST_GET_STATUS, 353 353 .value = 0, 354 .index = uint16_host2usb(port->port_number),354 .index = port->port_number, 355 355 .length = sizeof(usb_port_status_t), 356 356 }; … … 375 375 return EOK; 376 376 } 377 377 /*----------------------------------------------------------------------------*/ 378 378 /** Callback for enabling a specific port. 379 379 * … … 407 407 return port->reset_okay ? EOK : ESTALL; 408 408 } 409 409 /*----------------------------------------------------------------------------*/ 410 410 /** Fibril for adding a new device. 411 411 * … … 436 436 usb_log_info("Detected new device on `%s' (port %zu), " 437 437 "address %d (handle %" PRIun ").\n", 438 ddf_dev_get_name(data->hub->usb_device->ddf_dev), 439 data->port->port_number, new_address, 440 ddf_fun_get_handle(child_fun)); 438 data->hub->usb_device->ddf_dev->name, 439 data->port->port_number, new_address, child_fun->handle); 441 440 } else { 442 441 usb_log_error("Failed registering device on port %zu: %s.\n", … … 455 454 return rc; 456 455 } 457 456 /*----------------------------------------------------------------------------*/ 458 457 /** Start device adding when connection change is detected. 459 458 *
Note:
See TracChangeset
for help on using the changeset viewer.