Ignore:
Timestamp:
2011-10-31T16:50:31Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
07a7a97d
Parents:
f37eb84
Message:

usb: Don't pass speed info when registering endpoint.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_usbhc.c

    rf37eb84 r27736cf  
    5555static remote_iface_func_ptr_t remote_usbhc_iface_ops[] = {
    5656        [IPC_M_USBHC_REQUEST_ADDRESS] = remote_usbhc_request_address,
     57        [IPC_M_USBHC_RELEASE_ADDRESS] = remote_usbhc_release_address,
    5758        [IPC_M_USBHC_BIND_ADDRESS] = remote_usbhc_bind_address,
    5859        [IPC_M_USBHC_GET_HANDLE_BY_ADDRESS] = remote_usbhc_find_by_address,
    59         [IPC_M_USBHC_RELEASE_ADDRESS] = remote_usbhc_release_address,
    6060
    6161        [IPC_M_USBHC_REGISTER_ENDPOINT] = remote_usbhc_register_endpoint,
     
    234234
    235235#define _INIT_FROM_HIGH_DATA2(type, var, arg_no) \
    236         type var = (type) DEV_IPC_GET_ARG##arg_no(*call) / (1 << 16)
     236        type var = (type) (DEV_IPC_GET_ARG##arg_no(*call) >> 16)
    237237#define _INIT_FROM_LOW_DATA2(type, var, arg_no) \
    238         type var = (type) DEV_IPC_GET_ARG##arg_no(*call) % (1 << 16)
    239 #define _INIT_FROM_HIGH_DATA3(type, var, arg_no) \
    240         type var = (type) DEV_IPC_GET_ARG##arg_no(*call) / (1 << 16)
    241 #define _INIT_FROM_MIDDLE_DATA3(type, var, arg_no) \
    242         type var = (type) (DEV_IPC_GET_ARG##arg_no(*call) / (1 << 8)) % (1 << 8)
    243 #define _INIT_FROM_LOW_DATA3(type, var, arg_no) \
    244         type var = (type) DEV_IPC_GET_ARG##arg_no(*call) % (1 << 8)
     238        type var = (type) (DEV_IPC_GET_ARG##arg_no(*call) & 0xffff)
    245239
    246240        const usb_target_t target = { .packed = DEV_IPC_GET_ARG1(*call) };
    247241
    248         _INIT_FROM_HIGH_DATA3(usb_speed_t, speed, 2);
    249         _INIT_FROM_MIDDLE_DATA3(usb_transfer_type_t, transfer_type, 2);
    250         _INIT_FROM_LOW_DATA3(usb_direction_t, direction, 2);
     242        _INIT_FROM_HIGH_DATA2(usb_transfer_type_t, transfer_type, 2);
     243        _INIT_FROM_LOW_DATA2(usb_direction_t, direction, 2);
    251244
    252245        _INIT_FROM_HIGH_DATA2(size_t, max_packet_size, 3);
     
    255248#undef _INIT_FROM_HIGH_DATA2
    256249#undef _INIT_FROM_LOW_DATA2
    257 #undef _INIT_FROM_HIGH_DATA3
    258 #undef _INIT_FROM_MIDDLE_DATA3
    259 #undef _INIT_FROM_LOW_DATA3
    260 
    261         int rc = usb_iface->register_endpoint(fun, target.address, speed,
     250
     251        int rc = usb_iface->register_endpoint(fun, target.address,
    262252            target.endpoint, transfer_type, direction, max_packet_size, interval);
    263253
Note: See TracChangeset for help on using the changeset viewer.