Linux Documentation
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: Nikhil Solanke <nikhilsolanke5@gmail.com>
Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, stern@rowland.harvard.edu,
	corbet@lwn.net, skhan@linuxfoundation.org,
	linux-doc@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] usbcore: Add quirk for 255-bytes initial config read
Date: Mon, 27 Jul 2026 21:21:30 +0200	[thread overview]
Message-ID: <20260727212130.4a6bb49f.michal.pecio@gmail.com> (raw)
In-Reply-To: <CAFgddh+1Bk=CFkKYNzB=L++UejkhCEcTHp4A2JL2v+P6uBuF2w@mail.gmail.com>

On Mon, 27 Jul 2026 20:55:27 +0530, Nikhil Solanke wrote:
> Regarding the "stall" wording, I was referring to the condition where
> they fail with -EPIPE error when these devices are connected through
> external usb hubs. The directly connected devices I've tested
> typically fail with -EPROTO instead.  I'm happy to reword the comment
> if you think that would make it clearer.

Understood.

The reason you see -EPIPE is due to the marvel of technology which is
"transaction translators" in USB 2.0 hubs. They report low/full-speed
protocol errors with STALL handshake on the high-speed bus, even though
a new ERR handshake is also defined and used for similar errors on
interrupt endpoints only.

So your device doesn't stall, it just disconnects as usual. And with
a USB 1.0 hub you would see -EPROTO too, but these are rare today.


My habit is to make code comments generic - I don't know what devices
will use this quirk in the future, so just write something that likely
applies to all of them - "break", "malfunction", "fail to respond".
But I also describe precisely what problem the quirk was meant to solve
in the commit, so the information can be found with "git blame".

Regards,
Michal

  parent reply	other threads:[~2026-07-27 19:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 19:53 [PATCH 0/2] usbcore: Add quirk for 255-byte initial config read Nikhil Solanke
2026-07-17 19:53 ` [PATCH 1/2] usbcore: Add quirk for 255-bytes " Nikhil Solanke
2026-07-26 16:29   ` Michal Pecio
2026-07-27 15:25     ` Nikhil Solanke
2026-07-27 16:13       ` Alan Stern
2026-07-27 16:29         ` Nikhil Solanke
2026-07-27 19:21       ` Michal Pecio [this message]
2026-07-17 19:53 ` [PATCH 2/2] USB: hub: Split announce_device() to log device identity before enumeration Nikhil Solanke
2026-07-18  5:30 ` [PATCH 0/2] usbcore: Add quirk for 255-byte initial config read Nikhil Solanke

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=20260727212130.4a6bb49f.michal.pecio@gmail.com \
    --to=michal.pecio@gmail.com \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nikhilsolanke5@gmail.com \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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