summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdi.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix two more PRs:imp2007-06-301-1/+2
| | | | | | | | | | (1) Add size parameter to usbd_get_string() (2) Properly limit speed when a full speed hub is plugged into a high speed hub. Submitted by: Hans Petter Selasky PR: 80773, 79725 Approved by: re@ (kensmith)
* First pass at removing __OtherBSD__. We can't blindly remove all ofimp2007-06-121-28/+0
| | | | | | them in bulk because there is at least one feature that's unimplemented on FreeBSD that needs to be done and these are good placeholders.
* Use a different task queue for host controller and peripheral driveriedowse2006-10-191-3/+7
| | | | | | | | | | | | tasks. Since the host controllers rely on tasks to process transfer timeouts, if a synchronous transfer from a driver was invoked from a task and timed out, it would never complete because the single task thread was stuck performing the synchronous transfer so couldn't process the timeout. This affected the axe, udav and ural drivers. Problem hardware provided by: guido
* s/Static/static/gimp2006-09-061-1/+1
| | | | | | | | | | s/device_ptr_t/device_t/g No md5 changes in the .o's # Note to the md5 tracking club: $FreeBSD$ changes md5 after every commit # so you need to checkout -kk to get $FreeBSD$ instead of the actual value # of the keyword.
* Add convenience functions to get port and interface.imp2005-05-161-0/+15
|
* Add /* _FOO_H_ */ after the final #endif to make danfe happy.sobomax2005-03-251-1/+1
|
* Protect against multiple inclusions.sobomax2005-03-251-0/+5
|
* Merge from NetBSD.sobomax2005-03-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o usb_subr.c, add delta 1.119: Move usb_get_string() and make it public. o usbdi.c, bring on par with 1.106, this includes: - Make an iterator abstraction for looping through all descriptors. - Whine about not being able to figure out default language if we are debugging. - Move usb_get_string() and make it public. o usbdi.h, bring on par with 1.64, this includes: - Make an iterator abstraction for looping through all descriptors. - Move usb_get_string() and make it public. o usbdi_util.c, bring on par with 1.42, this includes: - Add usbd_get_protocol(). - Use NULL instead of 0. - Fix (mostly harmless) typo. - Move utility routine from uirda.c to usbdi_util.c. o usbdi_util.h, bring on par with 1.31, this includes: - Add usbd_get_protocol(). - Move utility routine from uirda.c to usbdi_util.c. MFC after: 3 days
* Add a new function usbd_abort_default_pipe() that aborts any transfersiedowse2005-02-141-0/+1
| | | | | 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/+1
| | | | | | 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
|
* Might as well get the right $NetBSD$ string while we are at it.julian2004-12-131-1/+1
| | | | MFC after: 1 week
* Diff reduction to NetBSD.julian2004-12-131-67/+59
| | | | | | | | | Now only things that are different between us and NetBSD show up. Means that these files are more of NetBSD style in some places but since thay are NetBSD files, um, that's ok. Obtained from: NetBSD MFC after: 1 week
* Tweak the compatibility macros a little so that the device printing isimp2004-08-151-0/+3
| | | | moved into them.
* Device megapatch 1/6:phk2004-02-211-1/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* Update to reflect the NetBSD patches that are already included.joe2003-07-141-1/+1
|
* WARNING: white space diffjmg2003-07-041-3/+3
| | | | | | 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: ugen.c (1.57), ulpt.c (1.48), usb.c (1.67), usbdi.c (1.96),joe2002-05-061-3/+4
| | | | | | | | 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.
* Update $NetBSD$ idents.joe2002-04-071-1/+1
|
* MFNetBSD: ukbd.c (1.52), usbdi.c (1.54), usbdi.h (1.35)joe2002-04-071-1/+1
| | | | | | 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-1/+2
| | | | | | date: 2001/12/24 21:36:15; author: augustss; Add some more DIAGNOSTIC tests. Make usb_match_device() match on USB_PRODUCT_ANY.
* Update $NetBSD$ ident.joe2002-04-071-1/+1
|
* MFNetBSD: usbdi.c (1.80), usbdi.h (1.51)joe2002-04-071-4/+1
| | | | | 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/+2
| | | | | | | | | 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: usbdi.c (1.85), usbdi.h (1.54), usbdi_util.c (1.37)joe2002-04-071-1/+1
| | | | | date: 2001/11/15 15:15:59; author: augustss; usbd_interface2device_handle() cannot fail.
* Back the last commit out. The network drivers need reworking first. :(joe2002-04-021-1/+4
|
* MFNetBSD: usbdi.c (1.80), usbdi.h (1.51)joe2002-04-021-4/+1
| | | | | date: 2001/04/13 11:19:58; author: augustss; Finally get rid of the UGLY and EVIL hack for avoiding tsleep().
* MFNetBSD: usb_subr.c (1.87), usbdi.h (1.53)joe2002-04-021-0/+1
| | | | | | date: 2001/08/15 00:04:59; author: augustss; Add a little infrastructure so that individual drivers can easily check if thee was a vendor+product locator match.
* MFNetBSD:joe2002-04-021-2/+6
| | | | | | | | | | | | revision 1.50 date: 2001/04/12 01:18:24; author: thorpej; state: Exp; lines: +6 -2 Only if __HAVE_GENERIC_SOFT_INTERRUPTS is then splusb == splsoftnet (because we register the interrupt with IPL_SOFTNET). However, if we're using a callout, then splusb == splsoftclock (because the callouts happen from the softclock interrupt). Note that splsoftnet blocks softclock interrupts, but this is meant to better describe what's going on.
* MFNetBSD: usb.c (1.53), usbdi.h (1.49)joe2002-04-021-2/+4
| | | | | date: 2001/01/23 17:04:30; author: augustss; Ad function to remove a usb task.
* MFNetBSD: uhub.c (1.49), usb.c (1.51), usbdi.h (1.48), usbdivar.h (1.63)joe2002-04-021-1/+16
| | | | | | | | | date: 2001/01/21 19:00:06; author: augustss; Change the operation of the USB event thread. Before it only performed USB device discovery, now it can also perform (short) tasks for device drivers that need a process context, but don't have one. This is not pretty, but better than using busy-wait in an interrupt context.
* MFNetBSD: ohci.c (1.99), uhci.c (1.133), usb.c (1.49), usb_port.hjoe2002-04-011-9/+6
| | | | | | | | | (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.
* constifyjoe2002-04-011-1/+1
|
* Update $NetBSD$ idents to better reflect reality.joe2002-04-011-1/+1
|
* Synchronise with the NetBSD version of this header file for formatting.joe2002-04-011-84/+72
|
* Merge from NetBSD: usbdi.c rev 1.77, usbdi.h rev 1.44joe2002-04-011-1/+4
| | | | | date: 2000/09/23 21:02:04; author: augustss; Add a way to do control transfers on other pipes than the default pipe.
* Merge from NetBSD: revs 1.55 and 1.56joe2002-02-111-0/+9
| | | | | | | | | | | | | | Original NetBSD logs: ---------------------------- revision 1.56 date: 2001/12/03 01:47:12; author: augustss; lines: +5 -3 Handle vendor/product lookup with a common routine. ---------------------------- revision 1.55 date: 2001/12/02 23:25:25; author: augustss; lines: +8 -1 Add a subroutine to search for a vendor/product pair. ----------------------------
* Merge from NetBSD.joe2002-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | uhub.c: revision 1.37 usb.4: revision 1.30 usb.c: revision 1.38 usb.h: revision 1.40 usb_port.h: revision 1.21 usb_subr.c: revision 1.65 usbdi.h: revision 1.40 Split the attach/detach events up into device, driver and controller attach and detach events. The commit message from NetBSD was: date: 2000/02/02 07:34:00; author: augustss; state: Exp; Change the USB event mechanism to include more information about devices and drivers. Partly from FreeBSD. Also rework usbd to take these new event types into account.
* Merge from NetBSD:joe2002-01-261-1/+2
| | | | | | | | | | | | | | | | | | 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.
* Pull in the most recent version of usb_quirks.h and propagate the necessaryn_hibma2001-07-051-2/+2
| | | | | | changes to the various files. Also, pull in most of the current usb_subr.c file.
* Remove __P prototypes to reduce diffs between the NetBSD and FreeBSDn_hibma2000-07-171-63/+63
| | | | versions.
* Change Lennart's e-mail address.n_hibma2000-05-141-1/+1
|
* Add usbd_clear_endpoint_toggle(pipe) function.n_hibma2000-01-251-0/+1
| | | | | This is needed to implement a asynchronous callback for clear endpoint stall, needed for the umass driver.
* More USB ethernet tweaks:wpaul2000-01-201-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Sync ohci, uhci and usbdi modules with NetBSD in order to obtain the following improvements: o New USBD_NO_TSLEEP flag can be used in place of UQ_NO_TSLEEP quirk. This allows drivers to specify busy waiting only for certain transfers (namely control transfers for reading/writing registers and stuff). o New USBD_FORCE_SHORT_XFER flag can be used to deal with devices like the ADMtek Pegasus that sense the end of bulk OUT transfers in a special way (if a transfer is exactly a multiple of 64 bytes in size, you need to send an extra empty packet to terminate the transfer). o usbd_open_pipe_intr() now accepts an interval argument which can be used to change the rate at which the interrupt callback routine is invoked. Specifying USBD_DEFAULT_INTERVAL uses the value specified in the device's config data, but drivers can override it if needed. - Change if_aue to use USBD_FORCE_SHORT_XFER for packet transmissions. - Change if_aue, if_kue and if_cue to use USBD_NO_TSLEEP for all control transfers. We no longer force the non-tsleep hack for bulk transfers since these are done asynchronously anyway. - Removed quirk entry fiddling from if_aue and if_kue since we don't need it anymore now that we have the USBD_NO_TSLEEP flag. - Tweak ulpt, uhid, ums and ukbd drivers to use the new arg to usbd_open_pipe_intr(). - Add a flag to the softc struct in the ethernet drivers to indicate when a device has been detached, and use this flag to perform tests to prevent the drivers from trying to do control transfers if this is the case. This is necessary because calling if_detach() with INET6 enabled will eventually result in a call to the driver's ioctl() routine to delete the multicast groups on the interface, which will result in attempts to perform control transfers. (It's possible this also happens even without INET6 support enabled.) This is pointless since we know that if the detach method has been called, the hardware has been unplugged. - Changed watchdog timeout routines to just call the driver init routines to initialize the device states without trying to close and re-open the pipes. This is partly because we don't want to frob things at interrupt context, but also because this doesn't seem to work right and I don't want to panic the system just because a USB device may have stopped responding. - Fix aue_rxeof() to be a little smarter about detecting when a double transfer is needed. Unfortunately, the design of the chip makes it hard to get this exactly right. Hopefully, this will go away once either Nick or Lennart finds the bug in the uhci driver that makes this ugly hack necessary. - Also sync usbdevs with NetBSD.
* Synchronisation with NetBSD 1999/11/27n_hibma1999-11-281-7/+7
| | | | | | | | | | | | | | | | | - more req[uest]->xfer changes. - get the corresponding NetBSD Id's right ohci.c - move untimeout above print statement - remove usb_delay that panics the system (tsleep in intr context) when ohcidebug > 5. ugen.c - create the devices for endpoints with make_dev. uhub.c - change from using usbdebug to uhubdebug - add more debugging statements
* Synchronisation with NetBSD as of 1999/11/16:n_hibma1999-11-171-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up the code: - Declare many functions static - Change variable names to make them more self explanatory - Change usbd_request_handle -> usbd_xfer_handle - Syntactical changes - Remove some unused code - Other KNF changes Interrupt context handling - Change delay to usbd_delay_ms were possible (takes polling mode into account) - Change detection mechanism for interrupt context Add support for pre-allocation DMA-able memory by device driver Add preliminary support for isochronous to the UHCI driver (not for OHCI yet). usb.c, uhci.c, ohci.c - Initial attempt at detachable USB host controllers - Handle the use_polling flag with a lttle more care and only set it if we are cold booting. usb.c, uhci.c ohci.c, usbdi.c usbdi_util.c usb_subr.c - Make sure an aborted pipe is marked as not running. - Start queued request in the right order. - Insert some more DIAGNOSTIC sanity checks. - Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN. usb.c, usb_subr.c - Add an event mechanism so that a userland process can watch devices come and go. ohci.c - Handle the case when a USB transfer is so long that it crosses two page (4K) boundaries. OHCI cannot do that with a single TD so we make a chain. ulpt.c - Use a bigger buffer when transferring data. - Pre-allocate the DMA buffer. This makes the driver slightly more efficient. - Comment out the GET_DEVICE_ID code, because for some unknown reason it causes printing to fail sometimes. usb.h - Add a macro to extract the isoc type. - Add a macro to check whether the routine has been entered after splusb and if not, complain. usbdi.c - Fix a glitch in dequeueing and aborting requests on interrupt pipes. - Add a flag in the request to determine if the data copying is done by the driver or the usbdi layer.
* priorities weren't correct (old version).n_hibma1999-10-071-36/+15
|
* Major synchronisation with the NetBSD USB stack:n_hibma1999-10-071-131/+64
| | | | | | | | | | | - Some cleanup and improvements in the uhci and ohci drivers - Support for plugging and unplugging devices improved - Now available is bulk transport over OHCI controllers - Resume and suspend have been temporarily been disabled again. Proper support for it is available in the uhci.c and ohci.c files but I have not yet spent the brain cycles to use it. - OpenBSD now uses the USB stack as well - Add FreeBSD tags
* Add comments, change variable names to make them consistent (r -> err,n_hibma1999-07-251-0/+1
| | | | timo_handle -> timeout_handle, p -> pipe, *pipe -> *rpipe, etc.)
* Replace usbd_device_set_desc by device_set_desc_copyn_hibma1999-06-271-1/+0
|
OpenPOWER on IntegriCloud