Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 6de2d766 in mainline for uspace/lib/usbdev/src/pipesinit.c


Ignore:
Timestamp:
2012-07-20T18:14:55Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
b828907, be67118
Parents:
7030bc9 (diff), 32260a0 (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 USB branch.

USB should be endian agnostic now.
OHCI and pci work on qemu powerpc, but pci locks up on real hw.
Hopefully no regressions on amd64/ia32.
Tested on qemu and Virtualbox.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/pipesinit.c

    r7030bc9 r6de2d766  
    154154    usb_endpoint_mapping_t *mapping, size_t mapping_count,
    155155    usb_standard_interface_descriptor_t *interface,
    156     usb_standard_endpoint_descriptor_t *endpoint,
     156    usb_standard_endpoint_descriptor_t *endpoint_desc,
    157157    usb_device_connection_t *wire)
    158158{
     
    163163
    164164        /* Actual endpoint number is in bits 0..3 */
    165         const usb_endpoint_t ep_no = endpoint->endpoint_address & 0x0F;
     165        const usb_endpoint_t ep_no = endpoint_desc->endpoint_address & 0x0F;
    166166
    167167        const usb_endpoint_description_t description = {
    168168                /* Endpoint direction is set by bit 7 */
    169                 .direction = (endpoint->endpoint_address & 128)
     169                .direction = (endpoint_desc->endpoint_address & 128)
    170170                    ? USB_DIRECTION_IN : USB_DIRECTION_OUT,
    171171                /* Transfer type is in bits 0..2 and
    172172                 * the enum values corresponds 1:1 */
    173                 .transfer_type = endpoint->attributes & 3,
     173                .transfer_type = endpoint_desc->attributes & 3,
    174174
    175175                /* Get interface characteristics. */
     
    194194
    195195        int rc = usb_pipe_initialize(&ep_mapping->pipe, wire,
    196             ep_no, description.transfer_type, endpoint->max_packet_size,
     196            ep_no, description.transfer_type,
     197            uint16_usb2host(endpoint_desc->max_packet_size),
    197198            description.direction);
    198199        if (rc != EOK) {
     
    201202
    202203        ep_mapping->present = true;
    203         ep_mapping->descriptor = endpoint;
     204        ep_mapping->descriptor = endpoint_desc;
    204205        ep_mapping->interface = interface;
    205206
Note: See TracChangeset for help on using the changeset viewer.