summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ohcireg.h
Commit message (Collapse)AuthorAgeFilesLines
* fix support for umass and related devices on ohci. This is a partialjmg2003-07-151-0/+2
| | | | | | | | | | | 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
* WARNING: white space diffjmg2003-07-041-1/+1
| | | | | | 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.
* Merge from NetBSD:joe2002-04-011-1/+5
| | | | | | | | | | 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-3/+3
| | | | | | | | | 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-01-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+4
| | | | | | | | | 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.
* Change Lennart's e-mail address.n_hibma2000-05-141-1/+1
|
* Correctly handle the conversion from virtual to physical addresses. Then_hibma2000-02-101-0/+1
| | | | | | | | | | | | 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.
* Mask off the last two bits before comparing. It might just be that somen_hibma2000-01-291-0/+1
| | | | hardware might leave those bits in the wrong state.
* The values for OHCI_HALTED and OHCI_TOGGLECARRY were reversed.n_hibma2000-01-281-2/+2
|
* Move the defines to the right location.n_hibma2000-01-271-2/+2
| | | | | | | Add a DIAGNOSTIC when closing interrupt pipes. Insert splx(s) which were left out with iso pipes (non-functional yet) and in a DIAGNOSTIC.
* More USB ethernet tweaks:wpaul2000-01-201-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 as of 1999/11/16:n_hibma1999-11-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Major synchronisation with the NetBSD USB stack:n_hibma1999-10-071-4/+4
| | | | | | | | | | | - 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
* Textual changesn_hibma1999-01-221-1/+1
|
* Major synchronisation with NetBSD USB coden_hibma1999-01-071-2/+3
|
* Added Id to all filesn_hibma1998-12-141-0/+1
|
* Various bug fixes:n_hibma1998-12-091-5/+7
| | | | | | | | 1) Removed 'emulation' of bitmaps in printfs, FreeBSD seems to have caught up on that one 2) Fixed a few bugs in the timeout/timo timeout variables 3) First attempt at fixing a bug mentioned by Kazu: uhci_run is not able start/stop his USB host on his motherboard.
* Initial commit of ported NetBSD USB stackn_hibma1998-11-261-0/+204
OpenPOWER on IntegriCloud