Changeset 1110ebd in mainline


Ignore:
Timestamp:
2011-02-03T11:16:43Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cd50486
Parents:
9d4579e
Message:

Remove default control pipe initialization

It is nonsense as this pipe must be initialized to retrieve
the configuration descriptor used for initialization of other
endpoints.

Location:
uspace/lib/usb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/pipes.h

    r9d4579e r1110ebd  
    8080} usb_endpoint_pipe_t;
    8181
    82 /** Flag for default control pipe. */
    83 #define USB_ENDPOINT_DESCRIPTION_DEFAULT_CONTROL_PIPE 1
    8482
    8583/** Description of endpoint characteristics. */
     
    9391        /** Interface subclass this endpoint belongs to (-1 for any). */
    9492        int interface_subclass;
    95         /** Interface protocol this endpoint belogs to (-1 for any). */
     93        /** Interface protocol this endpoint belongs to (-1 for any). */
    9694        int interface_protocol;
    9795        /** Extra endpoint flags. */
  • uspace/lib/usb/src/pipesinit.c

    r9d4579e r1110ebd  
    7777    usb_endpoint_description_t *found)
    7878{
    79         /* Default control pipe is never mentioned in endpoint descriptors. */
    80         if (wanted->flags & USB_ENDPOINT_DESCRIPTION_DEFAULT_CONTROL_PIPE) {
    81                 return false;
    82         }
    83 
    8479#define _SAME(fieldname) ((wanted->fieldname) == (found->fieldname))
    8580
     
    251246 *   configuration
    252247 * - @c descriptor will point inside the configuration descriptor to endpoint
    253  *   corresponding to given description (or NULL for not found descriptor or
    254  *   for default control pipe)
     248 *   corresponding to given description (or NULL for not found descriptor)
    255249 * - @c interface will point inside the configuration descriptor to interface
    256250 *   descriptor the endpoint @c descriptor belongs to (or NULL for not found
     
    322316        } while (interface != NULL);
    323317
    324         /*
    325          * Find default control pipe and initialize it as well.
    326          */
    327         for (i = 0; i < mapping_count; i++) {
    328                 if (mapping[i].description->flags
    329                     & USB_ENDPOINT_DESCRIPTION_DEFAULT_CONTROL_PIPE) {
    330                         int rc = usb_endpoint_pipe_initialize_default_control(
    331                             mapping[i].pipe, connection);
    332                         if (rc == EOK) {
    333                                 mapping[i].present = true;
    334                         }
    335                 }
    336         }
    337 
    338318        return EOK;
    339319}
Note: See TracChangeset for help on using the changeset viewer.