Skip to content

lirc_zilog: Ref-counting and locking cleanup

Andy Walls linux-media 1 version In review

Get series with b4
b4 am 1297991502.9399.16.camel@localhost

Versions newest first

  1. v1 Latest13 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13lirc_zilog: Restore checks for existence of the IR_tx objectdrivers/staging/lirc/lirc_zilog.c+20 -70 replies
2/13lirc_zilog: Remove broken, ineffective reference countingdrivers/staging/lirc/lirc_zilog.c+1 -310 replies
3/13lirc_zilog: Convert ir_device instance array to a linked listdrivers/staging/lirc/lirc_zilog.c+31 -280 replies
4/13lirc_zilog: Convert the instance open count to an atomic_tdrivers/staging/lirc/lirc_zilog.c+5 -100 replies
5/13lirc_zilog: Use kernel standard methods for marking device non-seekabledrivers/staging/lirc/lirc_zilog.c+2 -70 replies
6/13lirc_zilog: Don't acquire the rx->buf_lock in the poll() functiondrivers/staging/lirc/lirc_zilog.c+14 -70 replies
7/13lirc_zilog: Remove unneeded rx->buf_lockdrivers/staging/lirc/lirc_zilog.c+9 -140 replies
8/13lirc_zilog: Always allocate a Rx lirc_buffer objectdrivers/staging/lirc/lirc_zilog.c+31 -310 replies
9/13lirc_zilog: Move constants from ir_probe() into the lirc_driver templatedrivers/staging/lirc/lirc_zilog.c+15 -120 replies
10/13lirc_zilog: Add ref counting of struct IR, IR_tx, and IR_rxdrivers/staging/lirc/lirc_zilog.c+380 -2020 replies
11/13lirc_zilog: Add locking of the i2c_clients when in usedrivers/staging/lirc/lirc_zilog.c+37 -40 replies
12/13lirc_zilog: Fix somewhat confusing information messages in ir_probe()drivers/staging/lirc/lirc_zilog.c+3 -10 replies
13/13lirc_zilog: Update TODO list based on work completed and revised plansdrivers/staging/lirc/TODO.lirc_zilog+25 -260 replies

Reviews trailers per patch

None of the 13 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJarod Wilson
SeriesA-b
1/13
2/13
3/13
4/13
5/13
6/13
7/13
8/13
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/13] lirc_zilog: Ref-counting and locking cleanup

The following 13 patches are a substantial rework of lirc_zilog reference counting, object allocation and deallocation, and object locking.

With these changes, devices can now disappear out from under lircd + lirc_dev + lirc_zilog with no adverse effects. I tested this with irw + lircd + lirc_dev + lirc_zilog + cx18 + HVR-1600. I could unload the cx18 driver without any oops or application crashes. When I reloaded the cx18 driver, irw started receiving RX button presses again, and irsend worked without a problem (and I didn't even need to restart lircd!).

The ref counting fixes aren't finished as lirc_zilog itself can still be unloaded by the user when it shouldn't be, but a hot unplug of an HD-PVR, PVR-USB2, or HVR-1950 isn't going to trigger that.

These changes are base off of Jarod Wilson's git repo

	http://git.linuxtv.org/jarod/linux-2.6-ir.git for-2.6.38 (IIRC)

Regards,
Andy

The following changes since commit c369acfb63914f9f502baef032bacfd5a53a871f:

mceusb: really fix remaining keybounce issues (2011-01-26 10:56:29 -0500)

are available in the git repository at:
ssh://linuxtv.org/git/awalls/media_tree.git z8-wilson-38

Andy Walls (13):
lirc_zilog: Restore checks for existence of the IR_tx object
lirc_zilog: Remove broken, ineffective reference counting
lirc_zilog: Convert ir_device instance array to a linked list
lirc_zilog: Convert the instance open count to an atomic_t
lirc_zilog: Use kernel standard methods for marking device non-seekable
lirc_zilog: Don't acquire the rx->buf_lock in the poll() function
lirc_zilog: Remove unneeded rx->buf_lock
lirc_zilog: Always allocate a Rx lirc_buffer object
lirc_zilog: Move constants from ir_probe() into the lirc_driver template
lirc_zilog: Add ref counting of struct IR, IR_tx, and IR_rx
lirc_zilog: Add locking of the i2c_clients when in use
lirc_zilog: Fix somewhat confusing information messages in ir_probe()
lirc_zilog: Update TODO list based on work completed and revised plans

 drivers/staging/lirc/TODO.lirc_zilog |   51 +--
 drivers/staging/lirc/lirc_zilog.c    |  802 +++++++++++++++++++++-------------
 2 files changed, 523 insertions(+), 330 deletions(-)