Changeset 7dfc06fa in mainline for uspace/lib/drv


Ignore:
Timestamp:
2011-04-08T18:08:46Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c6cb76d
Parents:
c1b1944
Message:

Do not send max packet size with each transfer

See ticket #177, #121 and partly #49.

Location:
uspace/lib/drv
Files:
2 edited

Legend:

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

    rc1b1944 r7dfc06fa  
    270270        }
    271271
    272         size_t max_packet_size = DEV_IPC_GET_ARG3(*call);
    273272        usb_target_t target = {
    274273                .address = DEV_IPC_GET_ARG1(*call),
     
    300299        trans->size = len;
    301300
    302         rc = transfer_func(fun, target, max_packet_size,
     301        rc = transfer_func(fun, target,
    303302            buffer, len,
    304303            callback_out, trans);
     
    326325        }
    327326
    328         size_t max_packet_size = DEV_IPC_GET_ARG3(*call);
    329327        usb_target_t target = {
    330328                .address = DEV_IPC_GET_ARG1(*call),
     
    348346        trans->size = len;
    349347
    350         int rc = transfer_func(fun, target, max_packet_size,
     348        int rc = transfer_func(fun, target,
    351349            trans->buffer, len,
    352350            callback_in, trans);
     
    414412        };
    415413        size_t data_buffer_len = DEV_IPC_GET_ARG3(*call);
    416         size_t max_packet_size = DEV_IPC_GET_ARG4(*call);
    417414
    418415        int rc;
     
    450447        trans->size = data_buffer_len;
    451448
    452         rc = usb_iface->control_write(fun, target, max_packet_size,
     449        rc = usb_iface->control_write(fun, target,
    453450            setup_packet, setup_packet_len,
    454451            data_buffer, data_buffer_len,
     
    477474                .endpoint = DEV_IPC_GET_ARG2(*call)
    478475        };
    479         size_t max_packet_size = DEV_IPC_GET_ARG3(*call);
    480476
    481477        int rc;
     
    515511        }
    516512
    517         rc = usb_iface->control_read(fun, target, max_packet_size,
     513        rc = usb_iface->control_read(fun, target,
    518514            setup_packet, setup_packet_len,
    519515            trans->buffer, trans->size,
  • uspace/lib/drv/include/usbhc_iface.h

    rc1b1944 r7dfc06fa  
    6666 *   - argument #1 is target address
    6767 *   - argument #2 is target endpoint
    68  *   - argument #3 is max packet size of the endpoint
    6968 * - this call is immediately followed by IPC data read (async version)
    7069 * - the call is not answered until the device returns some data (or until
     
    202201
    203202/** Out transfer processing function prototype. */
    204 typedef int (*usbhc_iface_transfer_out_t)(ddf_fun_t *, usb_target_t, size_t,
     203typedef int (*usbhc_iface_transfer_out_t)(ddf_fun_t *, usb_target_t,
    205204    void *, size_t,
    206205    usbhc_iface_transfer_out_callback_t, void *);
     
    210209
    211210/** In transfer processing function prototype. */
    212 typedef int (*usbhc_iface_transfer_in_t)(ddf_fun_t *, usb_target_t, size_t,
     211typedef int (*usbhc_iface_transfer_in_t)(ddf_fun_t *, usb_target_t,
    213212    void *, size_t,
    214213    usbhc_iface_transfer_in_callback_t, void *);
     
    234233
    235234        int (*control_write)(ddf_fun_t *, usb_target_t,
    236             size_t,
    237235            void *, size_t, void *, size_t,
    238236            usbhc_iface_transfer_out_callback_t, void *);
    239237
    240238        int (*control_read)(ddf_fun_t *, usb_target_t,
    241             size_t,
    242239            void *, size_t, void *, size_t,
    243240            usbhc_iface_transfer_in_callback_t, void *);
Note: See TracChangeset for help on using the changeset viewer.