Subject: [PATCH 001/002] USB: serial: sierra driver autopm bug fixes From: Elina Pasheva <epasheva@xxxxxxxxxxxxxxxxxx> This first patch of the series of two patches presents two bug fixes for the autosuspend feature implementation in sierra usb serial driver. The first bug fix restores the autopm interface state on error condition in sierra_open() function. The second bug fix assures that both receive and interrupt urbs are recycled by calling stop_read_write_urbs() function. This situation occurs during suspend. The existing code did not recycle interrupt urbs so we replaced the for loop with a call to our existing function stop_read_write_urbs() which recycles both read and interrupt urbs. The second patch of the series [PATCH 002/002] re-submits the memory reduction feature. Signed-off-by: Elina Pasheva <epasheva@xxxxxxxxxxxxxxxxxx> --- drivers/usb/serial/sierra.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/usb/serial/sierra.c 2009-10-09 16:41:31.000000000 -0700 +++ b/drivers/usb/serial/sierra.c 2009-10-09 16:48:46.000000000 -0700 @@ -825,6 +825,8 @@ static int sierra_open(struct tty_struct err = sierra_submit_rx_urbs(port, GFP_KERNEL); if (err) { + /* restore balance for autopm */ + usb_autopm_put_interface(serial->interface); /* get rid of everything as in close */ sierra_close(port); return err; @@ -915,7 +917,7 @@ static void sierra_release(struct usb_se #ifdef CONFIG_PM static void stop_read_write_urbs(struct usb_serial *serial) { - int i, j; + int i; struct usb_serial_port *port; struct sierra_port_private *portdata; @@ -923,8 +925,7 @@ static void stop_read_write_urbs(struct for (i = 0; i < serial->num_ports; ++i) { port = serial->port[i]; portdata = usb_get_serial_port_data(port); - for (j = 0; j < N_IN_URB; j++) - usb_kill_urb(portdata->in_urbs[j]); + sierra_stop_rx_urbs(port); usb_kill_anchored_urbs(&portdata->active); } } -- 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