Latest driver info, v.1.6.1, June 2006; Press here to show the document (HTML)
Old driver info, v.1.6.0, April 2006; Press here to show the document (HTML)
Old driver info, v.1.5.9.r3, February 2006; Press here to show the document (HTML)
Old driver info, v.1.5.9, February 2006; Press here to show the document (HTML)
Old driver info, v.1.5.4, September 2005; Press here to show the document (HTML)
Code reference for the new USB stack and device drivers; Press here to show the document (PDF)
Overview over the new USB API; Press here to show the document (HTML)
Release directory; Press here to show the directory

This directory also contains driver snapshots.

 


Press here to show the print version.

 


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.


How to install as root
======================

Download the three files below into a new directory and type 
"make install"  (to uninstall type "make deinstall")
http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile
http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2
http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2

Type "make help" to get more help.


Developer notes
===============

This driver also supports the old USB API.

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"

TODO
====

I want to use "callout_init_mtx()", but I am not sure when this was 
introduced, and to not break this driver on older versions of FreeBSD, I 
still use "callout_init()". But this is just a matter of a few one-liners.

--HPS

This document was last updated on Wed Oct 15 08:55:57 CEST 2008.