Changeset e68de30 in mainline


Ignore:
Timestamp:
2011-01-28T23:30:37Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
44d8853
Parents:
f0e25e8
Message:

Fixed: use proper device enumeration procedure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci/root_hub/port.c

    rf0e25e8 re68de30  
    3737                        if (port_status & STATUS_CONNECTED) {
    3838                                /* new device */
    39                                 port_status |= STATUS_IN_RESET;
    40                                 port_status_write(port_instance->address, port_status);
    41                                 async_usleep(1000);
    42                                 port_status =
    43                                         port_status_read(port_instance->address);
    44                                 port_status &= ~STATUS_IN_RESET;
    45                                 port_status_write(port_instance->address, port_status);
    4639                                uhci_port_new_device(port_instance);
    4740                        } else {
     
    7265                return usb_address;
    7366        }
     67        /*
     68         * the host then waits for at least 100 ms to allow completion of
     69         * an insertion process and for power at the device to become stable.
     70         */
     71        async_usleep(100000);
    7472
    7573        /* enable port */
    7674        uhci_port_set_enabled(port, true);
     75
     76        /* The hub maintains the reset signal to that port for 10 ms
     77         * (See Section 11.5.1.5)
     78         */
     79        port_status_t port_status =
     80                port_status_read(port->address);
     81        port_status |= STATUS_IN_RESET;
     82        port_status_write(port->address, port_status);
     83        async_usleep(10000);
     84        port_status =
     85                port_status_read(port->address);
     86        port_status &= ~STATUS_IN_RESET;
     87        port_status_write(port->address, port_status);
    7788
    7889        /* assign address to device */
Note: See TracChangeset for help on using the changeset viewer.