Changeset 013e4ca4 in mainline


Ignore:
Timestamp:
2011-02-25T19:58:25Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2d33eb5
Parents:
4d37c42
Message:

Increase debug verbosity

Location:
uspace/drv/uhci-rhd
Files:
3 edited

Legend:

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

    r4d37c42 r013e4ca4  
    116116int main(int argc, char *argv[])
    117117{
    118         usb_log_enable(USB_LOG_LEVEL_INFO, NAME);
     118        usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME);
    119119        return ddf_driver_main(&uhci_rh_driver);
    120120}
  • uspace/drv/uhci-rhd/port.c

    r4d37c42 r013e4ca4  
    5050static int uhci_port_set_enabled(uhci_port_t *port, bool enabled);
    5151static int uhci_port_check(void *port);
     52static int new_device_enable_port(int portno, void *arg);
    5253
    5354int uhci_port_init(
     
    9293        assert(port_instance);
    9394
    94         /* disable port, to avoid device confusion */
    95         uhci_port_set_enabled(port, false);
    96 
    9795        while (1) {
    9896                /* read register value */
     
    109107
    110108                if (port_status & STATUS_CONNECTED_CHANGED) {
     109                        usb_log_debug("Change detected on port %d.\n", port_instance->number);
    111110                        int rc = usb_hc_connection_open(
    112111                            &port_instance->hc_connection);
     
    118117                        /* remove any old device */
    119118                        if (port_instance->attached_device) {
     119                                usb_log_debug("Removing device on port %d.\n",
     120                                    port_instance->number);
    120121                                uhci_port_remove_device(port_instance);
    121122                        }
     123
     124                        usb_log_debug("Change status erased on port %d.\n",
     125                            port_instance->number);
     126                        port_status_write(port_instance->address, STATUS_CONNECTED_CHANGED);
    122127
    123128                        if (port_status & STATUS_CONNECTED) {
    124129                                /* new device */
    125130                                uhci_port_new_device(port_instance);
    126                         } else {
    127                                 port_status_write(port_instance->address, STATUS_CONNECTED_CHANGED);
    128131                        }
    129132
     
    159162        async_usleep(100000);
    160163
    161         /* Enable the port. */
    162         uhci_port_set_enabled(port, true);
    163164
    164165        /* The hub maintains the reset signal to that port for 10 ms
     
    181182        }
    182183
     184        /* Enable the port. */
     185        uhci_port_set_enabled(port, true);
     186
    183187        return EOK;
    184188}
  • uspace/drv/uhci-rhd/root_hub.h

    r4d37c42 r013e4ca4  
    4141
    4242#define UHCI_ROOT_HUB_PORT_COUNT 2
    43 #define UHCI_ROOT_HUB_PORT_REGISTERS_OFFSET 0x10
    44 #define ROOT_HUB_WAIT_USEC 10000000 /* 10 seconds */
     43#define ROOT_HUB_WAIT_USEC 5000000 /* 5 seconds */
    4544
    4645typedef struct root_hub {
Note: See TracChangeset for help on using the changeset viewer.