Changeset 0fde1d5 in mainline


Ignore:
Timestamp:
2011-02-25T20:55:51Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5f183dc
Parents:
cabda7f
Message:

properly report low speed devices

File:
1 edited

Legend:

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

    rcabda7f r0fde1d5  
    4646#include "port_status.h"
    4747
    48 static int uhci_port_new_device(uhci_port_t *port);
     48static int uhci_port_new_device(uhci_port_t *port, uint16_t status);
    4949static int uhci_port_remove_device(uhci_port_t *port);
    5050static int uhci_port_set_enabled(uhci_port_t *port, bool enabled);
     
    122122                        }
    123123
     124                        port_status_write(port_instance->address, STATUS_CONNECTED_CHANGED);
    124125                        usb_log_debug("Change status erased on port %d.\n",
    125126                            port_instance->number);
    126                         port_status_write(port_instance->address, STATUS_CONNECTED_CHANGED);
    127127
    128128                        if (port_status & STATUS_CONNECTED) {
    129129                                /* new device */
    130                                 uhci_port_new_device(port_instance);
     130                                uhci_port_new_device(port_instance, port_status);
    131131                        }
    132132
     
    189189
    190190/*----------------------------------------------------------------------------*/
    191 static int uhci_port_new_device(uhci_port_t *port)
     191static int uhci_port_new_device(uhci_port_t *port, uint16_t status)
    192192{
    193193        assert(port);
     
    198198        usb_address_t dev_addr;
    199199        int rc = usb_hc_new_device_wrapper(port->rh, &port->hc_connection,
    200             USB_SPEED_FULL,
     200            ((status & STATUS_LOW_SPEED) != 0) ? USB_SPEED_LOW : USB_SPEED_FULL,
    201201            new_device_enable_port, port->number, port,
    202202            &dev_addr, &port->attached_device, NULL, NULL, NULL);
Note: See TracChangeset for help on using the changeset viewer.