summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhid.c
Commit message (Collapse)AuthorAgeFilesLines
* Move usb to a graveyard location under sys/legacy/dev, it is intended that thethompsa2009-02-231-755/+0
| | | | | | | new USB2 stack will fully replace this for 8.0. Remove kernel modules, a subsequent commit will update conf/files. Unhook usbdevs from the build.
* Replace all calls to minor() with dev2unit().ed2008-09-271-1/+1
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Don't include <sys/tty.h> in non-TTY drivers.ed2008-07-241-1/+2
| | | | | | | | | | The kbd, kbdmux, ugen and uhid drivers included <sys/tty.h>, because they needed clists, which have been moved to <sys/clist.h> some time ago. In the MPSAFE TTY branch, <sys/tty.h> does not include <sys/clist.h>, which means we have to teach these drivers to include this header file directly. Approved by: philip (mentor, implicit)
* Latest round of usb cleanups:imp2007-06-211-1/+0
| | | | | | | | | | | | | | | | | | | o Consistently use device_foo_t and bus_foo_t for functions implementing device_foo and bus_foo respectively. Adjust those routines that were wrong (we should do this throughout the tree). o make all the modules depend on usb. Otherwise these modules won't load. o ucycom doesn't need usb_port.h o Minor unifdefing o uhub, umass, ums, urio, uscanner conversion complete. o ukbd: Remove the NO_SET_PROTO quirk (fixes a PR 77940). NetBSD removed their check and setting the proto a long time ago. o umodem panic fixed. UQ_ASSUME_CM_OVER_DATA quirk removed because I've never seen a umodem that needed this rejection for proection (this gets rid of ~20% of the quirks). Approved by: re@ (kensmith) PR: 77940
* s/logprintf/printf/gimp2007-06-201-2/+2
| | | | Approved by: re@
* Finish removal of usb_port.h macros.imp2007-06-181-15/+41
|
* Expand USB_MATCH_STARTimp2007-06-171-1/+1
|
* Remove more __OtherBSD__ ifdefs that don't make sense, and haven't forimp2007-06-131-56/+0
| | | | some time.
* Expand USB_DETACH, USB_ATTACH and USB_MATCH inline. No functionalimp2007-06-131-3/+6
| | | | change, and MD5's appear to be the same.
* Eliminate usb_thread_t.imp2007-06-121-6/+6
|
* Remove USBDEV() macro. We do not need a macro that is defined as itsimp2007-06-121-4/+4
| | | | only argument. It was used inconsistently in the tree, so remove it.
* clalloc and clfree are useles. Remove them. Remove dead code that'simp2007-06-121-6/+2
| | | | always been dead for years, but has been obfuscated by these macros.
* Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate fromimp2007-06-121-4/+4
| | | | usb_port.h. They aren't needed, and are a legacy of this code's past.
* Remove devinfo junk.imp2007-06-091-3/+1
| | | | | | Remove bogus bzero/memset Expand USB_ATTACH_SETUP Minor nits
* Remove compat ifdefs for version < 500014 from the rest of the USB files.brueffer2007-06-071-7/+0
| | | | | Approved by: rwatson (mentor) MFC after: 1 week
* Remove compat ifdefs for FreeBSD versions < 500014, makes the codebrueffer2007-05-121-6/+0
| | | | | | | quite a bit easier to read. Approved by: rwatson (mentor) MFC after: 1 weeks
* More removing compatibility macros.imp2006-09-071-4/+4
| | | | | | md5 still the same. "Dave, stop. I feel my mind slipping away." -- hal
* s/Static/static/gimp2006-09-061-6/+6
| | | | | | | | | | s/device_ptr_t/device_t/g No md5 changes in the .o's # Note to the md5 tracking club: $FreeBSD$ changes md5 after every commit # so you need to checkout -kk to get $FreeBSD$ instead of the actual value # of the keyword.
* When attaching an Xbox 360 gamepad a computer, the LED on the gamepadnetchild2006-06-181-0/+6
| | | | | | | | | | blinks by default. When the operating system (read: normally an Xbox 360) initializes the gamepad, the LED stops blinking. Change our uhid code to do the same. PR: 97169 Submitted by: Ed Schouten <ed@fxq.nl>
* Add support for the Wacom Graphire 3 4x5. Like the Graphire 3, it has amux2005-12-311-6/+20
| | | | | | | | broken report descriptor. While I'm here, make all the other report descriptors const to match the newly added one. Obtained from: NetBSD MFC after: 1 week
* Add support for Xbox 360 gamepads. They are HID-capable devices, butmux2005-12-311-4/+23
| | | | | | | | | | lack a report descriptor and don't use the standard interface class. This patch works around these deficiencies so that the uhid(4) driver can recognize and use those broken devices. PR: usb/90141 Submitted by: Ed Schouten <ed@fxq.nl> (with minor mods from me) MFC after: 1 week
* Add a hid blacklist quirk.flz2005-12-271-0/+5
| | | | | | | | PR: usb/80383 Submitted by: Lonnie Mendez <lmendez19@austin.rr.com> Tested by: Adam Kropelin <akropel1@rochester.rr.com>, thierry, fenner Approved by: pjd MFC after: 1 week
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Include fcntl.hphk2004-12-221-2/+2
| | | | | Check O_NONBLOCK instead of IO_NDELAY Don't include vnode.h
* Add sys/uio.h explicitly, and move sys/vnode.h include to be moreimp2004-12-131-1/+2
| | | | | | | alphabetical. # vnode.h should not be included here, but it is required for proper decoding # of the flags args. This may change in the future...
* Don't use matchlvl attach arg. It seems to be not initializedtakawata2004-10-091-0/+3
| | | | in FreeBSD probe mechanism.
* Tweak the compatibility macros a little so that the device printing isimp2004-08-151-3/+1
| | | | moved into them.
* MFp4: First batch of dev/usb/usbdevs.h -> usbdevs.h changes.imp2004-06-271-1/+1
|
* Our softc has no sc_hdev, but a sc_dev. This in turn has no directle2004-06-261-18/+0
| | | | | | sc_parent, so back out the previous commit, as it breaks the build. If there's a pointy hat left, pass it on.
* MFNetBSD.le2004-06-261-0/+18
| | | | | | | | | | | | | | | | | | | | | | 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
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-7/+7
| | | | Bump __FreeBSD_version accordingly.
* Update URL to HID spec.le2004-05-231-1/+1
| | | | Obtained from: NetBSD
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Device megapatch 1/6:phk2004-02-211-2/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* - Implement selwakeuppri() which allows raising the priority of atanimura2003-11-091-1/+1
| | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current
* Make it easier to run this code on RELENG_4.joe2003-10-041-2/+8
| | | | Submitted by: luoqi
* I don't know from where the notion that device driver should orphk2003-09-281-6/+0
| | | | | | | | | | | | | | even could call VOP_REVOKE() on vnodes associated with its dev_t's has originated, but it stops right here. If there are things people belive destroy_dev() needs to learn how to do, please tell me about it, preferably with a reproducible test case. Include <sys/uio.h> in bluetooth code rather than rely on <sys/vnode.h> to do so. The fact that some of the USB code needs to include <sys/vnode.h> still disturbs me greatly, but I do not have time to chase that.
* Fix the cdevsw compatibility for -stable.joe2003-08-251-1/+1
|
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* Make note that we already have these NetBSD patches.joe2003-07-141-1/+1
|
* MFNetBSD:joe2003-07-141-1/+4
| | | | | | date: 2002/09/23 05:51:20; author: simonb; Remove breaks after returns, unreachable returns and returns after returns(!).
* WARNING: white space diffjmg2003-07-041-10/+10
| | | | | | This code reduces the number of trailing white space to be more in line w/ NetBSD. I don't regenerate usbdevs, saving that for when it really changes.
* Set pointers to NULL after free() to prevent multiple free().mdodd2003-06-251-0/+3
| | | | | PR: kern/48808 Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru>
* At least pretend to handle USB_GET_REPORT_ID.mdodd2003-04-091-0/+4
|
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+8
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Use the hw.usb sysctl tree instead of debug.usb.joe2002-08-081-1/+2
| | | | Requested by: imp
* Replace the FOO_DEBUG definitions with USB_DEBUG, and switch thejoe2002-07-311-2/+2
| | | | | | debugging levels to off by default. Now that debug levels can be tweaked by sysctl we don't need to go through hoops to get the different usb parts to produce debug data.
* Get bored with hard coded debug level variables and introduce a debug.usbjoe2002-07-311-0/+3
| | | | | | sysctl tree for tweaking them real-time. Reviewed by: iedowse
OpenPOWER on IntegriCloud