Here is an HVCS (drivers/char/hvcs.c) patch which fixes the hvcs driver
problems with hotplugged vty-server adapters. The current driver handles
the adapter index assignment improperly so after a number of device
removals and insertions the driver could no longer map a tty->index to a
vty-server properly and tty_open() attempts would fail. This patch solves
this problem by always assigning the lowest available index to the new
adapters and returning an index to the list when the adapter is removed.
changelog:
drivers/char/hvcs.c
===================
-Added hvcs_index_list to manage the lowest available index.
-Added four helper functions to manage the list, which include the
creation and destruction of the list, the get'ing of the lowest index,
and the returning of an index.
-Moved free_irq() outside of the hvcs_final_close() function in order to
get it out of the spinlock.
-Rearranged hvcs_close() to accomodate the previous change.
-Removed local CLC_LENGTH define and used HVCS_CLC_LENGTH from
arch/ppc64/hvcserver.h instead.
-Cleaned up some printks and did some house keeping on the changelog.
Documentation/powerpc/hvcs.txt
==============================
-Added information on sysfs 'index' attribute added in previous hvcs
patch.
-Added Q & A section on how to find the proper dev node for a newly
added adapter.
I think this is the last of the HVCS patches for a while, as all of my
oustanding issues have been dealt with.
Signed-off-by: Ryan S. Arnold <rsa@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>