Am Montag 30 Juli 2007 schrieb [EMAIL PROTECTED]: > This is quite dangerous :-) > > You can't apply a user requested buffer_size to interrupt_buffer ! > > The API should only apply the buffer size to bulk buffers...
Right you are. What about this? Or do you need split sizes for input and output? Regards Oliver --- --- a/include/linux/usb/serial.h 2007-07-30 12:19:39.000000000 +0200 +++ b/include/linux/usb/serial.h 2007-07-30 12:19:46.000000000 +0200 @@ -201,6 +201,7 @@ static inline void usb_set_serial_data ( struct usb_serial_driver { const char *description; const struct usb_device_id *id_table; + int buffer_size; char num_interrupt_in; char num_interrupt_out; char num_bulk_in; --- a/drivers/usb/serial/usb-serial.c 2007-07-30 12:20:11.000000000 +0200 +++ b/drivers/usb/serial/usb-serial.c 2007-07-30 12:20:15.000000000 +0200 @@ -866,7 +866,7 @@ int usb_serial_probe(struct usb_interfac dev_err(&interface->dev, "No free urbs available\n"); goto probe_error; } - buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); + buffer_size = type->buffer_size ? type->buffer_size : le16_to_cpu(endpoint->wMaxPacketSize); port->bulk_in_size = buffer_size; port->bulk_in_endpointAddress = endpoint->bEndpointAddress; port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL); @@ -890,7 +890,7 @@ int usb_serial_probe(struct usb_interfac dev_err(&interface->dev, "No free urbs available\n"); goto probe_error; } - buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); + buffer_size = type->buffer_size ? type->buffer_size : le16_to_cpu(endpoint->wMaxPacketSize); port->bulk_out_size = buffer_size; port->bulk_out_endpointAddress = endpoint->bEndpointAddress; port->bulk_out_buffer = kmalloc (buffer_size, GFP_KERNEL); ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel