summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhid.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* MFNetBSD: uhid.c (1.45), ums.c (1.49), usbdi_util.c (1.35), usbdi_util.h (1.23)joe2002-04-071-2/+2
| | | | | date: 2001/10/26 17:58:21; author: augustss; s/usbd_alloc_report_desc/usbd_read_report_desc/
* MFNetBSD:joe2002-04-071-3/+3
| | | | | | revision 1.44 date: 2001/09/15 16:16:28; author: yamt; state: Exp; lines: +3 -3 correct debug messages.
* MFNetBSD: uhid.c (1.42 & 1.43), ugraphire_rdesc.h (1.1)joe2002-04-071-3/+24
| | | | | | | | | | | | | date: 2000/12/29 01:47:49; author: augustss; Supply our own report descriptor (from Nick Hibma) for the Wacom Graphire. The descriptor it reports is broken. XXX Not tested, because I don't have the device. date: 2001/08/15 00:06:49; author: augustss; state: Exp; lines: +3 -1 If there was a vendor+product locator match return a higher match value. Rationale, if you have a device (e.g., a mouse) with a more specific driver but want to recognize it with the more generic driver you can do that by supplying vendor and product locators for the generic one.
* MFNetBSD:joe2002-04-011-3/+4
| | | | | | | revision 1.40 date: 2000/10/10 12:37:01; author: augustss; state: Exp; lines: +4 -3 Don't free unallocated pointer in detach (can happen if detach happens before attach has finished).
* Use ANSI prototypes and declarations.joe2002-04-011-50/+13
| | | | Update $NetBSD$ idents to better reflect reality.
* Be more specific about when block major numbers disappeared fromjoe2002-03-111-1/+1
| | | | the cdev switch.
* Prefix structure members to protect them against clashes with eg.alfred2002-02-201-7/+7
| | | | | | | | | c++ keywords. This keeps us in sync with NetBSD because they actually committed my delta first. Ok'd by: lennard
* Re-add bmaj to the cdevsw's, but don't compile it in on -current.joe2002-02-151-0/+3
| | | | | This makes the code more portable between -current, -stable and the other BSDs.
* Sync with NetBSD:joe2002-01-021-1/+1
| | | | | | date: 2000/02/29 21:37:01; author: augustss; state: Exp; Distinguish between device and interface classes. (I finally found a document that said that they were different.)
* NetBSD have introduced usb_proc_ptr for us (they'll be needing it soon too)joe2002-01-021-15/+15
| | | | to hide the distinction between struct proc and struct thread.
* KSE Milestone 2julian2001-09-121-15/+15
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Only clear endpoint stall if status was USBD_STALLED.n_hibma2001-09-021-1/+2
| | | | | This avoids panicing the system by unplugging a hub. The interrupt transfer would sometimes arrive after the driver had been removed.
* Don't free memory that has been freed already.n_hibma2001-06-301-2/+0
| | | | | | | | Null the pointer after freeing the memory. PR: 27370 Submitted by: Alec Barea <alec@barea.org> MFC after: 5 days
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-011-0/+2
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Grab the process lock while calling psignal and before calling psignal.jhb2001-03-071-0/+2
|
* select() DKI is now in <sys/selinfo.h>.wollman2001-01-091-0/+4
|
* Remove unneeded includes (phk)n_hibma2000-10-101-2/+1
|
* Remove __P prototypes to reduce diffs between the NetBSD and FreeBSDn_hibma2000-07-171-6/+6
| | | | versions.
* Sync with NetBSD:n_hibma2000-05-141-7/+70
| | | | | | Add USB_SET_REPORT ioctl. Add FIOASYNC, TIOCSPGRP ioctl. Change some debugging output
* Change Lennart's e-mail address.n_hibma2000-05-141-1/+1
|
* OpenBSD has a broken debugger that does not grok static. Use an_hibma2000-04-031-5/+5
| | | | | | #define Static static that the OpenBSD folks can define it to be empty if they like.
* Fix flushing of the clists before deleting them. Stops the machinen_hibma2000-03-021-0/+1
| | | | | | | | | | from panicing when disconnecting a USB Wacom Graphire tablet. jhk approved the fix some time ago, but I forgot to actually commit the thing. Reported by: Dirk van Gulik <dirkx@webweaving.org> Approved by: jhk
* More USB ethernet tweaks:wpaul2000-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Sync ohci, uhci and usbdi modules with NetBSD in order to obtain the following improvements: o New USBD_NO_TSLEEP flag can be used in place of UQ_NO_TSLEEP quirk. This allows drivers to specify busy waiting only for certain transfers (namely control transfers for reading/writing registers and stuff). o New USBD_FORCE_SHORT_XFER flag can be used to deal with devices like the ADMtek Pegasus that sense the end of bulk OUT transfers in a special way (if a transfer is exactly a multiple of 64 bytes in size, you need to send an extra empty packet to terminate the transfer). o usbd_open_pipe_intr() now accepts an interval argument which can be used to change the rate at which the interrupt callback routine is invoked. Specifying USBD_DEFAULT_INTERVAL uses the value specified in the device's config data, but drivers can override it if needed. - Change if_aue to use USBD_FORCE_SHORT_XFER for packet transmissions. - Change if_aue, if_kue and if_cue to use USBD_NO_TSLEEP for all control transfers. We no longer force the non-tsleep hack for bulk transfers since these are done asynchronously anyway. - Removed quirk entry fiddling from if_aue and if_kue since we don't need it anymore now that we have the USBD_NO_TSLEEP flag. - Tweak ulpt, uhid, ums and ukbd drivers to use the new arg to usbd_open_pipe_intr(). - Add a flag to the softc struct in the ethernet drivers to indicate when a device has been detached, and use this flag to perform tests to prevent the drivers from trying to do control transfers if this is the case. This is necessary because calling if_detach() with INET6 enabled will eventually result in a call to the driver's ioctl() routine to delete the multicast groups on the interface, which will result in attempts to perform control transfers. (It's possible this also happens even without INET6 support enabled.) This is pointless since we know that if the detach method has been called, the hardware has been unplugged. - Changed watchdog timeout routines to just call the driver init routines to initialize the device states without trying to close and re-open the pipes. This is partly because we don't want to frob things at interrupt context, but also because this doesn't seem to work right and I don't want to panic the system just because a USB device may have stopped responding. - Fix aue_rxeof() to be a little smarter about detecting when a double transfer is needed. Unfortunately, the design of the chip makes it hard to get this exactly right. Hopefully, this will go away once either Nick or Lennart finds the bug in the uhci driver that makes this ugly hack necessary. - Also sync usbdevs with NetBSD.
* Correct the last parameter for clallocn_hibma1999-11-281-2/+2
|
* Revoke the vnodes on detach. This avoids the crashes people have seenn_hibma1999-11-211-10/+18
| | | | | | | when moused was still running when the mouse was detached. Convert uhid to use make_dev while I am there. Ugen still needs to be converted.
* Change the clist reservation from 0 to buffer size.n_hibma1999-11-181-1/+1
| | | | Submitted by: mmoeller@infolibria.com
* Synchronisation with NetBSD as of 1999/11/16:n_hibma1999-11-171-55/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up the code: - Declare many functions static - Change variable names to make them more self explanatory - Change usbd_request_handle -> usbd_xfer_handle - Syntactical changes - Remove some unused code - Other KNF changes Interrupt context handling - Change delay to usbd_delay_ms were possible (takes polling mode into account) - Change detection mechanism for interrupt context Add support for pre-allocation DMA-able memory by device driver Add preliminary support for isochronous to the UHCI driver (not for OHCI yet). usb.c, uhci.c, ohci.c - Initial attempt at detachable USB host controllers - Handle the use_polling flag with a lttle more care and only set it if we are cold booting. usb.c, uhci.c ohci.c, usbdi.c usbdi_util.c usb_subr.c - Make sure an aborted pipe is marked as not running. - Start queued request in the right order. - Insert some more DIAGNOSTIC sanity checks. - Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN. usb.c, usb_subr.c - Add an event mechanism so that a userland process can watch devices come and go. ohci.c - Handle the case when a USB transfer is so long that it crosses two page (4K) boundaries. OHCI cannot do that with a single TD so we make a chain. ulpt.c - Use a bigger buffer when transferring data. - Pre-allocate the DMA buffer. This makes the driver slightly more efficient. - Comment out the GET_DEVICE_ID code, because for some unknown reason it causes printing to fail sometimes. usb.h - Add a macro to extract the isoc type. - Add a macro to check whether the routine has been entered after splusb and if not, complain. usbdi.c - Fix a glitch in dequeueing and aborting requests on interrupt pipes. - Add a flag in the request to determine if the data copying is done by the driver or the usbdi layer.
* Avoid the usurping messagen_hibma1999-11-111-1/+8
|
* Use cdevsw_add() explicitly as a workaround for DEV_DRIVER_MODULE().peter1999-11-081-2/+4
| | | | This should be changed to use make_dev() at some point.
* Major synchronisation with the NetBSD USB stack:n_hibma1999-10-071-85/+176
| | | | | | | | | | | - Some cleanup and improvements in the uhci and ohci drivers - Support for plugging and unplugging devices improved - Now available is bulk transport over OHCI controllers - Resume and suspend have been temporarily been disabled again. Proper support for it is available in the uhci.c and ohci.c files but I have not yet spent the brain cycles to use it. - OpenBSD now uses the USB stack as well - Add FreeBSD tags
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* We use device_set_desc_copy, so we do not need to free the copied textn_hibma1999-08-281-1/+1
| | | | manually.
* Remove cmaj and bmaj args from DEV_DRIVER_MODULE.phk1999-07-041-2/+2
|
* This commit should be a extensive NO-OP:phk1999-05-301-4/+19
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* Enable the support for a file interface on the HID driver forn_hibma1999-05-091-1/+22
| | | | | | easy testing of the HID reports that come back. Submitted by: MAEKAWA Masahide <bishop@rr.iij4u.or.jp>
* Add URL to HID specn_hibma1999-05-031-1/+5
|
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-6/+1
| | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
* 1) Make debugging more selective.n_hibma1999-04-111-3/+3
| | | | | | | 2) create function usbd_errstr which turns a usbd_status into a sensible error message 3) Change the printf in DPRINTF to logprintf which is a define for log(KERN_DEBUG, x)
OpenPOWER on IntegriCloud