Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhub/port.c

    re882e3a rc4f7bf6  
    3434 */
    3535
    36 #include <bool.h>
     36#include <stdbool.h>
    3737#include <errno.h>
    3838#include <str_error.h>
     
    7070        return EOK;
    7171}
    72 /*----------------------------------------------------------------------------*/
     72
    7373/**
    7474 * Clear feature on hub port.
     
    9292            sizeof(clear_request), NULL, 0);
    9393}
    94 /*----------------------------------------------------------------------------*/
     94
    9595/**
    9696 * Set feature on hub port.
     
    114114            sizeof(clear_request), NULL, 0);
    115115}
    116 /*----------------------------------------------------------------------------*/
     116
    117117/**
    118118 * Mark reset process as failed due to external reasons
     
    129129        fibril_mutex_unlock(&port->mutex);
    130130}
    131 /*----------------------------------------------------------------------------*/
     131
    132132/**
    133133 * Process interrupts on given port
     
    143143        usb_log_debug("Interrupt at port %zu\n", port->port_number);
    144144
    145         usb_port_status_t status;
     145        usb_port_status_t status = 0;
    146146        const int opResult = get_port_status(port, &status);
    147147        if (opResult != EOK) {
     
    245245            port->port_number, status);
    246246}
    247 /*----------------------------------------------------------------------------*/
     247
    248248/**
    249249 * routine called when a device on port has been removed
     
    299299        return EOK;
    300300}
    301 /*----------------------------------------------------------------------------*/
     301
    302302/**
    303303 * Process port reset change
     
    335335        }
    336336}
    337 /*----------------------------------------------------------------------------*/
     337
    338338/** Retrieve port status.
    339339 *
     
    352352                .request = USB_HUB_REQUEST_GET_STATUS,
    353353                .value = 0,
    354                 .index = port->port_number,
     354                .index = uint16_host2usb(port->port_number),
    355355                .length = sizeof(usb_port_status_t),
    356356        };
     
    375375        return EOK;
    376376}
    377 /*----------------------------------------------------------------------------*/
     377
    378378/** Callback for enabling a specific port.
    379379 *
     
    407407        return port->reset_okay ? EOK : ESTALL;
    408408}
    409 /*----------------------------------------------------------------------------*/
     409
    410410/** Fibril for adding a new device.
    411411 *
     
    436436                usb_log_info("Detected new device on `%s' (port %zu), "
    437437                    "address %d (handle %" PRIun ").\n",
    438                     data->hub->usb_device->ddf_dev->name,
    439                     data->port->port_number, new_address, child_fun->handle);
     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));
    440441        } else {
    441442                usb_log_error("Failed registering device on port %zu: %s.\n",
     
    454455        return rc;
    455456}
    456 /*----------------------------------------------------------------------------*/
     457
    457458/** Start device adding when connection change is detected.
    458459 *
Note: See TracChangeset for help on using the changeset viewer.