Re: [PATCH 1/2] usbcore: Add quirk for 255-bytes initial config read
Michal Pecio <[email protected]>
| Newsgroups | org.kernel.vger.linux-usb,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
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