Changeset 0c00dac in mainline


Ignore:
Timestamp:
2011-02-18T13:36:52Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
026d6e2, 50ba203, b6c7da6
Parents:
ec59693 (diff), 6427cf67 (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 low/high speed hack

Location:
uspace
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/iface.c

    rec59693 r0c00dac  
    5454}
    5555/*----------------------------------------------------------------------------*/
    56 static int reserve_default_address(device_t *dev)
     56static int reserve_default_address(device_t *dev, bool full_speed)
    5757{
    5858        assert(dev);
     
    7272}
    7373/*----------------------------------------------------------------------------*/
    74 static int request_address(device_t *dev, usb_address_t *address)
     74static int request_address(device_t *dev, bool full_speed,
     75    usb_address_t *address)
    7576{
    7677        assert(dev);
  • uspace/drv/uhci-rhd/port.c

    rec59693 r0c00dac  
    140140
    141141        /* get address of the future device */
    142         const usb_address_t usb_address = usb_hc_request_address(&port->hc_connection);
     142        const usb_address_t usb_address = usb_hc_request_address(
     143            &port->hc_connection, true);
    143144
    144145        if (usb_address <= 0) {
     
    150151
    151152        /* get default address */
    152         int ret = usb_hc_reserve_default_address(&port->hc_connection);
     153        int ret = usb_hc_reserve_default_address(&port->hc_connection, true);
    153154        if (ret != EOK) {
    154155                usb_log_error("Failed to reserve default address on port %d.\n",
  • uspace/drv/vhc/connhost.c

    rec59693 r0c00dac  
    390390
    391391
    392 static int reserve_default_address(device_t *dev)
     392static int reserve_default_address(device_t *dev, bool ignored)
    393393{
    394394        usb_address_keeping_reserve_default(&addresses);
     
    402402}
    403403
    404 static int request_address(device_t *dev, usb_address_t *address)
     404static int request_address(device_t *dev, bool ignored, usb_address_t *address)
    405405{
    406406        usb_address_t addr = usb_address_keeping_request(&addresses);
  • uspace/lib/drv/generic/remote_usbhc.c

    rec59693 r0c00dac  
    165165                return;
    166166        }
    167 
    168         int rc = usb_iface->reserve_default_address(device);
     167       
     168        bool full_speed = DEV_IPC_GET_ARG1(*call);
     169       
     170        int rc = usb_iface->reserve_default_address(device, full_speed);
    169171
    170172        async_answer_0(callid, rc);
     
    195197                return;
    196198        }
     199       
     200        bool full_speed = DEV_IPC_GET_ARG1(*call);
    197201
    198202        usb_address_t address;
    199         int rc = usb_iface->request_address(device, &address);
     203        int rc = usb_iface->request_address(device, full_speed, &address);
    200204        if (rc != EOK) {
    201205                async_answer_0(callid, rc);
  • uspace/lib/drv/include/usbhc_iface.h

    rec59693 r0c00dac  
    4040#include "driver.h"
    4141#include <usb/usb.h>
     42#include <bool.h>
    4243
    4344
     
    231232        int (*tell_address)(device_t *, devman_handle_t, usb_address_t *);
    232233
    233         int (*reserve_default_address)(device_t *);
     234        int (*reserve_default_address)(device_t *, bool);
    234235        int (*release_default_address)(device_t *);
    235         int (*request_address)(device_t *, usb_address_t *);
     236        int (*request_address)(device_t *, bool, usb_address_t *);
    236237        int (*bind_address)(device_t *, usb_address_t, devman_handle_t);
    237238        int (*release_address)(device_t *, usb_address_t);
  • uspace/lib/usb/include/usb/hub.h

    rec59693 r0c00dac  
    5252} usb_hc_attached_device_t;
    5353
    54 int usb_hc_reserve_default_address(usb_hc_connection_t *);
     54int usb_hc_reserve_default_address(usb_hc_connection_t *, bool);
    5555int usb_hc_release_default_address(usb_hc_connection_t *);
    5656
    57 usb_address_t usb_hc_request_address(usb_hc_connection_t *);
     57usb_address_t usb_hc_request_address(usb_hc_connection_t *, bool);
    5858int usb_hc_register_device(usb_hc_connection_t *,
    5959    const usb_hc_attached_device_t *);
  • uspace/lib/usb/src/hub.c

    rec59693 r0c00dac  
    5555 * @return Error code.
    5656 */
    57 int usb_hc_reserve_default_address(usb_hc_connection_t *connection)
     57int usb_hc_reserve_default_address(usb_hc_connection_t *connection,
     58    bool full_speed)
    5859{
    5960        CHECK_CONNECTION(connection);
    6061
    61         return async_req_1_0(connection->hc_phone,
     62        return async_req_2_0(connection->hc_phone,
    6263            DEV_IFACE_ID(USBHC_DEV_IFACE),
    63             IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS);
     64            IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS, full_speed);
    6465}
    6566
     
    8384 * @return Assigned USB address or negative error code.
    8485 */
    85 usb_address_t usb_hc_request_address(usb_hc_connection_t *connection)
     86usb_address_t usb_hc_request_address(usb_hc_connection_t *connection,
     87    bool full_speed)
    8688{
    8789        CHECK_CONNECTION(connection);
    8890
    8991        sysarg_t address;
    90         int rc = async_req_1_1(connection->hc_phone,
     92        int rc = async_req_2_1(connection->hc_phone,
    9193            DEV_IFACE_ID(USBHC_DEV_IFACE),
    92             IPC_M_USBHC_REQUEST_ADDRESS, &address);
     94            IPC_M_USBHC_REQUEST_ADDRESS, full_speed,
     95            &address);
    9396        if (rc != EOK) {
    9497                return (usb_address_t) rc;
Note: See TracChangeset for help on using the changeset viewer.