Changeset 37f7cfe in mainline for uspace/drv/vhc/hub.c


Ignore:
Timestamp:
2010-12-13T01:11:27Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
75732da, a9b6bec
Parents:
682b697 (diff), f9a0cef (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge vojtechhorky/ - hub driver and VHC fixes

The hub driver shall be working by now. At least a bit.

File:
1 edited

Legend:

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

    r682b697 r37f7cfe  
    144144        .ops = &hub_ops,
    145145        .descriptors = &descriptors,
    146         .lib_debug_level = 1,
     146        .lib_debug_level = 0,
    147147        .lib_debug_enabled_tags = USBVIRT_DEBUGTAG_ALL
    148148};
     
    181181                hub_port_t *port = &hub_dev.ports[i];
    182182               
    183                 port->index = (int) i;
     183                port->index = (int) i + 1;
    184184                port->device = NULL;
    185185                port->state = HUB_PORT_STATE_NOT_CONFIGURED;
    186186                port->status_change = 0;
     187                fibril_mutex_initialize(&port->guard);
    187188        }
    188189       
     
    225226        for (i = 0; i < HUB_PORT_COUNT; i++) {
    226227                hub_port_t *port = &hub_dev.ports[i];
     228                fibril_mutex_lock(&port->guard);
    227229               
    228230                if (port->device != NULL) {
     231                        fibril_mutex_unlock(&port->guard);
    229232                        continue;
    230233                }
     
    241244                //if (port->state == HUB_PORT_STATE_DISCONNECTED) {
    242245                        port->state = HUB_PORT_STATE_DISABLED;
    243                         set_port_status_change(port, HUB_STATUS_C_PORT_CONNECTION);
     246                        set_port_status_change_nl(port, HUB_STATUS_C_PORT_CONNECTION);
    244247                //}
    245248               
     249                fibril_mutex_unlock(&port->guard);
     250
    246251                return i;
    247252        }
Note: See TracChangeset for help on using the changeset viewer.