From owner-cvs-all@FreeBSD.ORG Sat Jun 26 10:35:52 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46F5416A4CE; Sat, 26 Jun 2004 10:35:52 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4598843D53; Sat, 26 Jun 2004 10:35:52 +0000 (GMT) (envelope-from le@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5QAZA3V058307; Sat, 26 Jun 2004 10:35:10 GMT (envelope-from le@repoman.freebsd.org) Received: (from le@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5QAZAkV058306; Sat, 26 Jun 2004 10:35:10 GMT (envelope-from le) Message-Id: <200406261035.i5QAZAkV058306@repoman.freebsd.org> From: Lukas Ertl Date: Sat, 26 Jun 2004 10:35:10 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/usb ugen.c uhid.c usb_quirks.c usb_subr.c usbdi_util.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jun 2004 10:35:52 -0000 le 2004-06-26 10:35:10 UTC FreeBSD src repository Modified files: sys/dev/usb ugen.c uhid.c usb_quirks.c usb_subr.c usbdi_util.h Log: MFNetBSD. uhid.c (1.61), author: jdolecek add support for USB_GET_DEVICEINFO and USB_GET_STRING_DESC ioctls, with same meaning as for ugen(4) usbdi_util.h (1.29), usb_quirks.c (1.50), uhid.c (1.62), ugen.c (1.68), usb_subr.c (1.114) author: mycroft Yes, some devices return incorrect lengths in their string descriptors. Rather than losing, do what Windows does: just request the maximum size, and allow a shorter response. Obsoletes the need for UQ_NO_STRINGS, and therefore these "quirks" are removed. usb_subr.c (1.116), author: mycroft In the "seemed like a good idea until I found the fatal flaw" department... Attempting to read a maximum-size string descriptor causes my kue device to go completely apeshit. So, go back to the original method, but allow the device to return a shorter string than it claimed. Obtained from: NetBSD Revision Changes Path 1.85 +5 -2 src/sys/dev/usb/ugen.c 1.70 +18 -0 src/sys/dev/usb/uhid.c 1.37 +3 -11 src/sys/dev/usb/usb_quirks.c 1.65 +23 -7 src/sys/dev/usb/usb_subr.c 1.17 +3 -2 src/sys/dev/usb/usbdi_util.h