Changeset 4046c1ea in mainline for uspace/drv/uhci/root_hub/port.c


Ignore:
Timestamp:
2011-01-29T00:14:07Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1431e8f
Parents:
b3258ad (diff), 44d8853 (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 parent branch

File:
1 edited

Legend:

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

    rb3258ad r4046c1ea  
    4444                        if (port_status & STATUS_CONNECTED) {
    4545                                /* new device */
    46                                 port_status |= STATUS_IN_RESET;
    47                                 port_status_write(port_instance->address, port_status);
    48                                 async_usleep(1000);
    49                                 port_status =
    50                                         port_status_read(port_instance->address);
    51                                 port_status &= ~STATUS_IN_RESET;
    52                                 port_status_write(port_instance->address, port_status);
    5346                                uhci_port_new_device(port_instance);
    5447                        } else {
     
    7972                return usb_address;
    8073        }
     74        /*
     75         * the host then waits for at least 100 ms to allow completion of
     76         * an insertion process and for power at the device to become stable.
     77         */
     78        async_usleep(100000);
    8179
    8280        /* enable port */
    8381        uhci_port_set_enabled(port, true);
     82
     83        /* The hub maintains the reset signal to that port for 10 ms
     84         * (See Section 11.5.1.5)
     85         */
     86        port_status_t port_status =
     87                port_status_read(port->address);
     88        port_status |= STATUS_IN_RESET;
     89        port_status_write(port->address, port_status);
     90        async_usleep(10000);
     91        port_status =
     92                port_status_read(port->address);
     93        port_status &= ~STATUS_IN_RESET;
     94        port_status_write(port->address, port_status);
    8495
    8596        /* assign address to device */
Note: See TracChangeset for help on using the changeset viewer.