linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremiah Mahler <jmmahler@gmail.com>
To: Johan Hovold <johan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	Jeremiah Mahler <jmmahler@gmail.com>
Subject: [RESEND PATCH v2 2/2] usb: serial: handle -ENODEV quietly in generic_submit_read_urb
Date: Sat, 10 Jan 2015 16:44:33 -0800	[thread overview]
Message-ID: <1420937073-20835-3-git-send-email-jmmahler@gmail.com> (raw)
In-Reply-To: <1420937073-20835-1-git-send-email-jmmahler@gmail.com>
In-Reply-To: <1419066698-2684-1-git-send-email-jmmahler@gmail.com>

If a USB serial device (e.g. /dev/ttyUSB0) with an active program is
unplugged, an -ENODEV (19) error will be produced after it gives up
trying to resubmit a read.

  usb_serial_generic_submit_read_urb - usb_submit_urb failed: -19

Add -ENODEV as one of the permanent errors along with -EPERM that
usb_serial_generic_submit_read_urb() handles quietly without an error.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
---
 drivers/usb/serial/generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 2d7207b..ccf1df7 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -286,7 +286,7 @@ static int usb_serial_generic_submit_read_urb(struct usb_serial_port *port,
 
 	res = usb_submit_urb(port->read_urbs[index], mem_flags);
 	if (res) {
-		if (res != -EPERM) {
+		if (res != -EPERM && res != -ENODEV) {
 			dev_err(&port->dev,
 					"%s - usb_submit_urb failed: %d\n",
 					__func__, res);
-- 
2.1.4


  parent reply	other threads:[~2015-01-11  0:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11 23:29 [PATCH 0/2] usb: serial: handle -ENODEV and -EPROTO quietly Jeremiah Mahler
2014-12-11 23:29 ` [PATCH 1/2] usb: serial: handle -EPROTO quietly in generic_read_bulk Jeremiah Mahler
2014-12-11 23:29 ` [PATCH 2/2] usb: serial: handle -ENODEV quietly in generic_submit_read_urb Jeremiah Mahler
2014-12-16 11:49   ` Johan Hovold
2014-12-15 10:23 ` [PATCH 0/2] usb: serial: handle -ENODEV and -EPROTO quietly Johan Hovold
2014-12-15 12:53   ` Jeremiah Mahler
2014-12-15 16:38     ` Greg Kroah-Hartman
2014-12-16  7:10       ` Jeremiah Mahler
2014-12-16 11:46         ` Johan Hovold
2014-12-16 11:42       ` Johan Hovold
2014-12-20  9:11 ` [PATCH v2 " Jeremiah Mahler
2014-12-20  9:11   ` [PATCH v2 1/2] usb: serial: handle -EPROTO quietly in generic_read_bulk Jeremiah Mahler
2014-12-20 12:32     ` Sergei Shtylyov
2014-12-20 12:59       ` Jeremiah Mahler
2014-12-20 16:17         ` [PATCH v2b " Jeremiah Mahler
2014-12-20  9:11   ` [PATCH v2 2/2] usb: serial: handle -ENODEV quietly in generic_submit_read_urb Jeremiah Mahler
2015-01-11  0:44   ` [RESEND PATCH v2 0/2] usb: serial: handle -ENODEV and -EPROTO quietly Jeremiah Mahler
2015-01-11  0:44   ` [RESEND PATCH v2 1/2] usb: serial: handle -EPROTO quietly in generic_read_bulk Jeremiah Mahler
2015-01-11 11:36     ` Johan Hovold
2015-01-11 13:31       ` Jeremiah Mahler
2015-01-11  0:44   ` Jeremiah Mahler [this message]
2015-01-11 13:42   ` [PATCH v3 0/2] usb: serial: silence non-critical unplug read errors Jeremiah Mahler
2015-01-11 13:42     ` [PATCH v3 1/2] usb: serial: silence all non-critical " Jeremiah Mahler
2015-01-11 13:42     ` [PATCH v3 2/2] usb: serial: handle -ENODEV quietly in generic_submit_read_urb Jeremiah Mahler
2015-01-12  9:27     ` [PATCH v3 0/2] usb: serial: silence non-critical unplug read errors Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420937073-20835-3-git-send-email-jmmahler@gmail.com \
    --to=jmmahler@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).