Fixed too small hardcoded timeout values for usb_control_msg in driver for SiliconLabs cp210x-based usb-to-serial adapters. Replaced with USB_CTRL_GET_TIMEOUT/USB_CTRL_SET_TIMEOUT.
Subsystems (2)
PATCH 1/1 Fixed too small hardcoded timeout values for usb_control_msg in driver for SiliconLabs cp210x-based usb-to-serial adapters. Replaced with USB_CTRL_GET_TIMEOUT/USB_CTRL_SET_TIMEOUT.
--- drivers/usb/serial/cp210x.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
drivers/usb/serial/cp210x.c +6 -3
@@ -287,7 +287,8 @@ static int cp210x_get_config(struct usb_serial_port *port, u8 request,/* Issue the request, attempting to read 'size' bytes */ result =usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ), request,REQTYPE_DEVICE_TO_HOST ,0x0000 , - port_priv->bInterfaceNumber, buf, size,300 ); + port_priv->bInterfaceNumber, buf, size, +USB_CTRL_GET_TIMEOUT );/* Convert data into an array of integers */ for (i =0 ; i < length; i++)
@@ -340,12 +341,14 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request, result =usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ), request,REQTYPE_HOST_TO_DEVICE ,0x0000 , - port_priv->bInterfaceNumber, buf, size,300 ); + port_priv->bInterfaceNumber, buf, size, +USB_CTRL_SET_TIMEOUT ); }else { result =usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ), request,REQTYPE_HOST_TO_DEVICE , data[0 ], - port_priv->bInterfaceNumber,NULL ,0 ,300 ); + port_priv->bInterfaceNumber,NULL ,0 , +USB_CTRL_SET_TIMEOUT ); }kfree (buf);
Signature · 1 line
1.7.0.4
On Fri, Apr 20, 2012 at 11:32:02AM +0300, Yuri Matylitski wrote:
The first line of the commit message (which is in Subject) should be a short summary of the change. More detailed description should be added after an empty line.
More commit message hints:
http://who-t.blogspot.com/2009/12/on-commit-messages.html
Otherwise:
Quoted 39 lines
Signed-off-by Yuri Matylitski <[email protected]>--- drivers/usb/serial/cp210x.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)drivers/usb/serial/cp210x.c +6
-3@@ -287,7 +287,8 @@ static int cp210x_get_config(struct usb_serial_port *port, u8 request,/* Issue the request, attempting to read 'size' bytes */ result =usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ), request,REQTYPE_DEVICE_TO_HOST ,0x0000 , - port_priv->bInterfaceNumber, buf, size,300 ); + port_priv->bInterfaceNumber, buf, size, +USB_CTRL_GET_TIMEOUT );/* Convert data into an array of integers */ for (i =0 ; i < length; i++)@@ -340,12 +341,14 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request, result =usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ), request,REQTYPE_HOST_TO_DEVICE ,0x0000 , - port_priv->bInterfaceNumber, buf, size,300 ); + port_priv->bInterfaceNumber, buf, size, +USB_CTRL_SET_TIMEOUT ); }else { result =usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ), request,REQTYPE_HOST_TO_DEVICE , data[0 ], - port_priv->bInterfaceNumber,NULL ,0 ,300 ); + port_priv->bInterfaceNumber,NULL ,0 , +USB_CTRL_SET_TIMEOUT ); }kfree (buf);Signature · 1 line
1.7.0.4
Signature · 1 line
Kirill A. Shutemov
PATCH 1/1 Fixed usb_control_msg timeout values in cp210x driver
In reply to Yuri MatylitskiFixed too small hardcoded timeout values for usb_control_msg in driver for SiliconLabs cp210x-based usb-to-serial adapters. Replaced with USB_CTRL_GET_TIMEOUT/USB_CTRL_SET_TIMEOUT.
--- drivers/usb/serial/cp210x.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
drivers/usb/serial/cp210x.c +6 -3
@@ -287,7 +287,8 @@ static int cp210x_get_config(struct usb_serial_port *port, u8 request,/* Issue the request, attempting to read 'size' bytes */ result =usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ), request,REQTYPE_DEVICE_TO_HOST ,0x0000 , - port_priv->bInterfaceNumber, buf, size,300 ); + port_priv->bInterfaceNumber, buf, size, +USB_CTRL_GET_TIMEOUT );/* Convert data into an array of integers */ for (i =0 ; i < length; i++)
@@ -340,12 +341,14 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request, result =usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ), request,REQTYPE_HOST_TO_DEVICE ,0x0000 , - port_priv->bInterfaceNumber, buf, size,300 ); + port_priv->bInterfaceNumber, buf, size, +USB_CTRL_SET_TIMEOUT ); }else { result =usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ), request,REQTYPE_HOST_TO_DEVICE , data[0 ], - port_priv->bInterfaceNumber,NULL ,0 ,300 ); + port_priv->bInterfaceNumber,NULL ,0 , +USB_CTRL_SET_TIMEOUT ); }kfree (buf);
Signature · 1 line
1.7.0.4
Hello.
On 20-04-2012 12:32, Yuri Matylitski wrote:
Your subject is far too long. Part of it probabbly should constitute the
change log.
Quoted 1 line
Signed-off-by Yuri Matylitski<[email protected]>
WBR, Sergei