source: trunk/target/linux/generic/patches-2.6.36/801-usb_serial_endpoint_size.patch @ 25580

Last change on this file since 25580 was 25580, checked in by florian, 6 years ago

[kernel] update to kernel 2.6.36.4

File size: 983 bytes
  • drivers/usb/serial/usb-serial.c

    a b static struct usb_driver usb_serial_driv 
    6262   drivers depend on it. 
    6363*/ 
    6464 
     65static ushort maxSize = 0; 
    6566static int debug; 
    6667/* initially all NULL */ 
    6768static struct usb_serial *serial_table[SERIAL_TTY_MINORS]; 
    int usb_serial_probe(struct usb_interfac 
    902903                } 
    903904                buffer_size = serial->type->bulk_in_size; 
    904905                if (!buffer_size) 
    905                         buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); 
     906                        buffer_size = (endpoint->wMaxPacketSize > maxSize) ? endpoint->wMaxPacketSize : maxSize; 
    906907                port->bulk_in_size = buffer_size; 
    907908                port->bulk_in_endpointAddress = endpoint->bEndpointAddress; 
    908909                port->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL); 
    MODULE_LICENSE("GPL"); 
    13801381 
    13811382module_param(debug, bool, S_IRUGO | S_IWUSR); 
    13821383MODULE_PARM_DESC(debug, "Debug enabled or not"); 
     1384module_param(maxSize, ushort,0); 
     1385MODULE_PARM_DESC(maxSize,"User specified USB endpoint size"); 
Note: See TracBrowser for help on using the repository browser.