summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ohci.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed incomplete initialization in some ohci controllers withshiba2003-12-221-33/+46
| | | | | | | | | broken BIOS. Separate ohci_controller_init() from ohci_init(), and call ohci_controller_init() at resume process once more. Discussed on [bsd-nomads:16737] - [bsd-nomads:16746]. Submitted by Hiroyuki Aizu <eyes@navi.org> [bsd-nomads:16741]
* Enable support for DEVICE_SUSPEND, DEVICE_RESUME and DEVICE_SHUTDOWNshiba2003-12-221-12/+2
| | | | | | | | | | methods for USB devices in the same way of uhci driver. But this change is not complete because some ohci controlers are not initialized completely. So "kernel: usb0: 1 scheduling overruns" interrupt will generate many times. This change will be same one in PR kern/60099. Discussed on [bsd-nomads:16737] - [bsd-nomads:16746].
* Write the correct value to `td_be' for the second and furtheriedowse2003-11-251-1/+1
| | | | | | | | | | | transfer descriptors when a large request needs to be split into more than one 8k chunk. The bug was that the calculation did not take into account the offset of the chunk within the overall request. This is reported to fix crashes and data corruption on ohci controllers. Submitted by: green Approved by: re
* Remove a gremlin so that this code compiles under -stable withoutjoe2003-11-121-1/+1
| | | | a "syntax error before `struct'" error.
* MFNetBSD:joe2003-11-101-3/+1
| | | | | | date: 2003/10/18 04:50:35; author: simonb Remove assigned-to but otherwise unused variables. Remove unreachable break after return statements.
* MFNetBSD:joe2003-11-101-1/+2
| | | | | | | | | | revision 1.142 date: 2003/10/11 03:04:26; author: toshii Fix a done list handling bug which exhibits under high shared interrupt rate and bus traffic. As the interrupt register is read after checking hcca_done_head, there was a small chance of dropping a done list. Ignore OHCI_WDH interrupt bit if hcca_done_head is zero so that OHCI_WDH is processed later.
* MFNetBSD:joe2003-11-101-8/+11
| | | | | | | revision 1.141 date: 2003/09/10 20:08:29; author: mycroft; Update actlen even in the case where a TD returns an error -- this is critical for the umass bulk-only STALL case.
* Revise the NetBSD revision control strings.joe2003-11-091-13/+1
|
* MFNetBSD:joe2003-11-091-2/+2
| | | | | | - remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD(). this mirrors the functionality of SLIST_REMOVE_HEAD() (the other singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* fix support for umass and related devices on ohci. This is a partialjmg2003-07-151-78/+144
| | | | | | | | | | | sync of the NetBSD code. fix isochornous support for ohci. This gets webcams like my OV511 working on sparc64. PR: kern/52589 Submitted by: Bruce R. Montague (isochonous support) Reviewed by: joe among others
* make usb bus_dma aware.jmg2003-07-151-49/+42
| | | | Reviewed by: joe among others
* minor white space fix upjmg2003-07-151-2/+4
| | | | | | initalize itds remove extra htole32. Things don't work to well when you do htole32(htole32(var))
* Backout the last commit!joe2003-07-141-1/+2
| | | | | | | MFNetBSD: revision 1.137 date: 2003/01/20 07:12:13; author: simonb; Grrr. So much for my ability to use grep(1) effectively. Pointed out by Stephen Degler in private mail.
* MFNetBSD: revision 1.136joe2003-07-141-1/+2
| | | | | date: 2003/01/20 05:30:09; author: simonb; The Double-Semi-Colon Police.
* MFNetBSD: revision 1.135joe2003-07-141-4/+5
| | | | | | date: 2002/12/10 14:07:37; author: toshii; state: Exp; lines: +6 -6 Add a couple of le32toh which were missing in the previous. Pointed out by SOMEYA Yoshihiko.
* MFNetBSD: revision 1.134joe2003-07-141-27/+49
| | | | | | | | date: 2002/12/07 07:33:20; author: toshii; state: Exp; lines: +50 -29 Update xfer->frlengths for input isoc transfer. Based on patches from SOMEYA Yoshihiko. Also fix error handling for isoc transfer somewhat; usb_transfer_complete shouldn't be called for more than once.
* MFNetBSD: revision 1.133joe2003-07-141-0/+5
| | | | | | | | | | | | | | date: 2002/12/07 07:14:28; author: toshii; Fix several nits. Mostly from SOMEYA Yoshihiko. - Call usbd_transfer_complete at splusb. - Fix a botched for loop in ohci_rem_ed. - In ohci_close_pipe, wait 1ms after removing an ED to avoid possible race condition. The splusb change is non-functional on FreeBSD. The botched loop and race condition changes came from us. This patch is non-functional.
* MFNetBSD: revision 1.132joe2003-07-141-1/+4
| | | | | date: 2002/12/07 06:52:11; author: toshii; Remove junk at the end of a DPRINTF. From SOMEYA Yoshihiko.
* MFNetBSD: revision 1.129joe2003-07-141-0/+7
| | | | | | | | date: 2002/09/29 20:58:25; author: augustss; Add some spl calls to protect critical regions. From kern/18440, Takeshi Nakayama. (No functional change on FreeBSD).
* MFNetBSD:joe2003-07-141-4/+5
| | | | | | date: 2003/05/13 04:41:59; author: gson; Function names printed in debug messages did not always match the actual name of the function.
* MFNetBSD:joe2003-07-141-1/+2
| | | | | date: 2003/02/08 03:32:51; author: ichiro; change URL pointers of USB[1,2] specification
* remove \n at end of panic strings. They are added by the call to panic.jmg2003-07-041-8/+8
| | | | | | This brings us more in line with Net/OpenBSD Obtained from: Net/OpenBSD
* Fixed an issue which transfer no packets in combination with aue driver.shiba2003-03-051-2/+5
| | | | | | | Submitted by Hiroyuki Aizu <eyes@navi.org> (refer to [FreeBSD-users-jp 65061]) Tested by Hiroharu Tamaru <tamaru@myn.rcast.u-tokyo.ac.jp> (refer to [bsd-usb:689])
* Fix two bugs in the DMA chaining code for OHCI. The first bug is thatdillon2002-12-201-5/+9
| | | | | | | | | | | | | | | | | | | the dataphysend calculation could only possibly work if the virtual buffer is also physically contiguous. Calculate dataphysend by calculating the ending virtual address first, then converting to a physical address. The second bug applies only to NetBSD and OpenBSD and involves the curlen calculation in the two-contiguous-physical-pages case (which we don't support). Also cleanup the use of the OHIC_PAGE() macro on dataphysend and add a panic if len goes negative (meaning we lost the physical page translation representing the end of the buffer). IMHO the dataphysend is still bokered since it might be misrepresented by shared userland page mappings. The whole section needs to be rewritten to use the virtual address range. MFC after: 3 days
* MFNetBSD: (partial 1.133)joe2002-12-091-0/+2
| | | | | | | - In ohci_close_pipe, wait 1ms after removing an ED to avoid possible race condition. Approved by: re (rwatson)
* MFNetBSD:joe2002-12-091-5/+0
| | | | | | | date: 2002/09/29 20:59:30; author: augustss; state: Exp; lines: +2 -7 Remove extra call to ohci_rem_ed(). From kern/18448, Takeshi Nakayama. Approved by: re (rwatson)
* Don't corrupt the ED list whilst removing an entry.joe2002-12-091-1/+1
| | | | | Submitted by: Bernd Walter <ticso@cicely8.cicely.de> Approved by: re (rwatson)
* In rev 1.51 of usb_port.h I switched over to using the USB_USE_SOFTINTRjoe2002-09-301-0/+6
| | | | | | | | | | | | | | | code path to fix a bug in the non USB_USE_SOFTINTR path that caused the usb bus to hang and generally misbehave when devices were unplugged. In the process though it also reduced the throughput of usb devices because of a less than optimal implementation under FreeBSD. This commit fixes the non USB_USE_SOFTINTR code in uhci and ohci so that it works again, and switches back to using this code path. The uhci code has been tested, but the ohci code hasn't. It's essentially the same anyway and so I don't envisage any difficulties. Code for uhci submitted by: Maksim Yevmenkin <myevmenk@exodus.net>
* MFNetBSD:joe2002-08-161-6/+6
| | | | | | | revision 1.127 date: 2002/08/07 20:03:19; author: augustss; lines: +4 -8 Fix some braindead calls to free memory (only encountered under low memory conditions). From OpenBSD.
* Use the hw.usb sysctl tree instead of debug.usb.joe2002-08-081-1/+2
| | | | Requested by: imp
* Replace the FOO_DEBUG definitions with USB_DEBUG, and switch thejoe2002-07-311-21/+21
| | | | | | debugging levels to off by default. Now that debug levels can be tweaked by sysctl we don't need to go through hoops to get the different usb parts to produce debug data.
* Get bored with hard coded debug level variables and introduce a debug.usbjoe2002-07-311-0/+3
| | | | | | sysctl tree for tweaking them real-time. Reviewed by: iedowse
* NetBSD have adopted our usage of the DMAADDR macro:joe2002-05-281-1/+1
| | | | | | | | date: 2002/05/28 12:42:39; author: augustss; Change DMAADDR macro slightly. Update the $NetBSD$ tags to reflect this and make slight changes to usb_mem.h so that we're in sync with each other.
* Correct the usage of DMAADDR in a piece of '#if 0'd code. (The compilerjoe2002-05-261-1/+1
| | | | didn't pick it up.)
* MFNetBSD:joe2002-05-261-2/+2
| | | | | | | revision 1.124 date: 2002/05/26 03:10:02; author: minoura; state: Exp; lines: +3 -3 Clear done_head in the HCCA *before* acknoledging the interrupt. Driver lost some completed transfers under heavy loads.
* MFNetBSD: ohci.c (1.124), uhci.c (1.159), usbdi.c (1.100)joe2002-05-261-5/+5
| | | | | | | | | date: 2002/05/19 06:24:31; author: augustss; state: Exp; Update dma memory access API a little. NetBSD have adopted our way of using the KERNADDR macro. Update the revision tags to show that we're in sync, and remove the casts that they did in their adaptation.
* Some non-functional changes to make the differences between NetBSD'sjoe2002-04-291-31/+35
| | | | and our version clear to see.
* Move the new byte order function prototypes from <sys/param.h> tomike2002-04-261-0/+1
| | | | <sys/endian.h>. This puts us in line with NetBSD and OpenBSD.
* Remove the overt differences between ours and NetBSD's version of this file.joe2002-04-071-50/+38
|
* Re-add the definitions of htole32(x) and le32toh(x) for OpenBSD.joe2002-04-071-0/+14
|
* MFNetBSD:joe2002-04-071-3/+3
| | | | | | | | revision 1.121 date: 2002/03/16 16:11:18; author: tsutsui; state: Exp; lines: +4 -4 Fix a couple of typo: - s/ehci/ohci/ (in unused arg of macro) - s/uhci/ohci/ (in debug message)
* MFNetBSD: ohci.c (1.119), ohcivar.h (1.30)joe2002-04-071-6/+12
| | | | | date: 2001/12/31 12:20:35; author: augustss; Change xfer abort to wait for the softintr to run.
* MFNetBSD:joe2002-04-071-4/+23
| | | | | | revision 1.118 date: 2001/12/27 18:48:28; author: augustss; state: Exp; lines: +24 -5 Add some DIAGNOSTIC stuf that I forgot. From Nate Williams.
* MFNetBSD:joe2002-04-071-2/+4
| | | | | | revision 1.117 date: 2001/12/27 11:27:11; author: augustss; state: Exp; lines: +5 -3 Update a comment.
* MFNetBSD:joe2002-04-071-2/+30
| | | | | | revision 1.116 date: 2001/11/21 08:18:40; author: augustss; state: Exp; lines: +30 -3 Pay more attention to if the HC is being unplugged.
* MFNetBSD: ohci.c (1.114), ohcivar.h (1.29)joe2002-04-071-6/+17
| | | | | | date: 2001/11/21 02:41:18; author: augustss; Use a task to perform the timeout abort so we have a process context when sleeping.
* MFNetBSD:joe2002-04-071-1/+7
| | | | | | revision 1.113 date: 2001/11/21 02:39:31; author: augustss; state: Exp; lines: +10 -4 Some more debug stuff.
* MFNetBSD: ohci.c (1.112), uhci.c (1.147)joe2002-04-071-4/+4
| | | | | date: 2001/11/21 02:38:35; author: augustss; Cast some args to bitmask_snprintf().
* MFNetBSD: ohci.c (1.111), uhci.c (1.146)joe2002-04-071-1/+4
| | | | | date: 2001/11/20 21:12:46; author: augustss; Don't bother with interrupts when being disconnected.
OpenPOWER on IntegriCloud