summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller/usb_controller.c
Commit message (Collapse)AuthorAgeFilesLines
* Removes a unused function `usb_bus_find'.weongyo2010-11-251-26/+0
|
* Handles the unit number correctly that the previous commit had a problemweongyo2010-11-251-4/+4
| | | | | | | | (wrong unit number for a host controller) when the module is load / unloaded repeatly. Attaching the USB pf is moved to usbus device's attach. Pointed by: yongari
* Removes all duplicated code with BPF that it's greatly simplified andweongyo2010-11-241-1/+1
| | | | | | | take all benefits whenever BPF code is improved. Pointed by: jkim Reviewed by: thompsa
* Adds a USB packet filter feature to the stack that it could captureweongyo2010-11-221-0/+32
| | | | | | | | | packets which go through each USB host controllers. Its implementations are almost based on BPF code and very similar with it except it's little bit customized for USB packet only. The userland program usbdump(8) would be committed soon. Discussed with: hps, thompsa, yongari
* This commit adds full support for USB 3.0 devices in host and devicehselasky2010-10-041-0/+6
| | | | | | | | | | | | | | | | mode in the USB core. The patch mostly consists of updating the USB HUB code to support USB 3.0 HUBs. This patch also add some more USB controller methods to support more active-alike USB controllers like the XHCI which needs to be informed about various device state events. USB 3.0 HUBs are not tested yet, due to lack of hardware, but are believed to work. After this update the initial device descriptor is only read twice when we know that the bMaxPacketSize is too small for a single packet transfer of this descriptor. Approved by: thompsa (mentor)
* Add missing DRIVER_MODULE() entry for the musbotg driver.hselasky2010-10-041-0/+4
| | | | | | Add some more comments. Approved by: thompsa (mentor)
* The root mount hold reference was not released on USB controllerhselasky2010-10-041-8/+14
| | | | | | attach failures during boot. Fix this. Approved by: thompsa (mentor)
* Add missing ifdefs for usb power saving support.thompsa2010-05-121-1/+4
| | | | Submitted by: Hans Petter Selasky
* Wrap the proc wakeup special case for ddb in ifdef DDB.thompsa2010-03-111-0/+6
| | | | Submitted by: Giovanni Trematerra
* Remove overuse of exclamation marks in kernel printfs, there mere fact athompsa2009-11-261-3/+3
| | | | | | 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.
* MFp4 @ 168387thompsa2009-09-281-4/+2
| | | | | | | | | | | | | | | | - clean up USB detach logic. There seems to be some problems detaching multiple USB HUBs connected in series from the root. - after this patch the rule is: 1) Always use device_detach() on the USB HUB first. 2) Never just device_delete_child() on the USB HUB, because that function will traverse to all the device leaves and free them first, and then the USB stack will free the devices twice which doesn't work very well. - make sure the did DMA delay gets set after the timeout has elapsed to make logic more clear. There is no functional difference. Submitted by: Hans Petter Selasky
* - allow disabling "root_mount_hold()" byalfred2009-08-241-73/+29
| | | | | | | setting a sysctl/tunable at boot - remove some redundant initial explore code Submitted by: hps
* Temporarily revert the new-bus locking for 8.0 release. It will bejhb2009-08-201-9/+21
| | | | | | 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-21/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 controller:alfred2009-07-301-2/+9
| | | | | | | - allow disabling "root_mount_hold()" by setting "hw.usb.no_boot_wait" sysctl Submitted by: hps Approved by: re
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-231-3/+22
| | | | - 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-99/+99
|
* Revert the size_t part of the last commit for the moment, this blows up thethompsa2009-05-301-3/+3
| | | | USB_ADD_BYTES macro.
* Fix function arguments were previously they matched the typedef by accident.thompsa2009-05-291-3/+3
|
* s/usb2_/usb_/ on all typedefs for the USB stack.thompsa2009-05-291-4/+4
|
* s/usb2_/usb_/ on all C structs for the USB stack.thompsa2009-05-281-27/+27
|
* Rename the usb sysctl tree from hw.usb2.* back to hw.usb.*.thompsa2009-05-211-2/+2
| | | | Submitted by: Hans Petter Selasky
* Use enums for speed and rev data types.thompsa2009-05-211-1/+1
|
* MFp4 //depot/projects/usb@160706thompsa2009-04-221-0/+8
| | | | | | Resolve possible device side mode deadlock by creating another thread. Submitted by: Hans Petter Selasky
* Revert r190676,190677thompsa2009-04-101-1/+1
| | | | | | | The geom and CAM changes for root_hold are the wrong solution for USB design quirks. Requested by: scottl
* Provide a better commit log for r190735, forced by making a whitespace change.thompsa2009-04-061-1/+1
| | | | | | | | | | | | Refactor how we interface with the root HUB. This is achieved by making a direct call from usb2_do_request to the host controller for root hub requests, this call will perform the controller specific register read/writes and return the error code. This cuts out a lot of code in the host controller files and saves one thread per USB bus. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159922thompsa2009-04-051-50/+1
| | | | | | | Refactor how we interface with the root HUB. This cuts around 1200 lines of code totally and saves one thread per USB bus. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159909thompsa2009-04-051-1/+14
| | | | | | | | | | | | | - 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
* MFp4 //depot/projects/usb@159866thompsa2009-04-051-2/+2
| | | | | | | | - memory usage reduction by only allocating the required USB pipes and USB interfaces. - cleanup some USB parsing functions to be more flexible. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159700thompsa2009-04-051-6/+3
| | | | | | Get rid of the last CALLOUT_RETURNUNLOCKED reference. Submitted by: Hans Petter Selasky
* Add a how argument to root_mount_hold() so it can be passed NOWAIT and be calledthompsa2009-04-031-1/+1
| | | | in situations where sleeping isnt allowed.
* MFp4 //depot/projects/usb@159392thompsa2009-03-201-11/+15
| | | | | | Add ifdefs for making parts of usb conditional. 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
* Fix a possible NULL pointer access at controller attach.thompsa2009-03-111-1/+2
| | | | Submitted by: Hans Petter Selasky
* Move the new USB stack into its new home.thompsa2009-02-231-0/+620
OpenPOWER on IntegriCloud