aboutsummaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_hid.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix USB HID descriptor parsing error.Gordon Tetlow2020-06-091-26/+26
| | | | | | | | | | Approved by: so Approved by: re (implicit) Security: FreeBSD-SA-20:17.usb Security: CVE-2020-7456 Notes: svn path=/releng/11.4/; revision=361972
* MFC r336577:Vladimir Kondratyev2018-08-041-9/+9
| | | | | | | | | | | | | | | Raise "Report Count" value limit in HID descriptor parser. This fixes usage/report size calculation of Microsoft`s "Touch Hardware Quality Assurance" certificate blob found in many touchscreens. While here, join several "c->flags = dval" lines in to single line. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D16357 Notes: svn path=/stable/11/; revision=337291
* Revert r330897:Eitan Adler2018-03-291-2/+0
| | | | | | | | | | | | | | | | | | | | This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code. Revert with prejudice. This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes. Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes. Requested by: gjb (re) Notes: svn path=/stable/11/; revision=331722
* Partial merge of the SPDX changesEitan Adler2018-03-141-0/+2
| | | | | | | | | | These changes are incomplete but are making it difficult to determine what other changes can/should be merged. No objections from: pfg Notes: svn path=/stable/11/; revision=330897
* MFC r322695:Vladimir Kondratyev2017-10-191-0/+74
| | | | | | | | | | | | Add support for generic MS Windows 7/8/10-compatible USB HID touchscreens found in many laptops. Reviewed by: hps, gonzo, bcr (manpages) Approved by: gonzo (mentor) Differential Revision: https://reviews.freebsd.org/D12017 Notes: svn path=/stable/11/; revision=324769
* dev/usb: minor spelling fixes in comments.Pedro F. Giffuni2016-05-021-1/+1
| | | | | | | | | No functional change. Reviewed by: hselasky Notes: svn path=/head/; revision=298932
* Be more verbose when truncating number of HID items.Hans Petter Selasky2016-02-231-1/+2
| | | | | | | | Suggested by: Larry Rosenman <ler@lerctr.org> MFC after: 1 week Notes: svn path=/head/; revision=295923
* Modify the FreeBSD USB kernel code so that it can be compiled directlyHans Petter Selasky2013-01-301-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems or embedded platforms. This is also useful for out of the system compilation of the FreeBSD USB stack for various purposes. The USB kernel files can now optionally include a global header file which should include all needed definitions required to compile the FreeBSD USB stack. When the global USB header file is included, no other USB header files will be included by default. Add new file containing the USB stack configuration for the FreeBSD loader build. Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all USB files follow the same style. Use cases: - console in loader via USB - loading kernel via USB Discussed with: Hiroki Sato, hrs @ EuroBSDCon Notes: svn path=/head/; revision=246122
* Fix detection of Razer Copperhead as a USB mouse.Hans Petter Selasky2013-01-101-0/+76
| | | | | | | | | | | | Factor out USB mouse and keyboard detection logic. Reject USB keyboards which have mouse alike HID items in their HID descriptors. Submitted by: Matthew W MFC after: 1 week Notes: svn path=/head/; revision=245248
* HID Report ID is unsigned value, so clear the rest of bits from possibleAlexander Motin2012-05-161-1/+1
| | | | | | | sign expansion. Notes: svn path=/head/; revision=235510
* Fix compiler warnings, mostly signed issues,Hans Petter Selasky2012-04-021-2/+2
| | | | | | | | | when USB modules are compiled with WARNS=9. MFC after: 1 weeks Notes: svn path=/head/; revision=233774
* Make the USB keyboard driver more HID compliant.Hans Petter Selasky2011-07-041-0/+37
| | | | | | | | | Try to auto-detect keyboards which should use the BOOT protocol. MFC after: 2 weeks Notes: svn path=/head/; revision=223755
* Remove unneeded includes of <sys/linker_set.h>. Other headers that useJohn Baldwin2011-01-111-1/+0
| | | | | | | | | it internally contain nested includes. Reviewed by: bde Notes: svn path=/head/; revision=217265
* Support getting signed and unsigned HID data.Andrew Thompson2010-05-121-4/+20
| | | | | | | | Submitted by: Alex Deiter Reviewed by: Hans Petter Selaksy Notes: svn path=/head/; revision=208012
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromJoel Dahl2010-03-031-7/+0
| | | | | | | | | their software. Obtained from: NetBSD Notes: svn path=/head/; revision=204632
* Remove overuse of exclamation marks in kernel printfs, there mere fact aAndrew Thompson2009-11-261-4/+4
| | | | | | | | | message has been printed is enough to get someones attention. Also remove the line number for DPRINTF/DPRINTFN, it already prints the funtion name and a unique message. Notes: svn path=/head/; revision=199816
* USB CORE - Improve HID parsingAlfred Perlstein2009-07-301-3/+61
| | | | | | | | | | | | | | See PR description for more info. Patch is implemented differently than suggested, but having the same result. PR: usb/137188 Submitted by: hps Approved by: re Notes: svn path=/head/; revision=195967
* - Make struct usb_xfer opaque so that drivers can not access the internalsAndrew Thompson2009-06-231-4/+22
| | | | | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h Notes: svn path=/head/; revision=194677
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.Andrew Thompson2009-06-151-7/+7
| | | | Notes: svn path=/head/; revision=194228
* Revert the size_t part of the last commit for the moment, this blows up theAndrew Thompson2009-05-301-5/+5
| | | | | | | USB_ADD_BYTES macro. Notes: svn path=/head/; revision=193074
* s/usb2_/usb_/ on all typedefs for the USB stack.Andrew Thompson2009-05-291-8/+8
| | | | Notes: svn path=/head/; revision=193045
* s/usb2_/usb_/ on all C structs for the USB stack.Andrew Thompson2009-05-281-7/+7
| | | | Notes: svn path=/head/; revision=192984
* Don't clear last usage when a new HID item is found, it improves parsing ofAndrew Thompson2009-05-211-3/+0
| | | | | | | | | Apple keyboard HID descriptors. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=192559
* Make sure collections have the usage field set.Andrew Thompson2009-05-131-3/+9
| | | | | | | Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=192055
* MFp4 //depot/projects/usb@159995Andrew Thompson2009-04-051-1/+3
| | | | | | | | | | | | | - add support for more complicated HID descriptors which can have multiple definitions of the same field. - remove old modulo patch in ums, which I think is due to bad HID parsing, which should be fixed now. Reported by: netchild Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=190741
* MFp4 //depot/projects/usb @159431,159437,159438Andrew Thompson2009-03-201-5/+5
| | | | | | | | | | - start using the new USB typedefs in the USB core - Remove usage of USB_ADD_BYTES() Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=190181
* MFp4 //depot/projects/usb @159430Andrew Thompson2009-03-201-1/+0
| | | | | | | | | | | | | - Move tunable defines into usb_core.h and dependancy towards usb_defs.h - Leave hardcoded defines in "usb_defs.h". - Allow overriding all tunable defines. - Add more customisable typedefs. - Correct maximum device number. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=190174
* HID usage minimum can be equal to the maximum.Andrew Thompson2009-03-131-1/+1
| | | | | | | | Submitted by: Hans Petter Selasky Tested by: Andreas Tobler Notes: svn path=/head/; revision=189776
* MFp4 //depot/projects/usb 159004,159053,159091Andrew Thompson2009-03-121-18/+38
| | | | | | | | | | | | | More HID parsing fixes for usb mice. - be less strict on the last HID item usage. - preserve item size and count accross items - improve default HID usage selection. Tested by: ache Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=189718
* Make sure HID has a default usage, this fixes recent mouse problems.Andrew Thompson2009-03-101-6/+7
| | | | | | | | | Tested by: Renato Botelho Tested by: beech (earlier version) Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=189646
* MFp4 //depot/projects/usb@158868Andrew Thompson2009-03-081-121/+203
| | | | | | | | | | | | | | Fix bugs and improve HID parsing. - fix possible memory leak found - fix possible NULL pointer access - fix possible invalid memory read - parsing improvements - reset item data position when a new report ID is detected. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=189547
* MFp4 //depot/projects/usb; 157814, 157863, 157868Andrew Thompson2009-02-241-33/+70
| | | | | | | | | | | | | | | | - The software computed HID size is not always correct, because the algoritm does not handle unsorted HID descriptors. - Change the way we obtain the report ID. - Use the X/Y/Z+button locations instead for report ID source for ums. - Add more range checks. - Remove Microsoft Mouse quirks. If the positions are moduloed the report length multiplied by 8, the values seem correct. - Some minor style changes. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=188981
* Move the new USB stack into its new home.Andrew Thompson2009-02-231-0/+582
Notes: svn path=/head/; revision=188942