• Alan Stern's avatar
    USB: serial drivers need to use larger bulk-in buffers · 969e3033
    Alan Stern authored
    When a driver doesn't know how much data a device is going to send,
    the buffer size should be at least as big as the endpoint's maxpacket
    value.  The serial drivers don't follow this rule; many of them
    request only 256-byte bulk-in buffers.  As a result, they suffer
    overflow errors if a high-speed device wants to send a lot of data,
    because high-speed bulk endpoints are required to have a maxpacket
    size of 512.
    
    This patch (as1450) fixes the problem by using the driver's
    bulk_in_size value as a minimum, always allocating buffers no smaller
    than the endpoint's maxpacket size.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Tested-by: default avatarFlynn Marquardt <flynn@flynnux.de>
    CC: <stable@kernel.org> [after .39-rc1 is out]
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    969e3033
usb-serial.c 37.7 KB