summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller
Commit message (Collapse)AuthorAgeFilesLines
* The EHCI_CAPLENGTH and EHCI_HCIVERSION registers are actually sub-registersnwhitehorn2010-10-252-5/+9
| | | | | | | within the first 4 bytes of the EHCI memory space. For controllers that use big-endian MMIO, reading them with 1- and 2-byte reads would then return the wrong values. Instead, read the combined register with a 4-byte read and mask out the interesting quantities.
* Remove unused EHCI register definition.hselasky2010-10-142-3/+1
| | | | | | Define reserved EHCI register. Approved by: thompsa (mentor)
* Revert most of r197682 (EHCI Hardware BUG workaround). Implementhselasky2010-10-142-40/+51
| | | | | | | | | | proper solution which is to not use the TERMINATE pointer, but rather link to a halted TD. The initial fix was due to a misunderstanding about how the EHCI hardware works. Thanks to Alan Stern for clearing this up. This patch can increase mass storage read performance significantly when the IRQ rate is less than 8000 IRQ/s. Approved by: thompsa (mentor)
* Avoid using endless retransmission at EHCI hardware level, hence this hidehselasky2010-10-141-1/+2
| | | | | | | errors from the applications. Only use endless retransmission while in the non-addressed state on a High-Speed device. Approved by: thompsa (mentor)
* Correct EHCI root HUB interface descriptor.hselasky2010-10-141-2/+1
| | | | Approved by: thompsa (mentor)
* Correct EHCI port register read.hselasky2010-10-141-1/+1
| | | | Approved by: thompsa (mentor)
* Correct some root HUB descriptor fields in multiple controller drivers.hselasky2010-10-136-31/+9
| | | | | | Remove an unused structure. Approved by: thompsa (mentor)
* 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)
* Commit initial version of new XHCI driver which was written fromhselasky2010-10-034-0/+4898
| | | | | | | | | | | | | scratch. This driver adds support for USB3.0 devices. The XHCI interface is also backwards compatible to USB2.0 and USB1.0 and will evntually replace the OHCI/UHCI and EHCI drivers. There will be follow-up commits during the coming week to link the driver into the default kernel build and add missing USB3.0 functionality in the USB core. Currently only the driver files are committed. Approved by: thompsa (mentor)
* Change argument for usbd_get_dma_delay() from USB bus to USB device, somethompsa2010-09-023-3/+3
| | | | | | | embedded hardware needs to know exactly which device is in question before it exactly can decide the required delay. Submitted by: Hans Petter Selasky
* Add support for LOW speed BULK transfers. This mode is not recommended by thethompsa2010-06-223-9/+3
| | | | | | USB 2.0 standard, though some USB devices use it anyway. Submitted by: Hans Petter Selasky
* Convert Marvell ARM platforms to FDT convention.raj2010-06-131-33/+40
| | | | | | | | | | | | | | | | | | | | | | | | | The following systems are involved: - DB-88F5182 - DB-88F5281 - DB-88F6281 - DB-78100 - SheevaPlug This overhaul covers the following major changes: - All integrated peripherals drivers for Marvell ARM SoC, which are currently in the FreeBSD source tree are reworked and adjusted so they derive config data out of the device tree blob (instead of hard coded / tabelarized values). - Since the common FDT infrastrucutre (fdtbus, simplebus) is used we say good by to obio / mbus drivers and numerous hard-coded config data. Note that world needs to be built WITH_FDT for the affected platforms. Reviewed by: imp Sponsored by: The FreeBSD Foundation.
* Back out r203140 which was causing problems when the first and the lastthompsa2010-05-121-9/+20
| | | | | | | | | | microframe slot was not in the smask. The problem was that the EHCI driver was then thinking that the transfer was immediately complete in some cases. Which could lead to freeze-like situations, which can be recovered by unplugging the USB device. Reported by: Richard Kolkovich Submitted by: Hans Petter Selasky
* Add missing ifdefs for usb power saving support.thompsa2010-05-121-1/+4
| | | | Submitted by: Hans Petter Selasky
* Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this hadthompsa2010-04-223-37/+37
| | | | | | the illusion of a tunable setting but was always turned on regardless. MFC after: 1 week
* Add PCI IDs for two more nForce controllers.thompsa2010-03-282-0/+4
| | | | Submitted by: Dmitry Luhtionov @ gmail.com
* Add support for the Samsung S3C2xx0 family of ARM SoCs written byimp2010-03-201-0/+219
| | | | | | | | Andrew Turner. The kernel supports the LN2410SBC evaluation board, and likely others. These parts (or similar ones) are in some open hardware designs for phones. Submitted by: Andrew Turner
* For USS820 driver we need to manually reset TX FIFO at each SETUP transactionthompsa2010-03-111-0/+8
| | | | | | because the chip doesn't do this by itself. 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
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-039-63/+0
| | | | | | their software. Obtained from: NetBSD
* Disable the use of the IAAD usb doorbell on NVidia controllers as it can causethompsa2010-02-093-0/+33
| | | | | | the hardware to stall. Submitted by: Hans Petter Selasky
* Optimise EHCI ISOC HS done check.thompsa2010-01-291-10/+7
| | | | Submitted by: Hans Petter Selasky
* Remove unused uhci_dump_qhs().trasz2010-01-081-27/+0
| | | | Reviewed by: hps
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-1/+1
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* Add more OHCI pci ids.thompsa2009-12-221-0/+6
| | | | Submitted by: Hans Petter Selasky
* Add more EHCI pci ids.thompsa2009-12-221-0/+10
| | | | Submitted by: Hans Petter Selasky
* Correct name, 82801IJ -> 82801JIthompsa2009-12-092-8/+8
| | | | Submitted by: mitya_cabletv.dp.ua
* Add uhci/ehci controller ids.thompsa2009-12-032-0/+16
| | | | Submitted by: mitya_cabletv.dp.ua
* Remove overuse of exclamation marks in kernel printfs, there mere fact athompsa2009-11-264-9/+12
| | | | | | 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.
* Disable interrupts after doing early takeover of the usb controller in case usbthompsa2009-11-252-2/+2
| | | | | | | isnt actually compiled in (or kldloaded) as the controller could cause spurious interrupts. Tested by: Florian Smeets
* Actually disable interrupts in ehci_detach().thompsa2009-11-231-1/+1
| | | | Reviewed by: HPS
* Add missed register change in r199676.thompsa2009-11-221-1/+1
| | | | Submitted by: Hans Petter Selasky
* Correct register access for USB device side operation on the musb controller.thompsa2009-11-221-9/+58
| | | | Submitted by: Hans Petter Selasky
* Provide tunables for some of the usb sysctls that affect boot behaviour.thompsa2009-11-223-0/+10
| | | | Submitted by: Andriy Gapon
* Initialise variable before use.thompsa2009-11-225-0/+5
| | | | Submitted by: Hans Petter Selasky
* Improve High Speed slot allocation mechanism by moving the computation to thethompsa2009-11-221-47/+12
| | | | | | endpoint rather than per xfer and provide functions around get/free of resources. Submitted by: Hans Petter Selasky
* improve support for high speed isochronous endpoints which does not run 1:1,thompsa2009-11-081-27/+66
| | | | | | but needs intervalling 1:2, 1:4 or 1:8 Submitted by: Hans Petter Selasky
* Integrate lost interrupts patch from the old USB stack.thompsa2009-11-083-4/+51
| | | | | | | | | | | | | | | Some EHCI chips from VIA / ATI seem to trigger interrupts before writing back the qTD status, or miss signalling occasionally under heavy load. If the host machine is too fast, we can miss transaction completion - when we scan the active list the transaction still seems to be active. This generally exhibits itself as a umass stall that never recovers. We work around this behaviour by setting up this callback after any softintr that completes with transactions still pending, giving us another chance to check for completion after the writeback has taken place Submitted by: Alexander Nedotsuko MFC after: 3 days
* ehci_init() will do reset and set the usbrev flag. Fix problem wherethompsa2009-11-083-8/+1
| | | | | | | ehci_reset() was called before ehci_init(). PR: usb/140242 Submitted by: Sebastian Huber
* 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
OpenPOWER on IntegriCloud