Ticket #2274: 800-usb_junxion_patch.patch

File 800-usb_junxion_patch.patch, 993 bytes (added by arnoldsvincta@…, 10 years ago)

revised patch that suits the kamikaze usbserial.c

  • linux-2.4.34/drivers/usb/serial/usbserial.c

     
    331331#ifdef CONFIG_USB_SERIAL_GENERIC 
    332332static __u16    vendor  = 0x05f9; 
    333333static __u16    product = 0xffff; 
     334static int      maxSize = 0; 
    334335 
    335336static struct usb_device_id generic_device_ids[9]; /* Initially all zeroes. */ 
    336337 
     
    15581559                        goto probe_error; 
    15591560                } 
    15601561                buffer_size = endpoint->wMaxPacketSize; 
     1562                #ifdef CONFIG_USB_SERIAL_GENERIC 
     1563                buffer_size = (endpoint->wMaxPacketSize > maxSize)?endpoint->wMaxPacketSize:maxSize; 
     1564                #endif 
    15611565                port->bulk_in_endpointAddress = endpoint->bEndpointAddress; 
    15621566                port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL); 
    15631567                if (!port->bulk_in_buffer) { 
     
    19451949 
    19461950MODULE_PARM(product, "h"); 
    19471951MODULE_PARM_DESC(product, "User specified USB idProduct"); 
     1952 
     1953MODULE_PARM(maxSize,"i"); 
     1954MODULE_PARM_DESC(maxSize,"User specified USB endpoint size"); 
    19481955#endif