Date: Sat, 27 Aug 2022 06:53:28 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 4e2d8cd3e29b - main - usb(4): Quirk for non-compliant USB devices. Message-ID: <202208270653.27R6rSRu074694@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=4e2d8cd3e29bc885567f61ff358f8c9459d621ce commit 4e2d8cd3e29bc885567f61ff358f8c9459d621ce Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2022-08-27 06:50:51 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2022-08-27 06:52:28 +0000 usb(4): Quirk for non-compliant USB devices. Some non-compliant USB devices do not implement the clear endpoint halt feature. Silently ignore such failures, when they at least responded correctly passing up a valid STALL PID packet. Tested by: Doug Ambrisko <ambrisko@ambrisko.com> MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/usb/usb_request.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/usb/usb_request.c b/sys/dev/usb/usb_request.c index a1781f3589a4..c5b370ccd31a 100644 --- a/sys/dev/usb/usb_request.c +++ b/sys/dev/usb/usb_request.c @@ -313,6 +313,16 @@ tr_setup: */ if (usb_no_cs_fail) goto tr_transferred; + + /* + * Some non-compliant USB devices do not implement the + * clear endpoint halt feature. Silently ignore such + * devices, when they at least respond correctly + * passing up a valid STALL PID packet. + */ + if (error == USB_ERR_STALLED) + goto tr_transferred; + if (udev->clear_stall_errors == USB_CS_RESET_LIMIT) goto tr_setup;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208270653.27R6rSRu074694>