[pvrusb2] New driver snapshot: pvrusb2-mci-20080210

Mike Isely isely at isely.net
Sun Feb 10 21:40:11 CST 2008


A new driver snapshot is available.  The major change here is a thread 
rework involving handling of driver instance context.  Said another way: 
A bunch of race / deadlock situations should be solved.  None of these 
issues were a result of the previous snapshot; these were longstanding 
(but unlikely) corner cases that pretty much nobody has hit.  The thread 
rework is also in preparation for other (perhaps digital mode...) 
changes hopefully still to come.

Change summary:

  (+) Completely rework context handling and initialization.  A new
      kernel thread is created per-instance to manage overall device
      state.  Hardware initialization is moved into this thread.
      Initialization of all interfaces now happens in the context of
      this thread.  Previously these two steps took place in the
      context of a work queue item, but that could cause a deadlock if
      the initialization code itself needed another work queue item to
      run (e.g. core state change).  The deadlock risk for this is
      actually zero since no interfaces try this, but there's a new
      interface coming which might need to operate some driver
      controls during initialization.  Interface tear-down and
      notification updates also happen through this new thread.  Also
      with the use of this new thread, the master context mutex is no
      longer required during interface initialization, which solves a
      very very longstanding mutex deadlock race (task 1 grabs mutex A
      then B while task 2 grabs mutex B then A) during driver
      initialization.  Nobody I know of has ever actually been
      directly burned by this, but the kernel's own mutex deadlock
      detector can find it.  Short summary: New kernel thread has been
      introduced to manage overall driver instance handling and this
      solves a number of nagging (though currently benign but later to
      be malignant) issues.

  (+) Close a potential (but improbable) timer race during driver
      instance tear-down.  This could have caused a kernel oops,
      though I've never gotten an actual report of this happening.

  (+) Close a potential (but extremely unlikely) thread race during
      initialization.

  (+) Increase staging buffer size for code which prints video
      standard strings.  There's enough possible combinations now that
      the previous buffer wasn't large enough.  (The buffer printing
      code tracks available size so this wasn't an overrun problem,
      just truncated text.)

As usual, the pvrusb2 web site can be found at:

  http://www.isely.net/pvrusb2/pvrusb2.html

  -Mike


-- 
                        |         Mike Isely          |     PGP fingerprint
     Spammers Die!!     |                             | 03 54 43 4D 75 E5 CC 92
                        |   isely @ pobox (dot) com   | 71 16 01 E2 B5 F5 C1 E8
                        |                             |


More information about the pvrusb2 mailing list