summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r198500 for now, this will break situations whenthompsa2009-10-263-0/+88
| | | | | | | hw.pci.usb_early_takeover is set to zero and the SMM release is never done. Pointed out by: marcel
* Remove usb controller takeover code now that it is handled by the pci code.thompsa2009-10-263-88/+0
| | | | | Reminded by: jhb Reviewed by: HPS
* Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover forthompsa2009-10-1515-282/+414
| | | | | | | | | all host controllers at the same time, we avoid problems where the BIOS will actually write to the USB registers of all the USB host controllers every time we handover one of them, and consequently reset the OS programmed values. Submitted by: avg Reviewed by: jhb
* EHCI Hardware BUG workaroundthompsa2009-10-011-21/+57
| | | | | | | | | | | | | | | | | The EHCI HW can use the qtd_next field instead of qtd_altnext when a short packet is received. This contradicts what is stated in the EHCI datasheet. Also the total-bytes field in the status field of the following TD gets corrupted upon reception of a short packet! We work this around in software by not queueing more than one job/TD at a time of up to 16Kbytes! The bug has been seen on multiple INTEL based EHCI chips. Other vendors have not been tested yet. - Applications using /dev/usb/X.Y.Z, where Z is non-zero are affected, but not applications using LibUSB v0.1, v1.2 and v2.0. - Mass Storage (umass) is affected. Submitted by: Hans Petter Selasky MFC after: 3 days
* Clear all interrupts rather than just SETUP packet.thompsa2009-09-281-2/+2
| | | | Submitted by: Hans Petter Selasky
* Simplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0)thompsa2009-09-281-19/+15
| | | | | | statements to zero. Submitted by: Hans Petter Selasky
* Import two PCI quirks from Linuxthompsa2009-09-281-0/+70
| | | | | | | | - Add quirk for ATI SB600 and SB700 to free SMB controller - Correct schedule sleep time to 10us on the VIA ehci controller Reported by: Dorian B<FC>ttner, Andriy Gapon Submitted by: Hans Petter Selasky
* 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
* USB CORE:alfred2009-07-308-0/+8
| | | | | | | | | | | - Add minimum polling support to drive UMASS and UKBD in case of panic. - Add extra check to ukbd probe to fix problem about mouse devices attaching like keyboards. - P4 ID: 166148 Submitted by: hps Approved by: re
* USB controller:alfred2009-07-303-0/+14
| | | | | | | | | - patch from Alexander Motin <mav@freebsd.org> - add more ID's - P4 ID: 165805 Submitted by: hps Approved by: re
* Sync to p4thompsa2009-06-275-5/+5
| | | | | | | | | - Add support for devices that handle set and clear stall in hardware. - Add missing get timestamp function - Add more xfer flags Submitted by: Hans Petter Selasky Approved by: re (kib)
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-2319-51/+420
| | | | - 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-1519-438/+438
|
* Move the memory layout definitions and logic from mvreg.h to mvwin.hmarcel2009-06-121-1/+4
| | | | | | | | so that it isn't exposured unless needed. In particular this means that it's easier to tune the memory layout based on board details. While here, remove inclusion of <machine/intr.h> from mvreg.h. This also contains exposure to SoC specifics in MI drivers, because NIRQ depends on the SoC.
* Rename usb pipes to endpoints as it better represents what they are, and structthompsa2009-06-078-282/+282
| | | | usb_pipe may be used for a different purpose later on.
* 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-2917-80/+80
|
* s/usb2_/usb_/ on all C structs for the USB stack.thompsa2009-05-2818-690/+690
|
* Fix a failure to report failure on stalled status stage for controlthompsa2009-05-211-7/+0
| | | | | | transactions. Submitted by: Hans Petter Selasky
* Add a driver for the AVR32 series USB Device Controller. Not hooked up asthompsa2009-05-212-0/+2319
| | | | | | | FreeBSD does not yet support this platform but it makes it easier to stay in sync. Submitted by: Hans Petter Selasky
* Improve device mode (gadget) stall handling.thompsa2009-05-218-8/+18
| | | | | | | | | Some hardware easily comes out of sync with regard to whether the current or the next control transfer should be stalled, if a stall command is always issued before receiving the SETUP packet. After this patch the stall command will only be issued when a transfer should actually be stalled. Submitted by: Hans Petter Selasky
* Rename the usb sysctl tree from hw.usb2.* back to hw.usb.*.thompsa2009-05-218-18/+18
| | | | Submitted by: Hans Petter Selasky
* Use enums for speed and rev data types.thompsa2009-05-211-1/+1
|
* - rename usb2_mode to usb_mode [1]thompsa2009-05-217-22/+22
| | | | | | - change variable types to use the enum Submitted by: Hans Petter Selasky [1]
* Use defines for register offsets that do not change.thompsa2009-05-202-63/+29
| | | | Submitted by: Hans Petter Selasky
* - Add new register definitionsthompsa2009-05-202-10/+45
| | | | | | - Enable the controller and wait for the PLL to start Submitted by: Hans Petter Selasky
* The register shift is not needed on this controller.thompsa2009-05-201-3/+0
| | | | Submitted by: Hans Petter Selasky
* Add debug lines for fullspeed and highspeed xfer completion.thompsa2009-05-131-0/+4
| | | | Submitted by: Hans Petter Selasky
* Make sure the frame list base address is re-programmed after stopping the USBthompsa2009-05-051-37/+50
| | | | | | | schedule, in case the hardware clears the frame list base address. Submitted by: Hans Petter Selasky Reported by: Chao Shin
* Revert part of r191494 which used the udev state to mark suspending, this needsthompsa2009-05-053-8/+6
| | | | | | | | to be set via two variables (peer_suspended and self_suspended) and can not be merged into one. Submitted by: Hans Petter Selasky Pointy hat: me
* Track the usb device state as its powered on, addressed and configured. This ↵thompsa2009-04-253-6/+6
| | | | | | | | | helps to avoid touching the device when it is not going to respond and would otherwise timeout. Implement the suspend tracking as a udev state too.
* MFp4 //depot/projects/usb@160930thompsa2009-04-2210-317/+355
| | | | | | | Change the roothub exec functions to take the usb request and data pointers directly rather than placing them on the parent bus struct. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@160708thompsa2009-04-221-8/+9
| | | | | | | Need to check Read/Write allowed before writing any data for non-control transfers. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@160706thompsa2009-04-221-0/+8
| | | | | | Resolve possible device side mode deadlock by creating another thread. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@160678thompsa2009-04-223-3/+0
| | | | | | Remove unused field. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@160413thompsa2009-04-221-2/+2
| | | | | | | | | Use direct reference to parent high-speed HUB instead of indirect, due to pointer clearing race at detach of parent USB HUB. Reported by: kientzle Submitted by: Hans Petter Selasky PR: usb/133545
* 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
* Remove usb_sw_transfer.[ch] which are now empty after r190735.thompsa2009-04-0617-17/+0
|
* Provide a better commit log for r190735, forced by making a whitespace change.thompsa2009-04-0614-20/+19
| | | | | | | | | | | | 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@159946thompsa2009-04-057-54/+0
| | | | | | | Some cancelable flags are always true. Substitute these away. These cancelable flags were mostly useful with the root HUB which is now handled differently. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159926thompsa2009-04-051-138/+24
| | | | | | Minor code factorisation in atmegadci.c Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159922thompsa2009-04-0515-1258/+131
| | | | | | | 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
OpenPOWER on IntegriCloud