Changeset d09f3720 in mainline for uspace/drv/uhci-rhd/port.c


Ignore:
Timestamp:
2011-05-19T15:20:48Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4939490
Parents:
df44fa2 (diff), 7941bd6 (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:

Development changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-rhd/port.c

    rdf44fa2 rd09f3720  
    3636#include <errno.h>
    3737#include <str_error.h>
     38#include <time.h>
     39#include <async.h>
    3840
    3941#include <usb/usb.h>    /* usb_address_t */
    40 #include <usb/hub.h>    /* usb_hc_new_device_wrapper */
     42#include <usb/dev/hub.h>    /* usb_hc_new_device_wrapper */
    4143#include <usb/debug.h>
    4244
     
    6567 *
    6668 * @param[in] port Structure to use.
    67  * @param[in] value New register value.
     69 * @param[in] val New register value.
    6870 * @return Error code. (Always EOK)
    6971 */
     
    7779 *
    7880 * @param[in] port Memory structure to use.
    79  * @param[in] addr Address of I/O register.
     81 * @param[in] address Address of I/O register.
    8082 * @param[in] number Port number.
    8183 * @param[in] usec Polling interval.
     
    224226                uhci_port_write_status(port, port_status);
    225227                while (uhci_port_read_status(port) & STATUS_IN_RESET);
    226                 // TODO: find a better way to waste time (it should be less than
    227                 // 10ms, if we reschedule it takes too much time (random
    228                 // interrupts can be solved by multiple attempts).
    229                 usb_log_debug2("%s: Reset Signal stop.\n", port->id_string);
    230         }
     228        }
     229        /* PIO delay, should not be longer than 3ms as the device might
     230         * enter suspend state. */
     231        udelay(10);
    231232        /* Enable the port. */
    232233        uhci_port_set_enabled(port, true);
    233 
    234         /* Reset recovery period,
    235          * devices do not have to respond during this period
    236          */
    237         async_usleep(10000);
    238234        return EOK;
    239235}
Note: See TracChangeset for help on using the changeset viewer.