aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb2/core
Commit message (Collapse)AuthorAgeFilesLines
* Move the new USB stack into its new home.Andrew Thompson2009-02-2343-23203/+0
| | | | Notes: svn path=/head/; revision=188942
* Switch over to usbdevs.h generated at compile time.Andrew Thompson2009-02-181-3/+3
| | | | Notes: svn path=/head/; revision=188746
* MFp4 //depot/projects/usb@157699Andrew Thompson2009-02-141-50/+47
| | | | | | | | | | | | | | | | | | | Add two new functions to the libusb20 API and required kernel ioctls. - libusb20_dev_get_iface_desc - libusb20_dev_get_info New command to usbconfig, "show_ifdrv", which will print out the kernel driver attached to the given USB device aswell. See "man libusb20" for a detailed description. Some minor style corrections long-line wrapping. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=188622
* Remove unneeded execute-permissions from the USB2 device node.Ed Schouten2009-02-141-3/+3
| | | | | | | | | | | Giving a charactere device execute permissions doesn't have any use. Right now there isn't a single device node in /dev that has it, except the USB2 device node, so remove it. Approved by: hps, thompsa Notes: svn path=/head/; revision=188609
* MFp4 //depot/projects/usb; 157501, 157608, 157609Andrew Thompson2009-02-135-77/+29
| | | | | | | | | | | | - Make usb2_transfer_pending() part of the USB core header file. - Make usb2_transfer_pending() NULL safe. - Make sure that USB process functions return if the process has been drained. - Remove two unused functions. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=188600
* Remove usb2_config_td.[ch], they are no longer used.Andrew Thompson2009-02-092-392/+0
| | | | Notes: svn path=/head/; revision=188422
* MFp4 //depot/projects/usb; 157069, 157429, 157430Andrew Thompson2009-02-0911-43/+111
| | | | | | | | | | | - Change "usb2_pause_mtx" so that it takes the timeout value in ticks - Factor out USB ethernet and USB serial driver specific control request. - USB process naming cleanup. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=188411
* When bouncing pages, allow a new option to preserve the intra-pageWarner Losh2009-02-081-1/+1
| | | | | | | | | | | | | | | | | | | offset. This is needed for the ehci hardware buffer rings that assume this behavior. This is an interim solution, and a more general one is being worked on. This solution doesn't break anything that doesn't ask for it directly. The mbuf and uio variants with this flag likely don't work and haven't been tested. Universe builds with these changes. I don't have a huge-memory machine to test these changes with, but will be happy to work with folks that do and hps if this changes turns out not to be sufficient. Submitted by: alfred@ from Hans Peter Selasky's original Notes: svn path=/head/; revision=188350
* - Keep the same sorting on usb_errstr_table as the enum.Andrew Thompson2009-02-031-19/+20
| | | | | | | - Use c99 array initializers for usb_quirk_str so the indexing isnt critical. Notes: svn path=/head/; revision=188076
* Move away from autogenerated enums, these values never change and its helpfulAndrew Thompson2009-02-031-3/+32
| | | | | | | to be able to look them up. Notes: svn path=/head/; revision=188048
* src/usr.bin/usbhidaction/usbhidaction.cAlfred Perlstein2009-02-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/usr.bin/usbhidctl/usbhid.c src/sys/dev/usb2/include/usb2_hid.h src/sys/dev/usb2/input/uhid2.c src/lib/libusbhid/Makefile src/lib/libusbhid/descr.c src/lib/libusbhid/descr_compat.c src/lib/libusbhid/usbhid.3 src/lib/libusbhid/usbhid.h src/lib/libusbhid/usbvar.h Patches to make libusbhid and HID userland utilities compatible with the new USB stack. All HID ioctls should go through the libusbhid library to ensure compatibility. I have found at least one piece of software in /usr/ports which needs to get updated before USB HID devices will work. This is the X joystick input driver. Reported and tested by: Daichi GOTO and Masanori OZAWA. src/sys/dev/usb2/core/usb2_process.c Correct USB process names. Reported by: Andre Guibert de Bruet src/sys/dev/usb2/serial/uftdi2.c Integrate changes from old USB stack. Submitted by: hps Notes: svn path=/head/; revision=187994
* Remove check for null softc in attach, it can never happen.Andrew Thompson2009-02-012-6/+0
| | | | Notes: svn path=/head/; revision=187970
* MFp4 //depot/projects/usb/ @156522,156530Andrew Thompson2009-01-261-1/+7
| | | | | | | | | | UHCI SOF Quirk. Makes some broken USB devices work again. Reported by several people. Patch made by me. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187730
* MFp4: //depot/projects/usb@156055Andrew Thompson2009-01-131-2/+3
| | | | | | | | | Compile fix for AVR-GCC Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187183
* MFp4: //depot/projects/usb@155957Andrew Thompson2009-01-135-53/+91
| | | | | | | | | Make code more compliant with SuperSpeed USB and Wireless USB. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187180
* MFp4: //depot/projects/usb@155936Andrew Thompson2009-01-132-59/+52
| | | | | | | | | | Save an USB transfer in UHUB driver by using the builtin clear-stall mechanism. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187178
* MFp4: //depot/projects/usb@155923Andrew Thompson2009-01-131-1/+1
| | | | | | | | | Fix remaining xfer->udev variable changes. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187177
* MFp4: //depot/projects/usb@155842Andrew Thompson2009-01-133-14/+25
| | | | | | | | | | | | | | | Reduce the number of callback processes to 4 per USB controller. There are two rough categories: 1) Giant locked USB transfers. 2) Non-Giant locked USB transfers. On a real system with many USB devices plugged in the number of processes reported by "ps auxw | grep USBPROC" was reduced from 40 to 18. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187174
* MFp4: //depot/projects/usb@155839Andrew Thompson2009-01-138-142/+149
| | | | | | | | | | | | | | | | | | This change is about removing three fields from "struct usb2_xfer" which can be reached from "struct usb2_xfer_root" instead and cleaning up the code after this change. The fields are "xfer->udev", "xfer->xfer_mtx" and "xfer->usb2_sc". In this process the following changes were also made: Rename "usb2_root" to "xroot" which is short for "xfer root". Rename "priv_mtx" to "xfer_mtx" in USB core. The USB_XFER_LOCK and USB_XFER_UNLOCK macros should only be used in the USB core due to dependency towards "xroot". Substitute macros for the real lock in two USB device drivers. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187173
* MFp4: //depot/projects/usb@155829Andrew Thompson2009-01-133-26/+13
| | | | | | | | | | Code style changes requested by: M. Warner Losh Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187171
* MFp4: //depot/projects/usb@155820Andrew Thompson2009-01-132-12/+24
| | | | | | | | | USB memory usage reduction patch. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187170
* MFp4: //depot/projects/usb@155810Andrew Thompson2009-01-131-2/+17
| | | | | | | | | | | Usability improvement. Make sure that setting power mode ON resurrects the device if powered OFF. Reported by: Alexander Best. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187169
* MFp4: //depot/projects/usb@155755Andrew Thompson2009-01-131-4/+9
| | | | | | | | | | | Fix a race causing the explore thread to hang when tearing down USB transfers at detach. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187166
* MFp4: //depot/projects/usb@155750Andrew Thompson2009-01-132-6/+8
| | | | | | | | | | Patch to resolve problems with power mode off. Reported by Alexander Best. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=187164
* Sync with usb4bsd:Alfred Perlstein2009-01-0416-228/+731
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/lib/libusb20/libusb20_desc.c Make "libusb20_desc_foreach()" more readable. src/sys/dev/usb2/controller/*.[ch] src/sys/dev/usb2/core/*.[ch] Implement support for USB power save for all HC's. Implement support for Big-endian EHCI. Move Huawei quirks back into "u3g" driver. Improve device enumeration. src/sys/dev/usb2/ethernet/*[ch] Patches for supporting new AXE Gigabit chipset. src/sys/dev/usb2/serial/*[ch] Fix IOCTL return code. src/sys/dev/usb2/wlan/*[ch] Sync with old USB stack. Submitted by: hps Notes: svn path=/head/; revision=186730
* Remove CALLOUT_RETURNUNLOCKED from the callouts, there is no reason for them toAndrew Thompson2008-12-231-10/+2
| | | | | | | drop the lock for us. Notes: svn path=/head/; revision=186454
* Remove superfluous return statements from the end of void functions.Andrew Thompson2008-12-1116-179/+0
| | | | Notes: svn path=/head/; revision=185950
* Format and wrap function declarations.Andrew Thompson2008-12-1125-180/+327
| | | | Notes: svn path=/head/; revision=185948
* src/lib/libusb20/libusb20_compat01.cAlfred Perlstein2008-11-256-73/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix some issues about re-scanning of the devices. src/lib/libusb20/libusb20_ugen20.c Fix issue about libusb20 having to release the USB transfers before doing a SET_CONFIG, else the kernel will kill the file handle. src/sys/dev/usb2/core/usb2_device. src/sys/dev/usb2/core/usb2_generic.c src/sys/dev/usb2/core/usb2_generic.h Add support for U3G devices. Improve and cleanup FIFO free handling. Improve device re-enumeration. src/sys/dev/usb2/core/usb2_msctest.c src/sys/dev/usb2/core/usb2_msctest.h Fix some problems in the USB Mass Storage Test. Add Huawei vendor specific quirks. src/sys/dev/usb2/core/usb2_request.c Improve device re-enumeration. src/sys/dev/usb2/ethernet/if_aue2.c src/sys/dev/usb2/include/usb2_devid.h src/sys/dev/usb2/include/usb2_devtable.h src/sys/dev/usb2/quirk/usb2_quirk.c Integrate changes from the old USB driver. src/sys/dev/usb2/include/usb2_standard.h Add definition of USB3.0 structures from USB.org. src/sys/dev/usb2/serial/u3g2.c src/sys/dev/usb2/serial/ugensa2.c src/sys/modules/usb2/Makefile src/sys/modules/usb2/serial_3g/Makefile Import U3G driver. Submitted by: Hans Petter Selasky (usb4bsd) Notes: svn path=/head/; revision=185290
* src/sys/dev/usb2/controller/uss820dci_pccard.cAlfred Perlstein2008-11-1911-2823/+436
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/sys/dev/usb2/core/usbdevs src/sys/dev/usb2/include/urio2_ioctl.h src/sys/dev/usb2/storage/ustorage2_fs.h These files are not used any more. src/usr.sbin/Makefile src/etc/mtree/BSD.include.dist src/include/Makefile src/lib/Makefile src/share/man/man7/hier.7 src/share/mk/bsd.libnames.mk src/etc/mtree/BSD.include.dist Make "usbconfig" and "libusb20" a part of the default build. src/sys/dev/usb/rio500_usb.h src/sys/dev/usb2/storage/urio2.c Use common include file. src/sys/dev/usb2/bluetooth/ng_ubt2.c Make USB bluetooth depend on "ng_hci" module. src/sys/dev/usb2/controller/ehci2.c src/sys/dev/usb2/controller/ehci2.h Patches for Marvell EHCI. src/sys/dev/usb2/core/usb2_busdma.c Bugfix for 64-bit platforms. Need to unload the previously loaded DMA map and some cleanup regarding some corner cases. src/sys/dev/usb2/core/usb2_core.h src/sys/dev/usb2/core/usb2_dev.c src/sys/dev/usb2/core/usb2_dev.h Bugfix for libusb filesystem interface. New feature: Add support for filtering device data at the expense of the userland process. Add some more comments. Some minor code styling. Remove unused function, usb2_fifo_get_data_next(). Fix an issue about "fifo_index" being used instead of "ep_index". src/sys/dev/usb2/core/usb2_device.c src/sys/dev/usb2/core/usb2_generic.c Bugfix for Linux USB compat layer. Do not free non-generic FIFOs when doing an alternate setting. Cleanup USB IOCTL and USB reference handling. Fix a corner case where USB-FS was left initialised after setting a new configuration or alternate setting. src/sys/dev/usb2/core/usb2_hub.c Improvement: Check all USB HUB ports by default at least one time. src/sys/dev/usb2/core/usb2_request.c Bugfix: Make sure destination ASCII string is properly zero terminated in all cases. Improvement: Skip invalid characters instead of replacing with a dot. src/sys/dev/usb2/core/usb2_util.c src/sys/dev/usb2/image/uscanner2.c Spelling. src/sys/dev/usb2/include/Makefile Share "usbdevs" with the old USB stack. src/sys/dev/usb2/include/usb2_devid.h src/sys/dev/usb2/include/usb2_devtable.h Regenerate files. Alfred: Please fix the RCS tag at the top. src/sys/dev/usb2/include/usb2_ioctl.h Fix compilation of "kdump". src/sys/dev/usb2/serial/ubsa2.c src/sys/dev/usb2/serial/ugensa2.c Remove device ID's which will end up in a new 3G driver. src/sys/dev/usb2/sound/uaudio2.c Correct a debug printout. src/sys/dev/usb2/storage/umass2.c Sync with old USB stack. src/lib/libusb20/libusb20.3 Add more documentation. src/lib/libusb20/libusb20.c Various bugfixes and improvements. src/usr.sbin/usbconfig/dump.c src/usr.sbin/usbconfig/usbconfig.c New commands for dumping strings and doing custom USB requests from the command line. Remove keyword requirements from generated files: "head/sys/dev/usb2/include/usb2_devid.h" "head/sys/dev/usb2/include/usb2_devtable.h" Notes: svn path=/head/; revision=185087
* Convert the two main locking areas into macros to make it clear on what we areAndrew Thompson2008-11-109-153/+165
| | | | | | | | | | | | grabbing and why. These are now: USB_BUS_LOCK/USB_BUS_UNLOCK USB_XFER_LOCK/USB_XFER_UNLOCK Reviewed by: alfred Notes: svn path=/head/; revision=184824
* Bring in USB4BSD, Hans Petter Selasky rework of the USB stackAlfred Perlstein2008-11-0446-0/+25224
that includes significant features and SMP safety. This commit includes a more or less complete rewrite of the *BSD USB stack, including Host Controller and Device Controller drivers and updating all existing USB drivers to use the new USB API: 1) A brief feature list: - A new and mutex enabled USB API. - Many USB drivers are now running Giant free. - Linux USB kernel compatibility layer. - New UGEN backend and libusb library, finally solves the "driver unloading" problem. The new BSD licensed libusb20 library is fully compatible with libusb-0.1.12 from sourceforge. - New "usbconfig" utility, for easy configuration of USB. - Full support for Split transactions, which means you can use your full speed USB audio device on a high speed USB HUB. - Full support for HS ISOC transactions, which makes writing drivers for various HS webcams possible, for example. - Full support for USB on embedded platforms, mostly cache flushing and buffer invalidating stuff. - Safer parsing of USB descriptors. - Autodetect of annoying USB install disks. - Support for USB device side mode, also called USB gadget mode, using the same API like the USB host side. In other words the new USB stack is symmetric with regard to host and device side. - Support for USB transfers like I/O vectors, means more throughput and less interrupts. - ... see the FreeBSD quarterly status reports under "USB project" 2) To enable the driver in the default kernel build: 2.a) Remove all existing USB device options from your kernel config file. 2.b) Add the following USB device options to your kernel configuration file: # USB core support device usb2_core # USB controller support device usb2_controller device usb2_controller_ehci device usb2_controller_ohci device usb2_controller_uhci # USB mass storage support device usb2_storage device usb2_storage_mass # USB ethernet support, requires miibus device usb2_ethernet device usb2_ethernet_aue device usb2_ethernet_axe device usb2_ethernet_cdce device usb2_ethernet_cue device usb2_ethernet_kue device usb2_ethernet_rue device usb2_ethernet_dav # USB wireless LAN support device usb2_wlan device usb2_wlan_rum device usb2_wlan_ral device usb2_wlan_zyd # USB serial device support device usb2_serial device usb2_serial_ark device usb2_serial_bsa device usb2_serial_bser device usb2_serial_chcom device usb2_serial_cycom device usb2_serial_foma device usb2_serial_ftdi device usb2_serial_gensa device usb2_serial_ipaq device usb2_serial_lpt device usb2_serial_mct device usb2_serial_modem device usb2_serial_moscom device usb2_serial_plcom device usb2_serial_visor device usb2_serial_vscom # USB bluetooth support device usb2_bluetooth device usb2_bluetooth_ng # USB input device support device usb2_input device usb2_input_hid device usb2_input_kbd device usb2_input_ms # USB sound and MIDI device support device usb2_sound 2) To enable the driver at runtime: 2.a) Unload all existing USB modules. If USB is compiled into the kernel then you might have to build a new kernel. 2.b) Load the "usb2_xxx.ko" modules under /boot/kernel having the same base name like the kernel device option. Submitted by: Hans Petter Selasky hselasky at c2i dot net Reviewed by: imp, alfred Notes: svn path=/head/; revision=184610