Subject: [PATCH 002/008] USB: serial: adding sierra_stop_rx_urbs() function From: Elina Pasheva <epasheva@xxxxxxxxxxxxxxxxxx> The following is summary of changes we have made to sierra.c driver in [PATCH 002/008] from the series dealing with improving urb handling: - Added function sierra_stop_rx_urbs() that takes care of the release of receive and interrupt urbs. This function is to be called by sierra_close() whenever an interface is de-activated. Signed-off-by: Elina Pasheva <epasheva@xxxxxxxxxxxxxxxxxx> --- drivers/usb/serial/sierra.c | 11 +++++++++++ 1 file changed, 11 insertions(+) --- a/drivers/usb/serial/sierra.c 2009-05-04 17:25:01.000000000 -0700 +++ b/drivers/usb/serial/sierra.c 2009-05-04 17:43:19.000000000 -0700 @@ -606,6 +606,17 @@ static int sierra_write_room(struct tty_ return 2048; } +static void sierra_stop_rx_urbs(struct usb_serial_port *port) +{ + int i; + struct sierra_port_private *portdata = usb_get_serial_port_data(port); + + for (i = 0; i < ARRAY_SIZE(portdata->in_urbs); i++) + usb_kill_urb(portdata->in_urbs[i]); + + usb_kill_urb(port->interrupt_in_urb); +} + static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port, struct file *filp) { -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html