Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/hub/hub.c

    r6cb58e6 r0f21c0c  
    3434 */
    3535#include <usb/classes/classes.h>
     36#include <usbvirt/hub.h>
    3637#include <usbvirt/device.h>
    3738#include <errno.h>
    3839#include <str_error.h>
    39 #include <assert.h>
    4040#include <stdlib.h>
    41 #include <ddf/driver.h>
    42 #include <usb/debug.h>
     41#include <driver.h>
    4342
    4443#include "hub.h"
     
    9695 * @param index Port index (one based).
    9796 */
    98 static void hub_init_port(hub_port_t *port, hub_t *hub, size_t index)
     97static void hub_init_port(hub_port_t *port, size_t index)
    9998{
    10099        port->connected_device = NULL;
     
    102101        port->state = HUB_PORT_STATE_NOT_CONFIGURED;
    103102        port->status_change = 0;
    104         port->hub = hub;
    105103}
    106104
     
    113111        size_t i;
    114112        for (i = 0; i < HUB_PORT_COUNT; i++) {
    115                 hub_init_port(&hub->ports[i], hub, i + 1);
     113                hub_init_port(&hub->ports[i], i + 1);
    116114        }
    117115        hub->custom_data = NULL;
    118         hub->signal_changes = true;
    119116        fibril_mutex_initialize(&hub->guard);
    120117}
     
    231228        }
    232229
    233         usb_log_debug("Setting port %zu to state %d.\n", port_index, state);
    234 
    235230        switch (state) {
    236231                case HUB_PORT_STATE_POWERED_OFF:
     
    240235                        break;
    241236                case HUB_PORT_STATE_RESUMING:
    242                         port->state = state;
    243237                        set_port_state_delayed(hub, port_index,
    244238                            10, state, HUB_PORT_STATE_ENABLED);
    245239                        break;
    246240                case HUB_PORT_STATE_RESETTING:
    247                         port->state = state;
    248241                        set_port_state_delayed(hub, port_index,
    249242                            10, state, HUB_PORT_STATE_ENABLED);
     
    421414{
    422415        assert(port != NULL);
    423         uint16_t old_value = port->status_change;
    424416        port->status_change |= change;
    425         usb_log_debug("Changing status change on %zu: %04x => %04x\n",
    426             port->index,
    427             (unsigned int) old_value, (unsigned int) port->status_change);
    428         port->hub->signal_changes = true;
    429417}
    430418
     
    439427        assert(port != NULL);
    440428        port->status_change &= (~change);
    441         port->hub->signal_changes = true;
    442429}
    443430
Note: See TracChangeset for help on using the changeset viewer.