In Linux, writing to USB devices from a user-land application is a tedious process. The current USB file system uses ioctl calls to read and write to endpoints. This means that standard tools cannot be used to communicate with USB devices.
A new USB filesystem, usbfs2, would implement standard file operations, such as read and write, for each endpoint. usbfs2 would have one file per endpoint (usbfs currently has one file per device). Some of the USB operations may need to be implemented with ioctls. However, most of the USB transfers will fit neatly into the Unix stream I/O model.
usbfs2 will also support asynchronous transfers using in-kernel asynchronous I/O. An application wishing to have asynchronous transfers would use the sys_io_* functions; if an application simply wanted blocking transfers, it would use the standard read/write (and perhaps ioctl) calls.
- Sarah Sharp
- Jamey Sharp
- Josh Triplett
In order for usbfs2 to work properly, the in-kernel AIO system needs to be fixed. Specifically, the races described on the work page need to be fixed before the cancelation code can be used. The initial test harness for catching the race conditions is now available on the aio branch of the repository.
The usbfs2-async branch has been updated against 2.6.24-rc1. It compiles, although the behavior is probably not correct yet. The other branches are not up-to-date with the mainline kernel yet, and probably won't be for a while. The todo list has been updated.
The copyright has been reassigned to Intel Corporation, since Sarah Sharp now works for them. The license is still GPL (version 2 only), and the plan is still to get the code into the mainline kernel.
The mailing list for this project is hosted on svcs.
The URL for my GIT repo is http://svcs.cs.pdx.edu/~sarah/usbfs2.git
The synchronous bulk endpoint patches are in the branch usbfs2, and all my asynchronous work is on the usbfs2-async branch.