All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeroen Roovers <jer@airfi.aero>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: linux-wireless@vger.kernel.org,
	"Randy Oostdyk" <linux-kernel@oostdyk.com>,
	"Tomislav Požega" <pozega.tomislav@gmail.com>,
	"Daniel Golle" <daniel@makrotopia.org>,
	"Felix Fietkau" <nbd@nbd.name>, "Mathias Kresin" <dev@kresin.me>
Subject: Re: [PATCH v2 2/3] rt2x00: check number of EPROTO errors
Date: Tue, 8 Jan 2019 10:30:20 +0100	[thread overview]
Message-ID: <CANCHnQrkB7U2KHd7v6psFaD3cbR+cWj0PaBhRZ8Nk5B6ne7ECw@mail.gmail.com> (raw)
In-Reply-To: <20190107150912.GA9516@redhat.com>

     Hi Stanislaw,


On Mon, 7 Jan 2019 at 16:09, Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> On Mon, Jan 07, 2019 at 01:47:19PM +0100, Jeroen Roovers wrote:
> > Maybe I am wrong about this, but then again I have neither ever seen
> > the driver respond to an ENOENT like this when an RT5592
> > "disappeared".

By "neither ever seen" I mean I have never seen rt2x00usb respond
properly like that because no -ENOENT was ever seen. I have many
system logs collected over the years showing the exact error that the
code was trying to catch and still does try to catch: with USB debug
messages enabled, I tend to see

usb: kworker.* timed out on ep.*

followed by rt2x00 specific warnings about the queues filling up:
rt2800usb_txdone: Warning - Data pending for entry N in queue N
[may repeat a few times]

followed by the fatal:

rt2x00usb_vendor_request: Error - Vendor Request X failed for offset X
with error -110
[many of these, system is slowly locking up]

So the only clue that I had was that perhaps rt2x00usb_vendor_request
wasn't catching the correct return value.

> According to Documentation/driver-api/usb/error-codes.rst
> ENOENT is valid error code when interface does not exist or
> when URB was unlinked.

rt2x00usb_vendor_request calls usb_control_msg.
usb_control_msg according to that document can return -ETIMEDOUT.

1. rt2x00usb_vendor_request calls usb_control_msg.
2. usb_control_msg calls usb_internal_control_msg and passes on its
return value.
3. usb_internal_control_msg calls usb_start_wait_urb and passes on its
return value.
4. usb_start_wait_urb very specifically substitutes -ETIMEDOUT for
-ENOENT as the return value of usb_kill_urb and
5. that is passed back all the way up to rt2x00usb_vendor_request.

Kind regards,
     jer

  reply	other threads:[~2019-01-08  9:30 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 15:16 [PATCH v2 1/3] rt2x00: use ratelimited variants dev_warn/dev_err Stanislaw Gruszka
2018-12-20 15:16 ` [PATCH v2 2/3] rt2x00: check number of EPROTO errors Stanislaw Gruszka
2019-01-07 12:47   ` Jeroen Roovers
2019-01-07 15:09     ` Stanislaw Gruszka
2019-01-08  9:30       ` Jeroen Roovers [this message]
2019-01-08 10:09         ` Jeroen Roovers
2019-01-08 11:04         ` Tom Psyborg
2019-01-09  6:17           ` Jeroen Roovers
2019-01-09 11:33             ` Stanislaw Gruszka
2019-01-10  7:49               ` Jeroen Roovers
2019-01-10 14:29                 ` Jeroen Roovers
2019-01-16 11:11                   ` Stanislaw Gruszka
2019-01-22 17:32                   ` Jeroen Roovers
2019-02-12 15:02                     ` Stanislaw Gruszka
2018-12-20 15:16 ` [PATCH v2 3/3] rt2x00: do not print error when queue is full Stanislaw Gruszka
2018-12-20 17:52   ` Tom Psyborg
2018-12-21  9:59     ` Stanislaw Gruszka
2018-12-22 13:12       ` Tom Psyborg
2018-12-25 22:43         ` Tom Psyborg
2018-12-27 10:32           ` Stanislaw Gruszka
2018-12-27 10:25         ` Stanislaw Gruszka
2018-12-28  0:45           ` Tom Psyborg
2019-01-02  8:19             ` Stanislaw Gruszka
2019-02-09 11:03               ` Stanislaw Gruszka
2019-02-09 11:11                 ` Tom Psyborg
2019-02-09 11:56                   ` Stanislaw Gruszka
2019-02-09 12:28                     ` Tom Psyborg
2019-02-09 15:38                       ` Daniel Golle
2019-02-09 16:29                         ` Tom Psyborg
2019-02-09 17:28                           ` Daniel Golle
2019-03-19  2:37                             ` Tom Psyborg
2019-02-10  9:57                       ` Stanislaw Gruszka
2018-12-21 11:19 ` [PATCH v2 1/3] rt2x00: use ratelimited variants dev_warn/dev_err Joe Perches
2018-12-21 11:57   ` Stanislaw Gruszka
2018-12-21 12:48     ` Joe Perches
2018-12-21 12:51       ` Stanislaw Gruszka
2019-01-29 12:30     ` Kalle Valo

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=CANCHnQrkB7U2KHd7v6psFaD3cbR+cWj0PaBhRZ8Nk5B6ne7ECw@mail.gmail.com \
    --to=jer@airfi.aero \
    --cc=daniel@makrotopia.org \
    --cc=dev@kresin.me \
    --cc=linux-kernel@oostdyk.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=pozega.tomislav@gmail.com \
    --cc=sgruszka@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.