summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ums.c
Commit message (Collapse)AuthorAgeFilesLines
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* select() DKI is now in <sys/selinfo.h>.wollman2001-01-091-0/+4
|
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* Initiate deorbit burn sequence for <machine/mouse.h>.phk2000-10-091-1/+1
| | | | | | | | | | Replace all in-tree uses with <sys/mouse.h> which repo-copied a few moments ago from src/sys/i386/include/mouse.h by peter. This is also the appropriate fix for exo-tree sources. Put warnings in <machine/mouse.h> to discourage use. November 15th 2000 the warnings will be converted to errors. January 15th 2001 the <machine/mouse.h> files will be removed.
* Remove __P prototypes to reduce diffs between the NetBSD and FreeBSDn_hibma2000-07-171-7/+7
| | | | versions.
* 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-20/+20
| | | | | | #define Static static that the OpenBSD folks can define it to be empty if they like.
* More USB ethernet tweaks:wpaul2000-01-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* Revoke the vnodes on detach. This avoids the crashes people have seenn_hibma1999-11-211-4/+6
| | | | | | | 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.
* Synchronisation with NetBSD as of 1999/11/16:n_hibma1999-11-171-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* The Qtronix keyboard has a built in PS/2 port for a mouse.n_hibma1999-11-081-52/+100
| | | | | | | | | | | | It however posts a bogus button up event once in a while. Whenever we receive dx=dy=dz=buttons=0 we postpone adding it to the queue for 50msecs with a timeout. If in the meantime something else is posted the event is ignored. This avoids the problem Nik Sayer reported. He noticed that X windows would drop and pick up a window once in a while. Thanks, Nik, for supplying me with the keyboard to fix the problem!
* Rename remove_dev() to destroy_dev().phk1999-11-081-1/+1
| | | | Nagged about by: msmith
* ulpt.c and ums.c already uses make_dev(), so there's no need to use thepeter1999-11-081-2/+1
| | | | (presently broken) DEV_DRIVER_MODULE(). Use DRIVER_MODULE() directly.
* Add make_dev and remove_dev.n_hibma1999-10-071-0/+7
|
* Remove the last bits and pieces left over from porting the drivern_hibma1999-10-071-27/+9
| | | | from NetBSD.
* 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
* Typo: 'x' should be 'y' (only affects debugging output)n_hibma1999-09-011-1/+1
|
* Remove NetBSD specific code. USB part is trivial, and the rest is notn_hibma1999-08-281-79/+0
| | | | shared anyway.
* 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
|
* 1) Add non-blocking I/O on readn_hibma1999-06-131-6/+32
| | | | | 2) Add checks to make sure we do not dereference the softc when not found because the device has been removed.
* 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.
* When the mouse is being disconnected, do the followings:n_hibma1999-05-301-4/+14
| | | | | | | | - Call ums_disable() to abort the pipe. - Do not wake up processes which has been waiting or polling for mouse data. It won't be available anymore. Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
* Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference betweenphk1999-05-091-1/+1
| | | | a major number for a dev_t.
* Continue where Julian left off in July 1998:phk1999-05-071-2/+2
| | | | | | | | | | | | | | Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline) function. Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention to the order of the cmaj/bmaj arguments!) Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE (ditto!) (Next step will be to convert all bdev dev_t's to cdev dev_t's before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
* Z direction was upside down.n_hibma1999-05-011-2/+6
| | | | Submitted By: MAEKAWA Masahide
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-5/+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-6/+6
| | | | | | | 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)
* make ums look like a Mouse Systems or Sysmouse mouse. Remove PS/2 interf.n_hibma1999-02-211-57/+111
| | | | | Supplied by MAEKAWA Masahide <bishop@rr.iij4u.or.jp>. Thanks! USB Mouse now supports up to 7 buttons and X,Y,Z (wheel) directions.
* Applied patch from MAEKAWA Masahide <bishop@rr.iij4u.or.jp>. (PR2)n_hibma1999-02-151-0/+8
| | | | | | Seems to solve a problem with a mouse not responding to movements in the X direction. Problem description is still rather vague and solution is not exactly clear. Problem might be a compiler optimisation.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-2/+2
| | | | kernel compile
* forgotten in previous commit: Lowered default debug leveln_hibma1999-01-221-1/+1
|
* Fixed disconnect for umousen_hibma1999-01-221-2/+7
|
* Cleaning up, improving _detach, removing ominous warning (msmith)n_hibma1999-01-211-9/+22
|
* Corrected the latent fact that the uhub driver was providing a driver forn_hibma1999-01-141-1/+1
| | | | | the usb device class instead of the uhub devclass. Only a problem with more than one USB host controller.
* 1) textual changesn_hibma1999-01-121-48/+24
| | | | | | 2) bug fix in handling of select (or presumed bug) 3) trigger a mouse packet on the Z direction as well (but Z still not working)
* Sync with NetBSD sources. Almost there. Mostly style fixes.n_hibma1999-01-101-8/+15
|
* Major synchronisation with NetBSD USB coden_hibma1999-01-071-160/+84
|
* Corrected the major number for usb and added ums as major 111n_hibma1999-01-031-2/+2
|
* Added Id to all filesn_hibma1998-12-141-0/+1
|
* Updated USB kernel sources to NetBSD sources of 1998-12-09.n_hibma1998-12-131-1/+1
| | | | | 1 bug fix and several textual changes. Preparing to feed back changes for port into NetBSD to create one source base.
* Initial commit of ported NetBSD USB stackn_hibma1998-11-261-0/+812
OpenPOWER on IntegriCloud