summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_dev.c
Commit message (Collapse)AuthorAgeFilesLines
* Use a more obvious prefix for the USB control (endpoint 0) transfers ratherthompsa2010-04-221-1/+1
| | | | than default_*.
* Properly name the sxlocks, mutexes and condvars.thompsa2010-04-221-4/+4
|
* Remove overuse of exclamation marks in kernel printfs, there mere fact athompsa2009-11-261-2/+2
| | | | | | message has been printed is enough to get someones attention. Also remove the line number for DPRINTF/DPRINTFN, it already prints the funtion name and a unique message.
* Provide tunables for some of the usb sysctls that affect boot behaviour.thompsa2009-11-221-0/+2
| | | | Submitted by: Andriy Gapon
* - Patch to allow USB controller to resume operation afteralfred2009-08-241-11/+8
| | | | | | | | | | | | | | | | | | | | | | | being polled. - Remove the need for Giant from the USB HUB driver. - Leave device unconfigured instead of disabling the USB port when Huawei Autoinstall disk detection triggers. This should fix problems that the Huawei device is not detected after Autoinstall eject is issued. - Reported by: Nikolay Antsiferov - Fix memory use after free race for USB character devices. - Reported by: Lucius Windschuh - Factor out the enumeration lock into three functions to make the coming newbus lock conversion more easy. - usbd_enum_lock - usbd_enum_unlock - usbd_enum_is_locked Submitted by: hps
* Temporarily revert the new-bus locking for 8.0 release. It will bejhb2009-08-201-6/+0
| | | | | | reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
* Make the newbus subsystem Giant free by adding the new newbus sxlock.attilio2009-08-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* USB core:alfred2009-07-301-16/+67
| | | | | | | | | | | | | | | - add support for defragging of written device data. - improve handling of alternate settings in device side mode. - correct return value from usbd_get_no_alts() function. - reported by: HPS - P4 ID: 166156, 166168 - report USB device release information to devd and pnpinfo. - reported by: MIHIRA Sanpei Yoshiro - P4 ID: 166221 Submitted by: hps Approved by: re
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-231-4/+33
| | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.thompsa2009-06-151-233/+233
|
* Remove usb2_cv_* and just use the kernel condvar implementation, it was neededthompsa2009-06-151-13/+13
| | | | | earlier since condition variables didnt work with Giant but this was fixed 10 months ago.
* Make variables static where appropriate.thompsa2009-06-131-1/+1
| | | | Found by: cscout
* Rename usb pipes to endpoints as it better represents what they are, and structthompsa2009-06-071-34/+34
| | | | usb_pipe may be used for a different purpose later on.
* Place the fifo and ref counting variables on the stack to prevent races.thompsa2009-06-021-99/+90
| | | | Submitted by: Hans Petter Selasky
* Fix multithread issue where the is_uref variable was not set and clearedthompsa2009-06-021-8/+23
| | | | | | properly in the CDEV private data. Submitted by: Hans Petter Selasky
* Revert the size_t part of the last commit for the moment, this blows up thethompsa2009-05-301-9/+9
| | | | USB_ADD_BYTES macro.
* s/usb2_/usb_/ on all typedefs for the USB stack.thompsa2009-05-291-21/+21
|
* s/usb2_/usb_/ on all C structs for the USB stack.thompsa2009-05-281-93/+93
|
* Rename the usb sysctl tree from hw.usb2.* back to hw.usb.*.thompsa2009-05-211-2/+2
| | | | Submitted by: Hans Petter Selasky
* - rename usb2_mode to usb_mode [1]thompsa2009-05-211-2/+2
| | | | | | - change variable types to use the enum Submitted by: Hans Petter Selasky [1]
* Check the correct variable for IO_NDELAY.thompsa2009-05-131-2/+2
| | | | Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159864thompsa2009-04-051-44/+32
| | | | | | Fix possible deadlock with UGEN at detach. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159806thompsa2009-04-051-4/+4
| | | | | | | Properly name usb2_uref_location() so that it is not confused with usb2_unref_location() . Submitted by: Hans Petter Selasky
* Set the endpoint on the preallocated fifo so it doesnt get matched as anthompsa2009-03-221-0/+2
| | | | | | endpoint fifo. Reported by: Pieter de Goeje
* Improve debugging output around ioctls.thompsa2009-03-221-3/+6
|
* Fix compile with USB_HAVE_BUSDMA/USB_HAVE_UGEN/USB_HAVE_STRINGS.thompsa2009-03-201-0/+3
| | | | Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb @159431,159437,159438thompsa2009-03-201-13/+13
| | | | | | | - start using the new USB typedefs in the USB core - Remove usage of USB_ADD_BYTES() Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb @159430thompsa2009-03-201-1/+0
| | | | | | | | | | - 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
* MFp4 //depot/projects/usb 159225,159241,159292thompsa2009-03-171-52/+62
| | | | | | | | | | | Fix regression issue in the USB file system interface. - Use cdev_privdata pointer as indicator of correct file handle. - Remove redundant FIFO opened flags. Don't send ZLP at close for ulpt and uscanner devices as this causes some models to stop working. This reverts back to the USB1 behaviour. Submitted by: Hans Petter Selasky
* Fix usb2_poll not to return an error number as the function return value is athompsa2009-03-051-9/+5
| | | | | | bitmask of events. Pointed out by: HPS
* A couple of style nits in the last committhompsa2009-02-281-6/+3
| | | | | - unwrap short lines - move variable initialisation out of the declaration.
* - Remove the usb interface number from the device nodes as it is not needed.thompsa2009-02-281-44/+14
| | | | | | | - Do not recreate the device nodes in set_alt_interface as the endpoints do not change. Submitted by: Hans Petter Selasky
* Change the last references to PRIV_ROOT. /dev/usb used to be world writable sothompsa2009-02-271-1/+1
| | | | | | | further root checks were needed, this isnt the case anymore but just change it to PRIV_DRIVER until it can be investigated later. Spotted by: rwatson
* Change USB over to make_dev() for all device nodes, previously it hooked intothompsa2009-02-271-983/+384
| | | | | | | | | | | | | | | the devfs clone handler to open the (invisible) devices on the fly. The /dev entries are layed out as follows, /dev/usbctl = master device /dev/usb/0.1.0.5 = usb device, (<bus>.<dev>.<iface>.<endpoint>) /dev/ugen0.1 -> usb/0.1.0.0 = ugen link to ctrl endpoint This also removes the custom permissions model from USB. Bump __FreeBSD_version to 800066. Submitted by: rink (earlier version)
* Fix compiler warning.thompsa2009-02-241-0/+1
|
* MFp4 //depot/projects/usb@157974thompsa2009-02-241-0/+9
| | | | | | | Add support for setting and getting the USB template value through libusb20 and usbconfig. Submitted by: Hans Petter Selasky
* Move the new USB stack into its new home.thompsa2009-02-231-0/+2814
OpenPOWER on IntegriCloud