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


Ignore:
Timestamp:
2011-04-07T20:22:40Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fee6381
Parents:
61257f4 (diff), a82889e (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:

Changes from development

File:
1 edited

Legend:

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

    r61257f4 rf8e8738  
    4343#include "port.h"
    4444
     45static int uhci_port_check(void *port);
     46static int uhci_port_reset_enable(int portno, void *arg);
    4547static int uhci_port_new_device(uhci_port_t *port, usb_speed_t speed);
    4648static int uhci_port_remove_device(uhci_port_t *port);
    4749static int uhci_port_set_enabled(uhci_port_t *port, bool enabled);
    48 static int uhci_port_check(void *port);
    49 static int uhci_port_reset_enable(int portno, void *arg);
    5050static void uhci_port_print_status(
    5151    uhci_port_t *port, const port_status_t value);
     
    7474        pio_write_16(port->address, value);
    7575}
    76 
    7776/*----------------------------------------------------------------------------*/
    7877/** Initialize UHCI root hub port instance.
     
    259258
    260259        usb_address_t dev_addr;
    261         int rc = usb_hc_new_device_wrapper(port->rh, &port->hc_connection,
     260        int ret = usb_hc_new_device_wrapper(port->rh, &port->hc_connection,
    262261            speed, uhci_port_reset_enable, port->number, port,
    263262            &dev_addr, &port->attached_device, NULL, NULL, NULL);
    264263
    265         if (rc != EOK) {
     264        if (ret != EOK) {
    266265                usb_log_error("%s: Failed(%d) to add device: %s.\n",
    267                     port->id_string, rc, str_error(rc));
     266                    port->id_string, ret, str_error(ret));
    268267                uhci_port_set_enabled(port, false);
    269                 return rc;
     268                return ret;
    270269        }
    271270
     
    287286int uhci_port_remove_device(uhci_port_t *port)
    288287{
    289         usb_log_error("%s: Don't know how to remove device %d.\n",
    290             port->id_string, (unsigned int)port->attached_device);
    291         return EOK;
     288        usb_log_error("%s: Don't know how to remove device %llu.\n",
     289            port->id_string, port->attached_device);
     290        return ENOTSUP;
    292291}
    293292/*----------------------------------------------------------------------------*/
     
    341340            (value & STATUS_CONNECTED_CHANGED) ? " CONNECTED-CHANGE," : "",
    342341            (value & STATUS_CONNECTED) ? " CONNECTED," : "",
    343             (value & STATUS_ALWAYS_ONE) ? " ALWAYS ONE" : " ERROR: NO ALWAYS ONE"
     342            (value & STATUS_ALWAYS_ONE) ? " ALWAYS ONE" : " ERR: NO ALWAYS ONE"
    344343        );
    345344}
Note: See TracChangeset for help on using the changeset viewer.