summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhid.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* First step towards making uiomove() take a size_t size argument:miod2015-02-101-4/+4
| | | | | | | - rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
* Change uhidev(4) set/get report functions in various way.mpi2014-12-111-20/+12
| | | | | | | | | | | | | | Always pass the parent uhidev(4) descriptor corresponding to the single USB device with multiple reportIDs instead of a child. Make uhidev_get_report() aware of non NUL reportID by prepending a byte to the given buffer, just like uhidev_set_report{,async}() already do. Return the number of bytes written or read upon success and -1 otherwise. This allow callers to deal with short reads without having do mess with xfer error codes madness. Reviewed and tested by David Higgs.
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-2/+2
| | | | after discussions with beck deraadt kettenis.
* Modify the uhidev_*_report() methods to always take a report ID argumentmpi2014-04-151-4/+6
| | | | | | | | instead of using the default, per-driver, one. This is a step to move away from the 1 report ID <-> 1 driver design which is no longer true since the addition of upd(4). ok andre@
* Add a temporary hack to let a subdriver claim all the reportIDs ofmpi2014-03-191-5/+4
| | | | | | | a device. This should be removed once all the drivers attaching to uhidev(4) are converted. ok andre@, sthen@
* Kill matchlvl usage throughout the usb stack.pirofti2013-11-191-3/+3
| | | | | | Allows us to move forward on cleaning. Okay mpi@
* Clean-up the HID environment.pirofti2013-11-151-29/+12
| | | | | | | | | | | | | | | | | | | | | This set of drivers were very very dirty. i/ Clean-up the match/attach multi-casting hackjob - stop casting aux to every attach arg in existance - be consistent about casting it only to uhidev_attach_arg - fetch the usb_attach_arg from above where needed ii/ Sort out the activate routines - leave the deactivation to the parent (uhidev(4)) - ditch the sc_dying flag in favour of usbd_is_dying() iii/ Get closer to keeping all the usb hid information in the uhidev structure (one uhidev per reportID) - store the usbd_device in the uhidev - use it consistently instead of always peaking at the parent's soft state Okay mpi@
* Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thingmatthew2011-07-031-4/+1
| | | | | | | | that's ever used it, and it's long since been changed to use DVACT_{QUIESCE,SUSPEND,RESUME} instead. ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it up a few weeks ago
* kqueue attach functions should return an errno or 0, not a plain 1. Fixnicm2011-07-021-2/+2
| | | | | | the obvious cases to return EINVAL and ENXIO. ok tedu deraadt
* garbage collect "usb events". without /dev/usb there is no way to accessjakemsr2011-01-251-7/+1
| | | | | | them from userland, and nothing in the kernel uses them. ok krw@, miod@
* remove dying flag in detach() function.yuo2010-09-241-3/+1
| | | | | | The dying flag will be set in activate()/DEACTIVATE. ok deraadt@
* Handle USB_GET_REPORT, USB_GET_REPORT_DESC, USB_GET_REPORT_ID andmiod2010-08-021-75/+19
| | | | | | | USB_SET_REPORT ioctls in ukbd and ums. This allows usbhidctl to be used on these devices e.g. to dump the report descriptor of troublesome models. ok deraadt@
* Correct the links between threads, processes, pgrps, and sessions,guenther2010-07-261-8/+8
| | | | | | | | | so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
* add USB_GET_DEVICEINFO and USB_GET_STRING_DESC ioctl to the uhid(4).yuo2009-11-231-1/+17
| | | | ok jsg@ deraadt@
* Every selwakeup() should have a matching KNOTE() (even if kqueue isn'tnicm2009-11-091-2/+1
| | | | | | | | | | supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and remove it from any occurences where both are used, except one for kqueue itself and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag). Based on a diff from tedu. ok deraadt
* Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()deraadt2009-10-311-1/+2
| | | | | | | calls can go directly into selwakeup() safely long discussion with nicm, murmers of consent from tedu and miod, noone else seems to care of kqueue is busted as long as it makes their sockets move data fast... pretty sad.
* Get rid of devact enum, substitute it with an int and coresponding defines.pirofti2009-10-131-3/+3
| | | | | | This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
* clalloc() can't fail, so there's no need to handle failure cases.blambert2009-07-191-5/+3
| | | | | | | | Change to void function. Also, no need to have global tty stats pointer, so just return it from clalloc, as the caller frees it immediately anyway. ok miod@
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* Remove the definition and usage of the USB_DECLARE_DRIVER_CLASS andmbalmer2007-06-141-2/+17
| | | | | | | | USB_DECLARE_DRIVER macros. No binary change. ok dlg.
* Remove the definition and use of the device_ptr_t which was a struct device *.mbalmer2007-06-121-2/+2
| | | | | | No binary change. ok mk.
* Remove the usb_proc_ptr type definition, which was really a 'struct proc *'mbalmer2007-06-111-8/+8
| | | | | | | | only. No binary change. ok mk.
* Remove the USB_GET_SC_OPEN macro. There is a double check for sc == NULL inmbalmer2007-06-111-2/+6
| | | | | | | | ulpt.c, I am aware of that and it will be changed later. No binary change. ok mk.
* Remove the definition and use of the USB_GET_SC macro, no binary change.mbalmer2007-06-111-7/+7
| | | | ok mk.
* More USB cleanup: In usb_port.h, get rid of the sel_klist #definemk2007-06-111-4/+4
| | | | | | | (which was there twice without gcc complaining) and update all uses of it. ok jsg mbalmer
* Remove the definition and use of the USBDEV macro. It only created confusionmbalmer2007-06-101-6/+6
| | | | | | | | and the address of it's argument: USBDEV(sc->sc_dev) yields &sc->sc_dev. No binary changes. ok jsg.
* Remove the "Static" declaration of many functions. It was defined to be emptymbalmer2007-06-051-11/+11
| | | | | | | and it was not consistently used. It was confusing as it suggested these functions were static, which they were not. discussed with dlg and jsg, ok jsg.
* Last part of FreeBSD/NetBSD sepcific code removal.mbalmer2007-06-041-20/+1
| | | | ok jsg@
* Farewell USB_{ATTACH,MATCH,DETACH}* you will not be missed.jsg2007-05-271-9/+11
| | | | ok deraadt@ krw@ mbalmer@
* Remove logprintf macrojsg2007-05-211-3/+3
|
* poll errors should be POLLERR, not some random E valuetedu2006-11-011-2/+2
| | | | from alexandre ratchov. ok claudio
* In a drivers activate() entry point, if on DVACT_DEACTIVATE it doesmiod2006-06-231-2/+2
| | | | | | something, then it MUST return zero on DVACT_ACTIVATE, not EOPNOTSUPP; this very popular bug has been cut and pasted a lot of times... ok deraadt@ mickey@
* Move contents of sys/select.h to sys/selinfo.h in preparation for amillert2005-11-211-2/+2
| | | | | userland-visible sys/select.h. Consistent with what Net and Free do. OK deraadt@, tested with full ports build by naddy@.
* put "do { } while (0)" wrappers on all the debug maroc functionsderaadt2004-07-081-3/+3
|
* kqueue support for various usb devices including: usb, uhid, ugen,nate2003-06-271-2/+68
| | | | | and uscanner From NetBSD
* fix documentation links from netbsdnate2003-05-191-2/+2
|
* sync with NetBSDnate2002-11-111-4/+18
|
* update $NetBSD$ tagsnate2002-07-251-2/+2
|
* get rid of trailing whitespacenate2002-07-251-6/+6
|
* Please be more portable in usb landnate2002-07-111-1/+5
|
* no provate cdev_decl()s, they are in sys/conf.h nowmickey2002-07-101-3/+1
|
* Sync hid stuff including ukbd, ums, and uhid with NetBSDnate2002-05-091-265/+84
| | | | | | | | | This adds a uhidev device which can be thought of as something like a uhid bus. It allows more than one ukbd, ums, or uhid to attach to the same device instance. This functionality is found on many of the newer keyboards that have extra buttons. (The extra buttons show up as uhid device(s)). Tested by me on i386, dale on macppc, and jason on sparc64
* Meant to commit only ulpt and committed everything. Most things weren't readynate2002-05-071-84/+265
|
* Sync ulpt driver with NetBSDnate2002-05-071-265/+84
|
* prefix structure members to avoid name clashes.nate2002-05-021-9/+10
| | | | From NetBSD
* Synchronize usb code with NetBSD.nate2001-10-311-5/+7
|
* Sync with NetBSD. Tested with a USB keyboard, USB mouse, and three differentaaron2001-05-031-2/+2
| | | | kue(4) Ethernet devices.
* Another USB sync with NetBSD. We are still lacking an up-to-date umass(4)aaron2001-01-281-4/+22
| | | | | | driver. I would appreciate it if someone with the hardware looked into it. I also have to take a closer look at changes to the USB Ethernet drivers, as well as import some drivers we are missing (uftdi, if_upl, yap, etc.)
* Sync with NetBSD. Too many changes to mention. For now I have skippedaaron2000-11-081-59/+21
| | | | umass.c and ukbd.c as the diffs are a bit hairier.