Commit Graph

19 Commits

Author SHA1 Message Date
Nick Hibma
3241be7550 Synchronisation with NetBSD as of 1999/11/16:
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.
1999-11-17 22:33:51 +00:00
Nick Hibma
271ef6615e Remove last bits and pieces of NetBSD porting.
Remove the use of ukbd_disconnect and replace it with direct
calls to disable.
Change printf to DPRINTF
Remove the use of usbd_lock, change it to splusb()/splx()
1999-10-07 18:53:08 +00:00
Nick Hibma
d88879933b We use device_set_desc_copy, so we do not need to free the copied text
manually.
1999-08-28 11:35:36 +00:00
Kazutaka YOKOTA
800da3b22a - Remove cdevsw entry points in individual keyboard drivers;
instead, use generic entry points for all drivers.
- Eliminate bogus makedev().
- Eliminate softc in the lower drivers, as it is no longer necessary.

Submitted (95%) by: phk
1999-08-22 09:52:33 +00:00
Nick Hibma
7678b59a40 Change 'device' to 'self', to be more like the rest of the code 1999-06-26 12:55:25 +00:00
Poul-Henning Kamp
4e2f199e0c This commit should be a extensive NO-OP:
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.
1999-05-30 16:53:49 +00:00
Nick Hibma
f99abb25a6 Change '#if UKBD_DEBUG' to '#ifdef...'
Remove freeing of description on detach. Is done by subr_bus.c.
1999-05-03 23:16:05 +00:00
Nick Hibma
67aa00a71b 1) Make debugging more selective.
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)
1999-04-11 20:50:33 +00:00
Nick Hibma
91fe4c07fa Applied patch for ukbd disconnect. Disconnect not fully functional
yet however.

Supplied by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-04-11 16:49:15 +00:00
Nick Hibma
86df1e04cc Implementation of the keyboard driver.
Done by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-03-22 19:55:30 +00:00
Matthew Dillon
0a5e03dda5 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 01:59:53 +00:00
Nick Hibma
235dddd4ea Textual changes 1999-01-22 00:51:12 +00:00
Nick Hibma
1c8fa23724 Corrected the latent fact that the uhub driver was providing a driver for
the usb device class instead of the uhub devclass. Only a problem with more
than one USB host controller.
1999-01-14 01:28:15 +00:00
Nick Hibma
bc2093747f Changed 'xxxdebug = 0' to '...= 1' (Brian Feldman) 1999-01-13 01:09:14 +00:00
Nick Hibma
53809e8652 Sync with NetBSD sources. Almost there. Mostly style fixes. 1999-01-10 18:42:54 +00:00
Nick Hibma
a73f7cf01f Major synchronisation with NetBSD USB code 1999-01-07 23:07:57 +00:00
Nick Hibma
6fef2c2c27 Added Id to all files 1998-12-14 09:32:25 +00:00
Nick Hibma
3e041e6116 Updated USB kernel sources to NetBSD sources of 1998-12-09.
1 bug fix and several textual changes.
Preparing to feed back changes for port into NetBSD to create one source base.
1998-12-13 22:27:42 +00:00
Nick Hibma
0cec007c5f Initial commit of ported NetBSD USB stack 1998-11-26 23:13:13 +00:00