[Linux-parport] ppdev and kernel panic
nate at uniwest.com
Mon Apr 19 11:52:11 BST 2004
I have seen a problem which I do not know if it has been fixed or not.
I am using a relatively old/ancient kernel. Kernel 2.4.2-2 which is Red Hat
7.1. This kernel has built into it 'parport.o' and 'parport_pc.o'
OK, I have had a program working which will automatically switch between
'ppdev.o' and 'lp.o'. That is to say, my code will "insmod ppdev" or
"insmod lp". When switching the code will respectively "rmmod lp" or "rmmod
ppdev". Everything is successful in the ioctl functions and with using this
modules to communicate via parallel port.
The problem is when I shutdown the computer. If I never use 'ppdev' in a
session, it will shutdown fine. If I load 'ppdev' at anytime in the
session, then the pc will fail to shutdown correctly.
I can tell that no modules are inserted into kernel via "lsmod" before I
"halt" the computer.
Does anyone know what maybe happening here? Or can I clarify anything I
have failed to make clear?
It seems that it might be related to claiming the port. If I do not "claim"
the port I do not have this issue. However, I cannot do my communication
without claiming it. So I am claiming it. I am also releasing it at the
end. Although the ioctl returns zero, I think it isn't really releasing it,
thus causing the kernel panic.
If I can compile the ppdev module with new source and it works, then, that
would be a valid solution for me. I would really like to know what is going
More information about the Linux-parport