Fix numerous extremely serious bugs in OHCI's iso-synchronous code. I'm
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 18 Jul 2005 19:20:46 +0000 (19:20 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 18 Jul 2005 19:20:46 +0000 (19:20 +0000)
commit6082d606538c99b566c574222c86f3feb63832dd
treee01af8107fa6c9819baa5b7691921125c922341e
parent922a8d4e8627be130a97cf5f897cd547abf8352c
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>
sys/bus/usb/ohci.c