From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jeremiah Mahler <jmmahler@gmail.com>,
Johan Hovold <johan@kernel.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] usb: serial: handle -ENODEV and -EPROTO quietly
Date: Tue, 16 Dec 2014 12:42:48 +0100 [thread overview]
Message-ID: <20141216114248.GH6778@localhost> (raw)
In-Reply-To: <20141215163801.GB1470@kroah.com>
On Mon, Dec 15, 2014 at 08:38:01AM -0800, Greg Kroah-Hartman wrote:
> On Mon, Dec 15, 2014 at 04:53:05AM -0800, Jeremiah Mahler wrote:
> > Johan,
> >
> > On Mon, Dec 15, 2014 at 11:23:21AM +0100, Johan Hovold wrote:
> > > On Thu, Dec 11, 2014 at 03:29:52PM -0800, Jeremiah Mahler wrote:
> > > > If a USB serial device (e.g. /dev/ttyUSB0) with an active program is
> > > > unplugged, a bunch of -ENODEV and -EPROTO errors will be produced in the
> > > > logs. This patch set quiets these messages without changing the
> > > > original behavior.
> > >
> > > Don't unplug devices that are in use then. ;)
> > >
> > I knew someone was going to say that :-)
> >
> > > > This change is beneficial when using daemons such as slcand, which is
> > > > similar to pppd or slip, that cannot determine whether they should exit
> > > > until after the USB serial device is unplugged. Producing these error
> > > > messages for a normal use case is not helpful.
> > >
> > > Your patches would hide these errors when they occur during normal use
> > > (e.g. EPROTO).
> > >
> > > Receiving an error message when unplugging an active device should not
> > > surprise anyone. And at least you know where it came from (and it's
> > > right there in the logs as well).
> > >
> > > Johan
> >
> > Hmm. Yes, I can see why quieting -EPROTO would be bad because it would
> > hide protocol errors which we want to know about.
>
> Do you really want to "know about" them? What can a user do with them?
> Nothing, so just resubmit and you should be fine.
Knowing that a device is flakey (and should be replaced) might be of
some worth?
And wouldn't silencing such errors mean that we could be quietly
dropping data?
> > I need to re-think this patch.
> > Nack.
>
> I like this patch, putting crud in the kernel log that no one can do
> anything with for a "normal" operation like yanking a USB device out
> while it is open should not happen.
The problem is that several errors may be returned from the
host-controller driver as a consequence of disconnect (before the hub
driver can process the disconnect). At least -EPROTO, -EILSEQ, -ETIME
are -EPIPE explicitly listed in Documentation/usb/error-codes.txt for
this, and of those, -EPROTO, -EILSEQ could also indicate hardware
problems.
I don't see how we can get around the trade-off between having a few
error messages in the log in the short window prior to a processed (and
also logged) disconnect, and not reporting potential hardware issues.
Thanks,
Johan
next prev parent reply other threads:[~2014-12-16 11:42 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 [this message]
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 ` [RESEND PATCH v2 2/2] usb: serial: handle -ENODEV quietly in generic_submit_read_urb Jeremiah Mahler
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=20141216114248.GH6778@localhost \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jmmahler@gmail.com \
--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).