]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: serial: sierra driver interrupt urb resubmit fix
authorElina Pasheva <epasheva@sierrawireless.com>
Tue, 12 May 2009 20:12:37 +0000 (13:12 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Jun 2009 04:44:45 +0000 (21:44 -0700)
- Fixed a problem when re-submitting urb from interrupt callback in
  function sierra_instat_callback(). This suppresses also issuing of
  error messages in /var/log/kern.log
- Removed redundant debug message at the beginning of
  sierra_instat_callback() function
- Changed a debug message to be an error message

Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/sierra.c

index 9d11fe47633bf53c8d32a0181d92daa15f61fa13..bcfe0ac1e2211921c2c6cf240a6eba11cf7fc011 100644 (file)
@@ -556,7 +556,6 @@ static void sierra_instat_callback(struct urb *urb)
        struct sierra_port_private *portdata = usb_get_serial_port_data(port);
        struct usb_serial *serial = port->serial;
 
-       dev_dbg(&port->dev, "%s\n", __func__);
        dev_dbg(&port->dev, "%s: urb %p port %p has data %p\n", __func__,
                urb, port, portdata);
 
@@ -600,12 +599,12 @@ static void sierra_instat_callback(struct urb *urb)
                dev_dbg(&port->dev, "%s: error %d\n", __func__, status);
 
        /* Resubmit urb so we continue receiving IRQ data */
-       if (status != -ESHUTDOWN) {
+       if (port->port.count && status != -ESHUTDOWN && status != -ENOENT) {
                urb->dev = serial->dev;
                err = usb_submit_urb(urb, GFP_ATOMIC);
                if (err)
-                       dev_dbg(&port->dev, "%s: resubmit intr urb "
-                               "failed. (%d)\n",       __func__, err);
+                       dev_err(&port->dev, "%s: resubmit intr urb "
+                               "failed. (%d)\n", __func__, err);
        }
 }