Up to [DragonFly] / src / sys / bus / usb
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Minimal (relatively) patch to make my Nokia 9300 smartphone which uses union descriptors, work in DF. Obtained-from: NetBSD with modifications
Remove last usb_port.h defines usages from the tree - selwakeuppri(), config_pending_*(), config_detach(), clalloc(), clfree(), usb_malloc_type and usb_proc_ptr. Move some defines to bus/usb/usb.h and remove bus/usb/usb_port.h include from there. Drivers that want to use portability macros have to include <bus/usb/usb_port.h> directly.
Nuke SIMPLEQ_* and logprintf.
Nuke device_ptr_t, USBBASEDEVICE, USBDEVNAME(), USBDEVUNIT(), USBGETSOFTC(), USBDEVPTRNAME() and Static with help from sed(1).
Nuke the code specific to NetBSD/OpenBSD/FreeBSD at first. I doubt anyone will update these pieces and I don't intend to review macros for all platforms. There is the chance though that I might kill something which should stay in the code in form "TODO: port it to DF". So, please review and kick me.
Rename printf -> kprintf in sys/ and add some defines where necessary (files which are used in userland, too).
Sync USB support (host controller part) with FreeBSD6. Following changes on FreeBSD-CURRENT(by firstname.lastname@example.org) are merged: ehci.c rev 1.52 ohci.c rev 1.167 uhci.c rev 1.172 usb.c rev 1.111 usbdi.h rev 1.61 "Use a different task queue for host controller and peripheral driver tasks. Since the host controllers rely on tasks to process transfer timeouts, if a synchronous transfer from a driver was invoked from a task and timed out, it would never complete because the single task thread was stuck performing the synchronous transfer so couldn't process the timeout." As of this commit, only following kernel APIs are changed: - usbd_get_string_desc() takes one more argument which returns the actual size of the string description. - usb_add_task() takes one more argument. The extra arguemnt is used to specify to which task queue the task should be added. There is two task queues defined, one for peripheral driver (USB_TASKQ_DRIVER), one for host controller (USB_TASKQ_HC). ugen(4) is adapted according to the above kernel API changes. Thank all of the folks for their work on the USB support. Tested-by: swildner@, vbd@, joerg@(1.6 backport), Max Herrgard <email@example.com> # Though VT6202 is supported by ehci(4), I still have problems with this # chip, even with the updated ehci(4).
Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 1
Remove spl*() calls from the bus/ infrastructure, replacing them with critical sections. Remove splusb() from everywhere, replacing it with critical sections.
Use M_INTWAIT and M_WAITOK instead of M_NOWAIT within the USB bus infrastructure. For the system to operate as expected, allocations done in this layer have to be reliable.
Add defined(__FreeBSD__) and defined(__DragonFly__) where appropriate
Bring in the entire FreeBSD-5 USB infrastructure. As of this commit my USB camera, Hard Drive, Mouse, and Sony memory key all work and I can even unplug and replug them in without crashing the port. Not all drivers and subsystems compile as of this commit, but the ones that do not are very close.
kernel tree reorganization stage 1: Major cvs repository work (not logged as commits) plus a major reworking of the #include's to accomodate the relocations. * CVS repository files manually moved. Old directories left intact and empty (temporary). * Reorganize all filesystems into vfs/, most devices into dev/, sub-divide devices by function. * Begin to move device-specific architecture files to the device subdirs rather then throwing them all into, e.g. i386/include * Reorganize files related to system busses, placing the related code in a new bus/ directory. Also move cam to bus/cam though this may not have been the best idea in retrospect. * Reorganize emulation code and place it in a new emulation/ directory. * Remove the -I- compiler option in order to allow #include file localization, rename all config generated X.h files to use_X.h to clean up the conflicts. * Remove /usr/src/include (or /usr/include) dependancies during the kernel build, beyond what is normally needed to compile helper programs. * Make config create 'machine' softlinks for architecture specific directories outside of the standard <arch>/include. * Bump the config rev. WARNING! after this commit /usr/include and /usr/src/sys/compile/* should be regenerated from scratch.
Remove the priority part of the priority|flags argument to tsleep(). Only flags are passed now. The priority was a user scheduler thingy that is not used by the LWKT subsystem. For process statistics assume sleeps without P_SINTR set to be disk-waits, and sleeps with it set to be normal sleeps. This commit should not contain any operational changes.
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most ids have been removed from !lint sections and moved into comment sections.
import from FreeBSD RELENG_4 188.8.131.52