summaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_compat_linux.c
AgeCommit message (Collapse)Author
2015-10-29Finish process of moving the LinuxKPI module into the default kernel build.Hans Petter Selasky
- Move all files related to the LinuxKPI into sys/compat/linuxkpi and its subfolders. - Update sys/conf/files and some Makefiles to use new file locations. - Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn adds the LinuxKPI to all LINT builds. - The LinuxKPI can be added to the kernel by setting the COMPAT_LINUXKPI option. The OFED kernel option no longer builds the LinuxKPI into the kernel. This was done to keep the build rules for the LinuxKPI in sys/conf/files simple. - Extend the LinuxKPI module to include support for USB by moving the Linux USB compat from usb.ko to linuxkpi.ko. - Bump the FreeBSD_version. - A universe kernel build has been done. Reviewed by: np @ (cxgb and cxgbe related changes only) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=290135
2013-08-12- Try to fix build of 32-bit compatibility USB support for FreeBSD andHans Petter Selasky
Linux targets without breaking the existing IOCTL API. - Remove some not-needed header file inclusions. - Wrap a long line. MFC after: 1 week Reported by: Damjan Jovanovic <damjan.jov@gmail.com> Notes: svn path=/head/; revision=254243
2013-01-30Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵Sofian Brabez
device_method_t arrays Reviewed by: cognet Approved by: cognet Notes: svn path=/head/; revision=246128
2013-01-30Modify the FreeBSD USB kernel code so that it can be compiled directlyHans Petter Selasky
into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems or embedded platforms. This is also useful for out of the system compilation of the FreeBSD USB stack for various purposes. The USB kernel files can now optionally include a global header file which should include all needed definitions required to compile the FreeBSD USB stack. When the global USB header file is included, no other USB header files will be included by default. Add new file containing the USB stack configuration for the FreeBSD loader build. Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all USB files follow the same style. Use cases: - console in loader via USB - loading kernel via USB Discussed with: Hiroki Sato, hrs @ EuroBSDCon Notes: svn path=/head/; revision=246122
2012-04-02Fix compiler warnings, mostly signed issues,Hans Petter Selasky
when USB modules are compiled with WARNS=9. MFC after: 1 weeks Notes: svn path=/head/; revision=233774
2011-11-12Style change.Hans Petter Selasky
- Make it easier to port the USB code to other platforms by only using one set of memory functions for clearing and copying memory. None of the memory copies are overlapping. This means using bcopy() is not required. - Fix a compile warning when USB_HAVE_BUSDMA=0 - Add missing semicolon in avr32dci. - Update some comments. MFC after: 1 week Notes: svn path=/head/; revision=227461
2011-01-11Remove unneeded includes of <sys/linker_set.h>. Other headers that useJohn Baldwin
it internally contain nested includes. Reviewed by: bde Notes: svn path=/head/; revision=217265
2010-09-01Add missing MODULE_VERSION() definitions, this resolves problems aroundAndrew Thompson
duplicate module loads. PR: usb/125736 Submitted by: danger, mm Reviewed by: hselasky Notes: svn path=/head/; revision=212122
2010-04-22Use a more obvious prefix for the USB control (endpoint 0) transfers ratherAndrew Thompson
than default_*. Notes: svn path=/head/; revision=207080
2010-03-28Make sure the bsd_urb_list gets initialised and that new URB's are queued atAndrew Thompson
the end of the list. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=205803
2009-11-01- Add usb_fill_bulk_urb() and usb_bulk_msg() linux compat functions [1]Andrew Thompson
- Don't write actual length if the actual length pointer is NULL [2] - correct Linux Compatibility error codes for short isochronous IN transfers and make status field signed. Submitted by: Leunam Elebek [1], Manuel Gebele [2] Notes: svn path=/head/; revision=198776
2009-08-20Temporarily revert the new-bus locking for 8.0 release. It will beJohn Baldwin
reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio Notes: svn path=/head/; revision=196403
2009-08-02Make the newbus subsystem Giant free by adding the new newbus sxlock.Attilio Rao
The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races. Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped. For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens. Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing. Bump __FreeBSD_version in order to reflect the newbus lock introduction. Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith) Notes: svn path=/head/; revision=196037
2009-07-30USB CORE - compat Linux:Alfred Perlstein
- Patch request from Tim Borgeaud: - add automatic locking - add refcount for killing URB's Submitted by: hps Approved by: re Notes: svn path=/head/; revision=195966
2009-06-23- Make struct usb_xfer opaque so that drivers can not access the internalsAndrew Thompson
- Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h Notes: svn path=/head/; revision=194677
2009-06-15s/usb2_/usb_|usbd_/ on all function names for the USB stack.Andrew Thompson
Notes: svn path=/head/; revision=194228
2009-06-15Remove usb2_cv_* and just use the kernel condvar implementation, it was neededAndrew Thompson
earlier since condition variables didnt work with Giant but this was fixed 10 months ago. Notes: svn path=/head/; revision=194227
2009-06-12Free the correct memory pointer.Andrew Thompson
Submitted by: Tim Borgeaud (via HPS) Notes: svn path=/head/; revision=194065
2009-06-07Rename usb pipes to endpoints as it better represents what they are, and structAndrew Thompson
usb_pipe may be used for a different purpose later on. Notes: svn path=/head/; revision=193644
2009-05-30Revert the size_t part of the last commit for the moment, this blows up theAndrew Thompson
USB_ADD_BYTES macro. Notes: svn path=/head/; revision=193074
2009-05-29s/usb2_/usb_/ on all typedefs for the USB stack.Andrew Thompson
Notes: svn path=/head/; revision=193045
2009-05-28s/usb2_/usb_/ on all C structs for the USB stack.Andrew Thompson
Notes: svn path=/head/; revision=192984
2009-05-21- rename usb2_mode to usb_mode [1]Andrew Thompson
- change variable types to use the enum Submitted by: Hans Petter Selasky [1] Notes: svn path=/head/; revision=192499
2009-05-05Remove USB shutdown methods from device drivers as its the host controllersAndrew Thompson
responsibility to detach the bus. PR: usb/133896 Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=191825
2009-04-05MFp4 //depot/projects/usb@159909Andrew Thompson
- make usb2_power_mask_t 16-bit - remove "usb2_config_sub" structure from "usb2_config". To compensate for this "usb2_config" has a new field called "usb_mode" which select for which mode the current xfer entry is active. Options are: a) Device mode only b) Host mode only (default-by-zero) c) Both modes. This change was scripted using the following sed script: "s/\.mh\././g". - the standard packet size table in "usb_transfer.c" is now a function, hence the code for the function uses less memory than the table itself. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=190734
2009-03-20MFp4 //depot/projects/usb @159431,159437,159438Andrew Thompson
- start using the new USB typedefs in the USB core - Remove usage of USB_ADD_BYTES() Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=190181
2009-03-20MFp4 //depot/projects/usb @159430Andrew Thompson
- Move tunable defines into usb_core.h and dependancy towards usb_defs.h - Leave hardcoded defines in "usb_defs.h". - Allow overriding all tunable defines. - Add more customisable typedefs. - Correct maximum device number. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=190174
2009-03-02Rename the ushub device class back to uhub as it was in the old usb stack,Andrew Thompson
moused(8) looks for "uhub/ums" to decide if needs to load the module. Reported by: Garrett Cooper Notes: svn path=/head/; revision=189275
2009-02-23Move the new USB stack into its new home.Andrew Thompson
Notes: svn path=/head/; revision=188942