summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdi.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a new function usbd_abort_default_pipe() that aborts any transfersiedowse2005-02-141-0/+6
| | | | | on the default pipe. This is helpful in device detach routines to stop any active control transfers.
* When attached to a high-speed device, report a more appropriateiedowse2005-02-131-0/+6
| | | | | | base transfer speed to CAM. The actual value used (40MB/s) is fairly arbitrary, but assumes the same 33% overhead as was implied by the 1MB/s figure we used for USB1 devices.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Fix two cases where a successful return from usbd_transfer() wouldiedowse2004-08-291-2/+2
| | | | | | be treated as an error and cause a transfer to be freed twice. This can probably only happen at boot time when transfers are processed synchronously.
* Diff reduction to NetBSD.le2004-07-191-5/+6
| | | | | | | usbdi.c rev. 1.104, author: mycroft ugen_isoc_rintr() may recycle the xfer immediately. Therefore, we avoid touching the xfer after calling the callback in usb_transfer_complete(). From PR 25960.
* Implement a crude but functional usbd_ratecheck() to limit the numberphk2004-03-041-5/+3
| | | | of "usb0: %d scheduling overruns" messages I have to contend with.
* Revise the NetBSD revision control strings.joe2003-11-091-6/+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.
* seems like i386 && DIAGNOSTIC needs sys/proc.hjmg2003-07-161-0/+1
| | | | Noticed by: tinderbox
* sync w/ NetBSDjmg2003-07-151-4/+2
| | | | | | part of: revision 1.101 date: 2002/06/01 23:51:04; author: lukem; state: Exp; lines: +5 -7
* Update to reflect the NetBSD patches that are already included.joe2003-07-141-0/+5
|
* remove \n at end of panic strings. They are added by the call to panic.jmg2003-07-041-1/+1
| | | | | | This brings us more in line with Net/OpenBSD Obtained from: Net/OpenBSD
* WARNING: white space diffjmg2003-07-041-31/+30
| | | | | | This code reduces the number of trailing white space to be more in line w/ NetBSD. I don't regenerate usbdevs, saving that for when it really changes.
* MFNetBSD: ohci.c (1.124), uhci.c (1.159), usbdi.c (1.100)joe2002-05-261-1/+1
| | | | | | | | | 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.
* Sync with NetBSD. (Non functional changes).joe2002-05-221-9/+9
|
* Fix a bug: Use USBD_DEFAULT_INTERVAL instead of USBD_DEFAULT_TIMEOUTjoe2002-05-221-1/+1
| | | | in a call to usbd_open_pipe_ival.
* MFNetBSD: ugen.c (1.57), ulpt.c (1.48), usb.c (1.67), usbdi.c (1.96),joe2002-05-061-8/+10
| | | | | | | | usbdi.h (1.60) (and local changes compatibility changes to ufm.c and urio.c) date: 2002/02/11 15:11:49; author: augustss; Give usbd_do_request_flags() an extra argument for the timeout.
* MFNetBSD:joe2002-05-021-1/+4
| | | | | | | | revision 1.94 date: 2001/12/30 20:26:59; author: augustss; state: Exp; lines: +5 -2 Make sure we don't have any pending softintrs when entering polling mode. Thanks to Darrin for finding and fixing this problem when using USB keyboards in DDB.
* MFNetBSD: ukbd.c (1.52), usbdi.c (1.54), usbdi.h (1.35)joe2002-04-071-3/+3
| | | | | | date: 2000/01/16 09:37:18; author: augustss; Let usbd_set_polling() work on a usbd_device_handle instead of a usbd_interface_handle.
* MFNetBSD: usbdi.c (1.93), usbdi.h (1.59)joe2002-04-071-2/+21
| | | | | | date: 2001/12/24 21:36:15; author: augustss; Add some more DIAGNOSTIC tests. Make usb_match_device() match on USB_PRODUCT_ANY.
* MFNetBSD:joe2002-04-071-2/+6
| | | | | | revision 1.92 date: 2001/12/12 15:38:58; author: augustss; state: Exp; lines: +7 -3 Some more paranoia checks when DIAGNOSTIC.
* Move a function to a different place in the source so that we matchjoe2002-04-071-17/+17
| | | | NetBSD.
* MFNetBSD:joe2002-04-071-2/+2
| | | | | | revision 1.88 date: 2001/11/22 04:31:01; author: augustss; state: Exp; lines: +3 -3 Improve dump routine slightly.
* MFNetBSD:joe2002-04-071-2/+2
| | | | | | revision 1.87 date: 2001/11/21 15:37:41; author: augustss; state: Exp; lines: +5 -5 Fix indentation and typos.
* MFNetBSD: usbdi.c (1.80), usbdi.h (1.51)joe2002-04-071-23/+2
| | | | | date: 2001/04/13 11:19:58; author: augustss; Finally get rid of the UGLY and EVIL hack for avoiding tsleep().
* MFNetBSD: usbdi.c (1.63), usbdi.h (1.41)joe2002-04-071-0/+17
| | | | | | | | | date: 2000/03/02 12:37:51; author: augustss; Use ratecheck() to limit error messages on disconnect. Break out some common functionality. We don't have ratecheck() in our kernel yet, so I've hardcoded usb_ratecheck() to return true always.
* MFNetBSD: ohci.c (1.109), uhci.c (1.144), uhub.c (1.56), usb.c (1.57),joe2002-04-071-2/+3
| | | | | | | | usbdi.c (1.86), usbdivar.h (1.66) [Some partial, because most of this was merged in a while ago] date: 2001/11/20 13:48:03; author: augustss; Keep track of device speed for USB 2.0.
* MFNetBSD: usbdi.c (1.85), usbdi.h (1.54), usbdi_util.c (1.37)joe2002-04-071-2/+1
| | | | | date: 2001/11/15 15:15:59; author: augustss; usbd_interface2device_handle() cannot fail.
* MFNetBSD: usbdi.c (1.82), usbdivar.h (1.64)joe2002-04-071-1/+50
| | | | | date: 2001/11/10 16:54:56; author: augustss; Add some dump routines for debugging.
* MFNetBSD:joe2002-04-071-0/+6
| | | | | | revision 1.81 date: 2001/04/17 00:05:33; author: augustss; state: Exp; lines: +7 -1 Add a DIAGNOSTIC.
* MFNetBSD: usb_subr.c (1.90), usbdi.c (1.83), usbdivar.h (1.65)joe2002-04-071-6/+0
| | | | | date: 2001/11/10 17:11:38; author: augustss; state: Exp; lines: +1 -2 Get rid of unused abort_handle.
* Back the last commit out. The network drivers need reworking first. :(joe2002-04-021-2/+23
|
* MFNetBSD: usbdi.c (1.80), usbdi.h (1.51)joe2002-04-021-23/+2
| | | | | date: 2001/04/13 11:19:58; author: augustss; Finally get rid of the UGLY and EVIL hack for avoiding tsleep().
* MFNetBSD: ohci.c (1.99), uhci.c (1.133), usb.c (1.49), usb_port.hjoe2002-04-011-1/+5
| | | | | | | | | (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-1/+1
|
* Merge from NetBSD: usbdi.c rev 1.77, usbdi.h rev 1.44joe2002-04-011-2/+11
| | | | | date: 2000/09/23 21:02:04; author: augustss; Add a way to do control transfers on other pipes than the default pipe.
* Use ANSI prototypes and declarations.joe2002-04-011-155/+65
|
* Merge from NetBSD: Make it compile with USB_DEBUG.joe2002-04-011-9/+6
|
* Merge from NetBSD:joe2002-04-011-6/+20
| | | | | | | | | ---------------------------- revision 1.73 date: 2000/05/31 16:14:42; author: augustss; state: Exp; lines: +19 -6 Be more careful when setting the alternate interface so we don't end up with nothing set at all if it fails. ----------------------------
* Huge merge from NetBSD:joe2002-03-161-8/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ===================================================================
* Prefix structure members to protect them against clashes with eg.alfred2002-02-201-1/+1
| | | | | | | | | c++ keywords. This keeps us in sync with NetBSD because they actually committed my delta first. Ok'd by: lennard
* Merge from NetBSD: revs 1.89 and 1.90.joe2002-02-111-0/+16
| | | | | | | | | | | | | | | | Also, add some 'const's to supress warnings. (Submitted back to NetBSD). The original logs from NetBSD: ---------------------------- revision 1.90 date: 2001/12/03 01:47:12; author: augustss; lines: +4 -4 Handle vendor/product lookup with a common routine. ---------------------------- revision 1.89 date: 2001/12/02 23:25:25; author: augustss; lines: +18 -2 Add a subroutine to search for a vendor/product pair. ----------------------------
* 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
* Pull in the most recent version of usb_quirks.h and propagate the necessaryn_hibma2001-07-051-1/+1
| | | | | | changes to the various files. Also, pull in most of the current usb_subr.c file.
* 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.
* Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ingphk2000-10-291-1/+0
| | | | | | | | | | the offending inline function (BUF_KERNPROC) on it being #included already. I'm not sure BUF_KERNPROC() is even the right thing to do or in the right place or implemented the right way (inline vs normal function). Remove consequently unneeded #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
|
OpenPOWER on IntegriCloud