DragonFly BSD

CVS log for src/sys/bus/usb/ohci.c

[BACK] Up to [DragonFly] / src / sys / bus / usb

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Aug 14 20:55:53 2008 UTC (6 years ago) by hasso
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.27: preferred, unified
Changes since revision 1.27: +0 -3 lines
Remove some useless variables and assignments from USB code.

Found-by: LLVM/Clang Static Analyzer

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat May 24 09:11:09 2008 UTC (6 years, 3 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_Preview
Diff to: previous 1.26: preferred, unified
Changes since revision 1.26: +3 -3 lines
Fix two cases where device_printf() was used with an empty format.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed May 21 19:56:46 2008 UTC (6 years, 3 months ago) by mneumann
Branches: MAIN
Diff to: previous 1.25: preferred, unified
Changes since revision 1.25: +16 -18 lines
kprintf to device_printf conversion.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Apr 20 13:44:25 2008 UTC (6 years, 4 months ago) by swildner
Branches: MAIN
Diff to: previous 1.24: preferred, unified
Changes since revision 1.24: +1 -1 lines
Another round of typo fixes (mostly in messages).

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Jan 12 12:30:22 2008 UTC (6 years, 7 months ago) by hasso
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12
Diff to: previous 1.23: preferred, unified
Changes since revision 1.23: +1 -0 lines
Make sure we really do only the software part if we're dying. Fixes panic
while detaching ohci device.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Jun 29 22:56:31 2007 UTC (7 years, 2 months ago) by hasso
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10
Diff to: previous 1.22: preferred, unified
Changes since revision 1.22: +9 -9 lines
Nuke usb_ callout macros.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Jun 28 13:55:12 2007 UTC (7 years, 2 months ago) by hasso
Branches: MAIN
Diff to: previous 1.21: preferred, unified
Changes since revision 1.21: +12 -12 lines
Nuke SIMPLEQ_* and logprintf.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Jun 28 06:32:31 2007 UTC (7 years, 2 months ago) by hasso
Branches: MAIN
Diff to: previous 1.20: preferred, unified
Changes since revision 1.20: +141 -141 lines
Nuke device_ptr_t, USBBASEDEVICE, USBDEVNAME(), USBDEVUNIT(), USBGETSOFTC(),
USBDEVPTRNAME() and Static with help from sed(1).

Revision 1.20: download - view: text, markup, annotated - select for diffs
Wed Jun 27 12:27:59 2007 UTC (7 years, 2 months ago) by hasso
Branches: MAIN
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +0 -79 lines
Nuke the code specific to NetBSD/OpenBSD/FreeBSD at first. I doubt anyone
will update these pieces and I don't intend to review macros for all
platforms.

There is the chance though that I might kill something which should stay
in the code in form "TODO: port it to DF". So, please review and kick me.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Dec 22 23:12:17 2006 UTC (7 years, 8 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +34 -34 lines
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Dec 20 18:14:37 2006 UTC (7 years, 8 months ago) by dillon
Branches: MAIN
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +1 -1 lines
Rename sprintf  -> ksprintf
Rename snprintf -> knsprintf

Make allowances for source files that are compiled for both userland and
the kernel.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Dec 10 02:03:56 2006 UTC (7 years, 8 months ago) by sephe
Branches: MAIN
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +186 -162 lines
Sync USB support (host controller part) with FreeBSD6.

Following changes on FreeBSD-CURRENT(by iedowse@freebsd.org) are merged:
ehci.c	rev 1.52
ohci.c	rev 1.167
uhci.c	rev 1.172
usb.c	rev 1.111
usbdi.h	rev 1.61
"Use a different task queue for host controller and peripheral driver
 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."

As of this commit, only following kernel APIs are changed:
- usbd_get_string_desc() takes one more argument which returns the actual
  size of the string description.
- usb_add_task() takes one more argument.  The extra arguemnt is used
  to specify to which task queue the task should be added.  There is
  two task queues defined, one for peripheral driver (USB_TASKQ_DRIVER),
  one for host controller (USB_TASKQ_HC).

ugen(4) is adapted according to the above kernel API changes.

Thank all of the folks for their work on the USB support.

Tested-by:
swildner@, vbd@, joerg@(1.6 backport), Max Herrgard <herrgard@gmail.com>

# Though VT6202 is supported by ehci(4), I still have problems with this
# chip, even with the updated ehci(4).

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Oct 25 20:55:52 2006 UTC (7 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +0 -3 lines
Do a major clean-up of the BUSDMA architecture.  A large number of
essentially machine-independant drivers use the structures and definitions
in machine-dependant directories that are really machine-independant in
nature.

Split <machine/bus_dma.h> into machine-depdendant and machine-independant parts
and make the primary access run through <sys/bus_dma.h>.

Remove <machine/bus.h>, <machine/bus_memio.h> and <machine/bus_pio.h>.  The
optimizations related to bus_memio.h and bus_pio.h made a huge mess,
introduced machine-specific knowledge into essentially machine-independant
drivers, and required specific #include file orderings to do their job.
They may be reintroduced in some other form later on.

Move <machine/resource.h> to <sys/bus_resource.h>.  The contents of the file
is machine-independant or can be made a superset across many platforms.

Make <sys/bus.h> include <sys/bus_dma.h> and <sys/bus_resource.h> and
include <sys/bus.h> where necessary. Remove all #include's of
<machine/resource.h> and <machine/bus.h>.  That is, make the BUSDMA
infrastructure integral to I/O-mapped and memory-mapped accesses to devices
and remove a large chunk of machine-specific dependancies from drivers.
bus_if.h and device_if.h are now required to be present when using <sys/bus.h>.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Sep 5 00:55:36 2006 UTC (7 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +1 -1 lines
Rename malloc->kmalloc, free->kfree, and realloc->krealloc.  Pass 1

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed May 3 15:08:41 2006 UTC (8 years, 3 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +3 -0 lines
Add a missing ohci_waitintr() call that allows polled operation of
bulk transfers to have a chance of working.  Kernel crash dumps
to umass() work with this change.

Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: FreeBSD PR:usb/93720

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Apr 29 22:05:21 2006 UTC (8 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +1 -0 lines
Bring in some fixes from NetBSD:

- Avoid NULL pointer dereference (ehci.c)
- Abort quickly if we don't have a buffer in all the cases. (uhci.c)
- Only do the software reset if we are dying, like we do in ohci and
  ehci (uhci.c)

Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: NetBSD

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Jul 18 19:20:46 2005 UTC (9 years, 1 month ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +59 -12 lines
Fix numerous extremely serious bugs in OHCI's iso-synchronous code.  I'm
not even sure if the fixes are entirely correct because the code is badly
written and totally undocumented.  But they seem to help.

* Fix up list linkages prior to calling ohci_free_sitd(), since
  ohci_free_sitd() destroys the nextitd field.  This was causing a huge
  amount of corruption of the SITD free list *AND* the xfer SITD list,
  particularly prevaliant when multi-record transfers are executed
  (e.g. uaudio).

* Properly (I hope) adjust the pipe tail pointer in numerous situations.
  There are a number of unconditional references and assumptions as to the
  validity of pipe->tail.itd and it must be maintained at all times.
  In particular, an aborted or timed-out transfer would corrupt it.

Reported-by: Michal Belczyk <belczyk@bsd.krakow.pl>

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Jun 10 18:33:04 2005 UTC (9 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +13 -2 lines
Another terrible hack to leave interrupts disabled until the USB bus
has completed initialization.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Jun 2 20:40:40 2005 UTC (9 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +95 -114 lines
Remove spl*() calls from the bus/ infrastructure, replacing them with
critical sections.  Remove splusb() from everywhere, replacing it with
critical sections.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Jul 8 03:25:00 2004 UTC (10 years, 1 month ago) by dillon
Branches: MAIN
CVS tags: DragonFly_Stable, DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004, DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2, DragonFly_1_0_REL, DragonFly_1_0A_REL
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +15 -10 lines
Bring in a bunch of updates from NetBSD:

    revision 1.144
    Fix swapped lines in cleanup in ohci_init().  From OpenBSD.

    revision 1.145
    Try harder to avoid 0 ports woth AMD756.  From OpenBSD.

    revision 1.146
    Use the correct wValue to get hub desriptors.
    Also, make wValue checks of root hub codes less strict.

    revision 1.147
    Failure to properly mask off UE_DIR_IN from the endpoint address was causing
    OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set spuriously, causing rather
    interesting lossage.  Suddenly I get MUCH better performance with ehci...

    revision 1.148
    Adjust a couple of comments to make it clear WTF is going on.

    revision 1.149
    Make one message dependent on ohcidebug, so it doesn't interfere with polled
    operation; e.g. when entering a root device or in DDB.

    revision 1.150
    Fix an error in a printf() format.
    Swap the order that two items are written; possibly fixes a race condition
    that would affect isoc transfers.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Mar 12 03:43:06 2004 UTC (10 years, 5 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_1_0_RC1
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +1 -1 lines
Use M_INTWAIT and M_WAITOK instead of M_NOWAIT within the USB bus
infrastructure.  For the system to operate as expected, allocations
done in this layer have to be reliable.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Feb 11 15:17:26 2004 UTC (10 years, 6 months ago) by joerg
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +3 -3 lines
Add defined(__FreeBSD__) and defined(__DragonFly__) where appropriate

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Jan 8 18:12:59 2004 UTC (10 years, 7 months ago) by asmodai
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +1 -1 lines
Get rid of PZERO.  This was removed about the first of August.
It probably compiled due to the preprocessor defining code out.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Dec 30 01:01:44 2003 UTC (10 years, 8 months ago) by dillon
Branches: MAIN
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +1179 -504 lines
Bring in the entire FreeBSD-5 USB infrastructure.  As of this commit my
USB camera, Hard Drive, Mouse, and Sony memory key all work and I can even
unplug and replug them in without crashing the port.

Not all drivers and subsystems compile as of this commit, but the ones that
do not are very close.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Aug 7 21:16:47 2003 UTC (11 years ago) by dillon
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +8 -8 lines
kernel tree reorganization stage 1: Major cvs repository work (not logged as
commits) plus a major reworking of the #include's to accomodate the
relocations.

    * CVS repository files manually moved.  Old directories left intact
      and empty (temporary).

    * Reorganize all filesystems into vfs/, most devices into dev/,
      sub-divide devices by function.

    * Begin to move device-specific architecture files to the device
      subdirs rather then throwing them all into, e.g. i386/include

    * Reorganize files related to system busses, placing the related code
      in a new bus/ directory.  Also move cam to bus/cam though this may
      not have been the best idea in retrospect.

    * Reorganize emulation code and place it in a new emulation/ directory.

    * Remove the -I- compiler option in order to allow #include file
      localization, rename all config generated X.h files to use_X.h to
      clean up the conflicts.

    * Remove /usr/src/include (or /usr/include) dependancies during the
      kernel build, beyond what is normally needed to compile helper
      programs.

    * Make config create 'machine' softlinks for architecture specific
      directories outside of the standard <arch>/include.

    * Bump the config rev.

    WARNING! after this commit /usr/include and /usr/src/sys/compile/*
    should be regenerated from scratch.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Jun 29 03:28:41 2003 UTC (11 years, 2 months ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +3 -3 lines
threaded interrupts 1: Rewrite the ICU interrupt code, splz, and doreti code.
The APIC code hasn't been done yet.   Consolidate many interrupt thread
related functions into MI code, especially software interrupts.  All normal
interrupts and software interrupts are now threaded, and I'm almost ready
to deal with interrupt-thread-only preemption.  At the moment I run
interrupt threads in a critical section and probably will continue to do
so until I can make them MP safe.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:32 2003 UTC (11 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +1 -0 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:54:29 2003 UTC (11 years, 2 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.39.2.9

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options