• Felipe Balbi's avatar
    usb: gadget: composite: correctly initialize ep->maxpacket · caf106f8
    Felipe Balbi authored
    commit e8f29bb7 upstream.
    
    usb_endpoint_maxp() returns wMaxPacketSize in its
    raw form. Without taking into consideration that it
    also contains other bits reserved for isochronous
    endpoints.
    
    This patch fixes one occasion where this is a
    problem by making sure that we initialize
    ep->maxpacket only with lower 10 bits of the value
    returned by usb_endpoint_maxp(). Note that seperate
    patches will be necessary to audit all call sites of
    usb_endpoint_maxp() and make sure that
    usb_endpoint_maxp() only returns lower 10 bits of
    wMaxPacketSize.
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    caf106f8
composite.c 58.5 KB