Version 1_6_0
=============


New USB driver for FreeBSD 5/6/7
================================


FEATURES
========

  - Full support for EHCI/OHCI/UHCI USB controllers, all transfer types

  - New and Giant free USB API, that supports per transfer mutexes.

  - New "ugen" driver that supports all transfer types

  - Starting and stopping transfers is non-blocking and can
    be done while holding a mutex.
  
  - Includes patches for "uaudio.c" to make "full duplex" work.

  - All callouts are initialized using "callout_init_mtx()"


HOW TO INSTALL AS ROOT ON FREEBSD
=================================

Download the three files below into a new directory and type 
"make install"  (to uninstall type "make deinstall")
http://www.turbocat.net/~hselasky/usb4bsd/releases/FreeBSD/1_6_0/Makefile
http://www.turbocat.net/~hselasky/usb4bsd/releases/FreeBSD/1_6_0/new_usb_1_6_0.diff.bz2
http://www.turbocat.net/~hselasky/usb4bsd/releases/FreeBSD/1_6_0/new_usb_1_6_0.tar.bz2

Type "make help" to get more help.


DEVELOPER NOTES
===============

This driver also supports the old USB API. But one should not expect
USB device drivers using the old USB API to work reliably.

Be aware that high speed isochronous transfers consume 8 frames per
millisecond, and consequently one can allocate 8 times more frames. 
Currently the maximum number of frames per transfer is 128*8, but 
64*8 is recommended.

There are now two refcounts in each "struct usbd_xfer". The one
refcount keeps track of the number of threads that are holding a
reference to it, and is decremented when memory is freed. The other
refcount keeps track of the number of re-starts, and is incremented
when a USB transfer is stopped. For example see "ehci_pcd_enable()" in
"/sys/dev/usb2/_ehci.c" and "usbd_do_callback()" in
"/sys/dev/usb2/_usb.c". This is almost like in Objective C.

Stopping and starting a transfer does not block or sleep, which means one can 
hold a lock while doing this. I have added a callback, search for 
"priv_func", that will be called just before the USB transfer memory is 
freed. This can be used for mutex destruction purposes, and alike.

I have done an great deal of work on "ugen" and it should now support BULK-, 
INTERRUPT- and ISOCHRONOUS- transfers in read and write direction. If you are 
interested, you can have a look at: "/sys/dev/usb2/_ugen.c"

--HPS