summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ohci.c
Commit message (Collapse)AuthorAgeFilesLines
* MFNetBSD: ohci.c (1.99), uhci.c (1.133), usb.c (1.49), usb_port.hjoe2002-04-011-4/+4
| | | | | | | | | (1.39), usbdi.c (1.79), usbdi.h (1.47), usbdivar.h (1.62) date: 2001/01/21 02:39:52; author: augustss; Add code to use soft interrupt to handle USB interrupt processing. Don't enable the code since it doesn't work with the kludgy Ethernet drivers.
* MFNetBSD: Update many URLs.joe2002-04-011-3/+3
|
* MFNetBSD: ohci.c rev 1.94, uhci.c rev 1.126joe2002-04-011-1/+2
| | | | | | date: 2000/11/10 14:11:49; author: augustss; Update frlengths after a isoc transfer. Suggested by Yuri <yuri@tsoft.com>
* MFNetBSD: ohci.c rev 1.92, uhci.c rev 1.122 (part)joe2002-04-011-13/+25
| | | | | | | | | date: 2000/08/08 19:51:46; author: tv; state: Exp; lines: +24 -13 %b -> bitmask_snprintf() Because this code is shared, add a macro for bitmask_snprintf() that should expand to the equivalent snprintf() on non-NetBSD systems. This is only used in ?HCI_DEBUG cases anyway.
* Use ANSI prototypes and declarations.joe2002-04-011-1/+1
| | | | Update $NetBSD$ idents to better reflect reality.
* Merge from NetBSD:joe2002-04-011-3/+8
| | | | | | | | | ---------------------------- revision 1.90 date: 2000/05/08 18:28:46; author: thorpej; lines: +8 -3 Quiet some uninitialized variable warnings that do in fact look legitimate. ----------------------------
* Add a clarifying comment (from NetBSD).joe2002-04-011-1/+2
| | | | Update the $NetBSD$ ident to reflect reality.
* Merge from NetBSD:joe2002-04-011-2/+7
| | | | | | | | | | ohci.c (1.85), ohcireg.h (1.17): ---------------------------- date: 2000/04/01 09:27:35; author: augustss; Add a delay before reading the number of ports from the controller to avoid getting 0 from it. ----------------------------
* Merge from NetBSD:joe2002-04-011-94/+397
| | | | | | | | | ohci.c (1.83), ohcireg.h (1.16), ohcivar.h (1.21) =================================================================== date: 2000/03/29 01:46:26; author: augustss; A first stab at support for isochronous transfers. ===================================================================
* Merge from NetBSD:joe2002-03-161-3/+11
| | | | | | | | | | | | | | | | | ohcivar.h (1.22), uhcivar.h (1.29): ============================================================ date: 2000/04/25 09:20:55; author: augustss; Move the size of the mapped bus_space region into the bus independent softc. ============================================================ ohci.c (1.88), uhci.c (1.112): ============================================================ date: 2000/04/25 14:28:13; author: augustss; Insert (very conservative!) bus_space_barrier() calls at all register accesses. The bus_space(9) man page says you've gotta have them... ============================================================
* Huge merge from NetBSD:joe2002-03-161-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usbdi.c (1.61): =================================================================== revision 1.61 date: 2000/01/31 20:13:07; author: augustss; lines: +20 -4 Change the way the HC done method is invoked a little. =================================================================== usbdi.c (1.65): =================================================================== revision 1.65 date: 2000/03/08 15:34:10; author: augustss; lines: +4 -2 Get the status right when a polled transfer times out. =================================================================== ohci.c (1.79), uhci.c (1.89), uhcivar.h (1.24), usb_port.h (1.22), usbdivar.h (1.48): =================================================================== date: 2000/03/23 07:01:46; author: thorpej; New callout mechanism with two major improvements over the old timeout()/untimeout() API: - Clients supply callout handle storage, thus eliminating problems of resource allocation. - Insertion and removal of callouts is constant time, important as this facility is used quite a lot in the kernel. The old timeout()/untimeout() API has been removed from the kernel. =================================================================== uhci.c (1.80), usbdi.c (1.66): =================================================================== date: 2000/03/23 18:59:10; author: thorpej; Shake out some bugs from the callout changes. =================================================================== ohci.c (1.80), uhci.c (1.91), uhcivar.h (1.25), usb_port.h (1.23), usbdi.c (1.67), usbdivar.h (1.49): =================================================================== date: 2000/03/24 22:03:30; author: augustss; Some cleanup and renaming of the callouts used in USB drivers. =================================================================== uhci.c (1.92), uhcivar.h (1.26): =================================================================== date: 2000/03/24 22:57:58; author: augustss; Two major changes: Make each xfer have its own intr_info. This is necessary if we want to queue multiple xfers on an endpoint. This should get rid of the (mostly harmless) DIAGNOSTICs about intr_infos (not) being done. Change (again!) how xfers are aborted. Aborting a TD is a nightmare on the braindead UHCI controller. (Unless you stop the HC, thereby losing isoc traffic.) Hopefully I got it right this time. =================================================================== usbdivar.h (1.50): =================================================================== revision 1.50 date: 2000/03/25 00:10:19; author: augustss; lines: +4 -2 GC an unsued field and add some DIAGNOSTIC in xfer. =================================================================== ums.c: Use the callout functions instead of the timeout ones. uhci.c (1.93): =================================================================== revision 1.93 date: 2000/03/25 00:11:21; author: augustss; lines: +26 -1 Add more DIAGNOSTIC when aborting isoc. =================================================================== uhci.c (1.94), usbdivar.h (1.51): =================================================================== date: 2000/03/25 07:13:05; author: augustss; More DIAGNOSTIC. Initialize a callout handle I forgot. =================================================================== uhci.c (1.95): =================================================================== revision 1.95 date: 2000/03/25 07:23:12; author: augustss; Exp; lines: +24 -7 Improve uhci_dump_ii(). =================================================================== ohci.c (1.81), uhci.c (1.96), uhcivar.h (1.27), usb_subr.c (1.68), usbdi.c (1.68), usbdivar.h (1.52): =================================================================== date: 2000/03/25 18:02:33; author: augustss; Rename and move around callout handles to make it more sane. Add some DIAGNOSTIC. Fix buglet in isoc abort on UHCI. =================================================================== uhci.c (1.98): =================================================================== revision 1.98 date: 2000/03/27 07:39:48; author: augustss; lines: +12 -4 Make it compile without DIAGNOSTIC. =================================================================== uhci.c (1.99): =================================================================== revision 1.99 date: 2000/03/27 08:01:09; author: augustss; lines: +1 -5 Remove some debug nonsense. =================================================================== uhci.c (1.100): =================================================================== revision 1.100 date: 2000/03/27 09:41:36; author: augustss; lines: +13 -3 Don't mess with QH in bulk abort for the moment. =================================================================== uhci.c (1.102): =================================================================== revision 1.102 date: 2000/03/27 22:42:57; author: augustss; lines: +66 -26 Be a little more careful when aborting. Preallocate some TDs for large buffers. =================================================================== uhci.c (1.103): =================================================================== date: 2000/03/28 09:47:10; author: augustss; lines: +11 -1 Another patch for xfer abort... XXX The current xfer queueing and aborting semantics should really XXX be changed. It cannot be implemented in a sane way on UHCI. XXX One day when I have lots of time I'll redesign it... =================================================================== uhci.c (1.104): Correct a debug message. uhci.c (1.105): Be more defensive in a DIAGNOSTIC test. uhci.c (1.106): =================================================================== revision 1.106 date: 2000/03/29 01:49:13; author: augustss; lines: +14 -309 *SIGH* Revert back to the old method of aborting xfers. I had tested the new stuff for two months now, but as soon as I commited it the problems started to appear. Murphy, no doubt... =================================================================== usb_subr.c (1.70), usbdi.c (1.71), usbdivar.h (1.53): =================================================================== revision 1.70 date: 2000/03/29 01:45:20; author: augustss; lines: +2 -1 Do not accept new xfers for queuing while a pipe is aborting. ===================================================================
* Fix debug printf formatspeter2002-02-281-2/+1
|
* Add a comment explaining a code change..julian2002-02-271-2/+2
|
* Add the following functions/macros to support byte order conversions andtmm2002-02-271-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD): - bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess). htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land. Make use of the new functions in a few places where local implementations of the same functionality existed. Reviewed by: mike, bde Tested on alpha by: mike
* Fix warnings that have become fataljulian2002-02-271-3/+6
| | | | | | | | 1/ conditionalise (#if 0) function that is not used. Unused code left in place for netBSD compatibility. 2/ Recode loop to convince gcc that it does initialise a variable (use do-while instead of for() so gcc knows that we always go through at least once. Feel free to check my logic.
* Merge from NetBSD:joe2002-02-161-1/+3
| | | | | | Pave the way for USB2, by replacing 'lowspeed' with 'speed', so that it can take the values USB_SPEED_LOW, USB_SPEED_FULL or in time USB_SPEED_HIGH.
* Follow NetBSD and ANSIfy the function definitions.joe2002-02-031-259/+149
| | | | Remove trailing whitespaces (submitted to NetBSD).
* Update the $NetBSD$ ident to show that some patches have been appliedjoe2002-01-261-1/+1
| | | | in the past.
* Merge from NetBSD:joe2002-01-261-12/+48
| | | | | | | | | | | | | | | | | | ohci.c: revision 1.72 and 1.73 ohcivar.h: revision 1.19 and 1.20 uhci.c: revision 1.85 usbdi.h: a small part of revision 1.40 usbdivar.h: revision 1.47 Relevant commit messages from NetBSD are: date: 2000/02/22 11:30:54; author: augustss; state: Exp; Prepare a little for having USB interrupt processing done outside the hard interrupt level (in a thread or a softintr). No real soft processing done yet. ---------------------------- date: 2000/02/01 05:42:53; author: augustss; state: Exp; Put some #ifdefs around power and shutdown hooks.
* Merge from NetBSD:joe2002-01-211-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | ohci.c: -r1.69 to 1.71 ohcireg.h: -r1.14 Some of these deltas are based upon patches that we submitted back to NetBSD. They got manifested slightly differently though, so I've brought back those differences to bring our code bases closer together. The logs from the NetBSD version of ohci.c: revision 1.71 date: 2000/02/01 05:42:52; author: augustss; state: Exp; lines: +13 -2 Put some #ifdefs around power and shutdown hooks. ---------------------------- revision 1.70 date: 2000/01/31 22:35:13; author: augustss; state: Exp; lines: +7 -7 Rename TAILMASK to HEADMASK, since it really masks the head pointer. From FreeBSD. ---------------------------- revision 1.69 date: 2000/01/31 22:09:13; author: augustss; state: Exp; lines: +18 -14 Change where the has table for physical-to-virtual address translation is handled. Partly from FreeBSD.
* Merge from NetBSD:joe2002-01-211-3/+8
| | | | | | | | | ohci.c: -r1.68 ohcireg.h: -r1.13 date: 2000/01/31 20:17:25; author: augustss; state: Exp; Fiddle with over-current protect when turning on port power to make things work for some OHCI controllers.
* Merge from NetBSD:joe2002-01-211-2/+10
| | | | | | revision 1.65 date: 2000/01/25 12:06:21; author: augustss; state: Exp; lines: +10 -2 Add done method for root control transfers.
* Merge from NetBSD:joe2002-01-031-1/+2
| | | | | date: 2001/11/20 16:08:10; author: augustss; state: Exp; Use longer reset for root hubs (as told in the spec).
* Sync with NetBSD:joe2002-01-021-4/+4
| | | | | | date: 2000/02/29 21:37:01; author: augustss; state: Exp; Distinguish between device and interface classes. (I finally found a document that said that they were different.)
* Partial sync with NetBSD:joe2001-12-301-102/+112
| | | | Replace LE() macro with htole32()/le32toh().
* KSE Milestone 2julian2001-09-121-1/+1
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Do not printf when we get called as a result of a pci shared interrupt,peter2001-08-231-5/+1
| | | | and add a comment to that effect.
* Find spurious interrupts.n_hibma2001-08-211-0/+2
|
* Make the string argument a const.n_hibma2001-07-051-2/+2
|
* Make intr_nesting_level per-process, rather than per-cpu. Setupjake2001-01-211-1/+1
| | | | | | | | interrupt threads to run with it always >= 1, so that malloc can detect M_WAITOK from "interrupt" context. This is also necessary in order to context switch from sched_ithd() directly. Reviewed By: peter
* Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variablesjake2001-01-101-1/+1
| | | | other then curproc.
* Move suser() and suser_xxx() prototypes and a related #define fromphk2000-10-291-1/+0
| | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>.
* Undo previous commit. <machine/clock.h> is needed for the prototypen_hibma2000-10-161-0/+1
| | | | for DELAY().
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Remove __P prototypes to reduce diffs between the NetBSD and FreeBSDn_hibma2000-07-171-96/+96
| | | | versions.
* Change Lennart's e-mail address.n_hibma2000-05-141-1/+1
|
* OpenBSD has a broken debugger that does not grok static. Use an_hibma2000-04-031-117/+117
| | | | | | #define Static static that the OpenBSD folks can define it to be empty if they like.
* Get rid of the last remnants of powerhook abuse.n_hibma2000-03-181-2/+2
|
* Add the TD's to the hash when they are created not when they are used.n_hibma2000-03-151-16/+41
| | | | | | | | | | This makes it possible to handle the done queue even when the end of tail TD has ended up on the done queue as well (the xfer in this case is NULL but the next field is valid, so we simply skip that element. Make sure we mark all the handled transfers as handled. Stop using powerhooks. They are a NetBSD-ism.
* Correctly handle the conversion from virtual to physical addresses. Then_hibma2000-02-101-26/+54
| | | | | | | | | | | | problem was basically (for offset > 4096): vtophys(addr) + offset != vtophys(addr + offset) Also, use TD's with a maximum size of 4k instead of 8kb for OHCI controllers. This problem occurs in drivers that use large transfer sizes: umass, host2host and ethernet with jumbo frames.
* Get the KASSERT right.n_hibma2000-01-291-1/+1
|
* Fix debugging output. The TDs are linked through the dnext field, notn_hibma2000-01-291-1/+2
| | | | nexttd.
* Remove a warning from LINTn_hibma2000-01-291-1/+1
|
* Unbreak LINT.n_hibma2000-01-291-1/+1
| | | | Pointed out by: Peter Wemm
* First part of the fix for ohci_hash_find_td panic.n_hibma2000-01-291-4/+21
| | | | | | | Some controllers submit bogus pointers to the Done queue. ohci_hash_find_td fails to find these in its hash and panics. Instead of panicing we now assume the whole done queue is lost and let the timeout code to clean up the mess after us.
* Add comments and debugging info.n_hibma2000-01-291-9/+20
|
* The toggle carry bit is stored in the headp not the tailp.n_hibma2000-01-291-2/+2
|
* Mask off the last two bits before comparing. It might just be that somen_hibma2000-01-291-4/+8
| | | | hardware might leave those bits in the wrong state.
* Tripmine for bad hardware.n_hibma2000-01-291-0/+4
|
* Correct the list of error messages. It was incomplete.n_hibma2000-01-281-0/+3
|
OpenPOWER on IntegriCloud