Commit Graph

25 Commits

Author SHA1 Message Date
Archie Cobbs
4a6a94d8d8 Replace (ab)uses of "NULL" where "0" is really meant. 2002-08-22 21:24:01 +00:00
Josef Karthauser
8c8cd21069 MFNetBSD: uhid.c (1.45), ums.c (1.49), usbdi_util.c (1.35), usbdi_util.h (1.23)
date: 2001/10/26 17:58:21;  author: augustss;
    s/usbd_alloc_report_desc/usbd_read_report_desc/
2002-04-07 17:13:00 +00:00
Josef Karthauser
05172ec004 MFNetBSD: usbdi.c (1.85), usbdi.h (1.54), usbdi_util.c (1.37)
date: 2001/11/15 15:15:59;  author: augustss;
    usbd_interface2device_handle() cannot fail.
2002-04-07 10:50:41 +00:00
Josef Karthauser
84aa7f035a Update $NetBSD$ idents to reflect reality. 2002-04-01 17:54:07 +00:00
Josef Karthauser
c0fdce4463 Merge from NetBSD:
usb_port.h (1.33), usbdi_util.c (1.32), usbdi_util.h (1.22):

    ----------------------------
    date: 2000/06/01 14:37:51;  author: augustss;
    Improve some portability items.
    ----------------------------
2002-04-01 16:09:43 +00:00
Josef Karthauser
dd78396c46 Use ANSI prototypes and declarations. 2002-04-01 15:01:29 +00:00
Josef Karthauser
981149d059 Merge from NetBSD:
----------------------------
    revision 1.26
    date: 1999/11/28 22:49:53;  author: augustss;  state: Exp;  lines: +12 -8
    More USB_DEBUG and DIAGNOSTIC output.
    ----------------------------
2002-04-01 13:50:42 +00:00
Nick Hibma
0bea5808a1 Don't free memory that has been freed already.
Null the pointer after freeing the memory.

PR:		27370
Submitted by:	Alec Barea <alec@barea.org>
MFC after:	5 days
2001-06-30 10:57:37 +00:00
Nick Hibma
4f04f78215 Remove __P prototypes to reduce diffs between the NetBSD and FreeBSD
versions.
2000-07-17 18:41:20 +00:00
Nick Hibma
128aa3af3c Change Lennart's e-mail address. 2000-05-14 16:43:10 +00:00
Nick Hibma
cdb51d12a6 OpenBSD has a broken debugger that does not grok static. Use a
#define Static  static

that the OpenBSD folks can define it to be empty if they like.
2000-04-03 20:58:30 +00:00
Nick Hibma
a9909bdaab Synchronisation with NetBSD 1999/11/27
- more req[uest]->xfer changes.
- get the corresponding NetBSD Id's right

ohci.c
   - move untimeout above print statement
   - remove usb_delay that panics the system (tsleep in intr context) when
   ohcidebug > 5.

ugen.c
   - create the devices for endpoints with make_dev.

uhub.c
   - change from using usbdebug to uhubdebug
   - add more debugging statements
1999-11-28 21:01:06 +00:00
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
24b4921ad1 Remove superfluous header file includes.
Pushed-By:	phk
1999-11-08 21:06:21 +00:00
Nick Hibma
8c895d718b Major synchronisation with the NetBSD USB stack:
- 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
1999-10-07 19:26:38 +00:00
Nick Hibma
51b98897fa Only NetBSD needs sys/device.h. 1999-08-29 11:56:49 +00:00
Masahide MAEKAWA
a0f9149b19 o synchronisation with NetBSD
Reviewed by:	Hick Hibma
Obtained from:	NetBSD
1999-08-29 01:18:32 +00:00
Nick Hibma
139559717b Descriptors can be delivered with short transfers. 1999-05-03 23:21:28 +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
235dddd4ea Textual changes 1999-01-22 00:51:12 +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